diff options
author | Dimitri van Heesch <doxygen@gmail.com> | 2020-11-22 13:20:17 (GMT) |
---|---|---|
committer | Dimitri van Heesch <doxygen@gmail.com> | 2020-11-22 13:20:17 (GMT) |
commit | 4e75d77f60bd173019247177686376ce36ace90b (patch) | |
tree | 2bf4ec4dc248ca868a23bf9f2390f7a24a7d8ea2 /src/doxygen.cpp | |
parent | 61f8521f768165e02a5f28df3fb442e3b91d170b (diff) | |
download | Doxygen-4e75d77f60bd173019247177686376ce36ace90b.zip Doxygen-4e75d77f60bd173019247177686376ce36ace90b.tar.gz Doxygen-4e75d77f60bd173019247177686376ce36ace90b.tar.bz2 |
issue #8070: C++: \var don't document enum class values
Diffstat (limited to 'src/doxygen.cpp')
-rw-r--r-- | src/doxygen.cpp | 27 |
1 files changed, 26 insertions, 1 deletions
diff --git a/src/doxygen.cpp b/src/doxygen.cpp index 13b275f..6c8c67a 100644 --- a/src/doxygen.cpp +++ b/src/doxygen.cpp @@ -5454,7 +5454,8 @@ static void addMemberFunction(const Entry *root, qPrint(scopeName),cd ? qPrint(cd->name()) : "<none>", qPrint(md->argsString()), qPrint(root->fileName)); - //printf("Member %s (member scopeName=%s) (this scopeName=%s) classTempList=%s\n",md->name().data(),cd->name().data(),scopeName.data(),classTempList.data()); + //printf("Member %s (member scopeName=%s) (this scopeName=%s) isEnumValue()=%d\n", + // md->name().data(),cd->name().data(),scopeName.data(),md->isEnumValue()); FileDef *fd=root->fileDef(); NamespaceDef *nd=0; if (!namespaceName.isEmpty()) nd=getResolvedNamespace(namespaceName); @@ -5462,6 +5463,30 @@ static void addMemberFunction(const Entry *root, //printf("scopeName %s->%s\n",scopeName.data(), // stripTemplateSpecifiersFromScope(scopeName,FALSE).data()); + // if the member we are searching for is an enum value that is part of + // a "strong" enum, we need to look into the fields of the enum for a match + int enumNamePos=0; + if (md->isEnumValue() && (enumNamePos=className.findRev("::"))!=-1) + { + QCString enumName = className.mid(enumNamePos+2); + if (className.left(enumNamePos)==cd->name()) + { + MemberName *enumMn=Doxygen::memberNameLinkedMap->find(enumName); + //printf("enumMn(%s)=%p\n",className.data(),enumMn); + if (enumMn) + { + for (const auto &emd : *enumMn) + { + memFound = emd->isStrong() && md->getEnumScope()==emd.get(); + addMemberDocs(root,md,funcDecl,0,overloaded,spec); + count++; + if (memFound) break; + } + } + } + } + if (memFound) break; + const ClassDef *tcd=findClassDefinition(fd,nd,scopeName); if (tcd==0 && cd && stripAnonymousNamespaceScope(cd->name())==scopeName) { |