diff options
Diffstat (limited to 'src/doxygen.cpp')
-rw-r--r-- | src/doxygen.cpp | 37 |
1 files changed, 32 insertions, 5 deletions
diff --git a/src/doxygen.cpp b/src/doxygen.cpp index 7ff5c89..f229ded 100644 --- a/src/doxygen.cpp +++ b/src/doxygen.cpp @@ -3921,7 +3921,7 @@ static bool findTemplateInstanceRelation(Entry *root, // int *tempArgIndex; // for (;(tempArgIndex=qdi.current());++qdi) // { - // printf("(%s->%d) ",qdi.currentKey().data(),*tempArgIndex); + // printf("(%s->%d) ",qdi.currentKey(),*tempArgIndex); // } //} //printf("\n"); @@ -5651,26 +5651,53 @@ static void findMember(EntryNav *rootNav, if (count==0 && !(isFriend && funcType=="class")) { int candidates=0; + ClassDef *ccd = 0, *ecd = 0; + MemberDef *cmd = 0, *emd = 0; if (mn->count()>0) { //printf("Assume template class\n"); for (mni.toFirst();(md=mni.current());++mni) { - ClassDef *cd=md->getClassDef(); - //printf("cd->name()==%s className=%s\n",cd->name().data(),className.data()); - if (cd!=0 && rightScopeMatch(cd->name(),className)) + ccd=md->getClassDef(); + cmd=md; + //printf("ccd->name()==%s className=%s\n",ccd->name().data(),className.data()); + if (ccd!=0 && rightScopeMatch(ccd->name(),className)) { LockingPtr<ArgumentList> templAl = md->templateArguments(); if (root->tArgLists && templAl!=0 && root->tArgLists->getLast()->count()<=templAl->count()) { - addMethodToClass(rootNav,cd,md->name(),isFriend); + addMethodToClass(rootNav,ccd,md->name(),isFriend); return; } + if (md->argsString()==argListToString(root->argList,TRUE,FALSE)) + { // exact argument list match -> remember + ecd = ccd; + emd = cmd; + } candidates++; } } } + static bool strictProtoMatching = Config_getBool("STRICT_PROTO_MATCHING"); + if (!strictProtoMatching) + { + if (candidates==1 && ccd && cmd) + { + // we didn't find an actual match on argument lists, but there is only 1 member with this + // name in the same scope, so that has to be the one. + addMemberDocs(rootNav,cmd,funcDecl,0,overloaded,0); + return; + } + else if (candidates>1 && ecd && emd) + { + // we didn't find a unique match using type resolution, + // but one of the matches has the exact same signature so + // we take that one. + addMemberDocs(rootNav,emd,funcDecl,0,overloaded,0); + return; + } + } QCString warnMsg = "warning: no "; if (noMatchCount>1) warnMsg+="uniquely "; |