diff options
author | Dimitri van Heesch <doxygen@gmail.com> | 2020-12-26 19:52:00 (GMT) |
---|---|---|
committer | Dimitri van Heesch <doxygen@gmail.com> | 2020-12-26 19:52:00 (GMT) |
commit | 05372137d19e3ac5f49f6a0072dbbd9b53e25005 (patch) | |
tree | 77dde30c6a61fb46e0387fc1e847a50e1ad7bb89 /src/doxygen.cpp | |
parent | a945d52a62b73b23674f6dc0948e22011e278cf9 (diff) | |
download | Doxygen-05372137d19e3ac5f49f6a0072dbbd9b53e25005.zip Doxygen-05372137d19e3ac5f49f6a0072dbbd9b53e25005.tar.gz Doxygen-05372137d19e3ac5f49f6a0072dbbd9b53e25005.tar.bz2 |
Avoid "Internal inconsistency" warnings for scoped enums
Can happen if they appear in an undocumented namespace.
Diffstat (limited to 'src/doxygen.cpp')
-rw-r--r-- | src/doxygen.cpp | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/src/doxygen.cpp b/src/doxygen.cpp index 709b6f1..3472f8f 100644 --- a/src/doxygen.cpp +++ b/src/doxygen.cpp @@ -7131,9 +7131,13 @@ static void addEnumValuesToEnums(const Entry *root) e->type,e->name,e->args,0, e->protection, Normal,e->stat,Member, MemberType_EnumValue,ArgumentList(),ArgumentList(),e->metaData) }; - if (md->getClassDef()) fmd->setMemberClass(md->getClassDef()); - else if (md->getNamespaceDef()) fmd->setNamespace(md->getNamespaceDef()); - else if (md->getFileDef()) fmd->setFileDef(md->getFileDef()); + const NamespaceDef *mnd = md->getNamespaceDef(); + if (md->getClassDef()) + fmd->setMemberClass(md->getClassDef()); + else if (mnd && (mnd->isLinkable() || mnd->isAnonymous())) + fmd->setNamespace(mnd); + else if (md->getFileDef()) + fmd->setFileDef(md->getFileDef()); fmd->setOuterScope(md->getOuterScope()); fmd->setTagInfo(e->tagInfo()); fmd->setLanguage(e->lang); |