summaryrefslogtreecommitdiffstats
path: root/src/xmlgen.cpp
diff options
context:
space:
mode:
authorVladimír Vondruš <mosra@centrum.cz>2017-12-29 13:18:45 (GMT)
committerVladimír Vondruš <mosra@centrum.cz>2017-12-29 13:18:45 (GMT)
commit5db858953001c534341562cfaeba39782abc5ca6 (patch)
treeea7374beeb2b4c8bc74b482a57934534788ce77b /src/xmlgen.cpp
parent9538bfd15c99aceb619f426b30c87004c4820370 (diff)
downloadDoxygen-5db858953001c534341562cfaeba39782abc5ca6.zip
Doxygen-5db858953001c534341562cfaeba39782abc5ca6.tar.gz
Doxygen-5db858953001c534341562cfaeba39782abc5ca6.tar.bz2
XML output: avoid warnings with scoped enum values in anonymous namespaces.
When a C++11 `enum class` was present in an anonymous namespace (usually in *.cpp files), the XML output was emitting warnings similar to the following: Internal inconsistency: member False does not belong to any container! And the XML output was rendering bogus IDs for enum values starting with `dummy_`, such as: dummy_1a96ab6574751fdf6a53ceec8a3896c45daf8320b26d30ab433c5a54546d21f414c The fix is to call memberOutputFileBase() on the enumeration itself and not on the enum value, that way it provides correct file base that corresponds to file base of the enumeration. There's also a new test that checks this. Note: this assumes that enum values belong to the same compound as enums themselves. In my experience that was always the case and there's no broken test after this change, so I hope I didn't break anything.
Diffstat (limited to 'src/xmlgen.cpp')
-rw-r--r--src/xmlgen.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/xmlgen.cpp b/src/xmlgen.cpp
index 2222e46..697a4d8 100644
--- a/src/xmlgen.cpp
+++ b/src/xmlgen.cpp
@@ -954,11 +954,11 @@ static void generateXMLForMember(MemberDef *md,FTextStream &ti,FTextStream &t,De
MemberDef *emd;
for (emli.toFirst();(emd=emli.current());++emli)
{
- ti << " <member refid=\"" << memberOutputFileBase(emd)
- << "_1" << emd->anchor() << "\" kind=\"enumvalue\"><name>"
+ ti << " <member refid=\"" << memberOutputFileBase(md)
+ << "_1" << emd->anchor() << "\" kind=\"enumvalue\"><name>"
<< convertToXML(emd->name()) << "</name></member>" << endl;
- t << " <enumvalue id=\"" << memberOutputFileBase(emd) << "_1"
+ t << " <enumvalue id=\"" << memberOutputFileBase(md) << "_1"
<< emd->anchor() << "\" prot=\"";
switch (emd->protection())
{