diff options
author | DGA45 <59612603+DGA45@users.noreply.github.com> | 2020-10-30 12:48:55 (GMT) |
---|---|---|
committer | DGA45 <59612603+DGA45@users.noreply.github.com> | 2020-10-30 12:48:55 (GMT) |
commit | fd636709110d3242c7e25000274c45b7150a95a6 (patch) | |
tree | c7463b82bda801748e53a5a8fac5d5258629bd31 | |
parent | f246dd2f1c58eea39ea3f50c108019e4d4137bd5 (diff) | |
parent | 7bd775a7d8c4d74ce075ba3bb399c5dbff08b325 (diff) | |
download | Doxygen-fd636709110d3242c7e25000274c45b7150a95a6.zip Doxygen-fd636709110d3242c7e25000274c45b7150a95a6.tar.gz Doxygen-fd636709110d3242c7e25000274c45b7150a95a6.tar.bz2 |
Merge remote-tracking branch 'origin/issue7556' into Rel_1_8_20_DGA
-rw-r--r-- | src/doxygen.cpp | 3 | ||||
-rw-r--r-- | src/perlmodgen.cpp | 7 |
2 files changed, 8 insertions, 2 deletions
diff --git a/src/doxygen.cpp b/src/doxygen.cpp index 4b5c267..8d3b157 100644 --- a/src/doxygen.cpp +++ b/src/doxygen.cpp @@ -1380,7 +1380,8 @@ static void processTagLessClasses(ClassDef *rootCd, if (type.find(icd->name())!=-1) // matching tag less struct/union { QCString name = md->name(); - if (md->isAnonymous()) name = "__unnamed__"; + /* DGA fix #7556 ANSI-C anonymous (unnamed) struct/unions have duplicated names (__unnamed__) */ + if (md->isAnonymous()) name = "__unnamed__" + name.right(name.length()-1); /* DGA: ensure unique name */ if (!prefix.isEmpty()) name.prepend(prefix+"."); //printf(" found %s for class %s\n",name.data(),cd->name().data()); ClassDef *ncd = createTagLessInstance(rootCd,icd,name); diff --git a/src/perlmodgen.cpp b/src/perlmodgen.cpp index a6e9f22..eceff59 100644 --- a/src/perlmodgen.cpp +++ b/src/perlmodgen.cpp @@ -1569,6 +1569,7 @@ void PerlModGenerator::generatePerlModForMember(const MemberDef *md,const Defini // (templateArguments(), definitionTemplateParameterLists()) QCString memType; + QCString name; bool isFunc=FALSE; switch (md->memberType()) { @@ -1590,9 +1591,13 @@ void PerlModGenerator::generatePerlModForMember(const MemberDef *md,const Defini case MemberType_Dictionary: memType="dictionary"; break; } + /* DGA fix #7556 ANSI-C anonymous (unnamed) struct/unions have duplicated names (__unnamed__) */ + name = md->name(); + if (md->isAnonymous()) name = "__unnamed__" + name.right(name.length() - 1); /* DGA: ensure unique name */ + m_output.openHash() .addFieldQuotedString("kind", memType) - .addFieldQuotedString("name", md->name()) + .addFieldQuotedString("name", name) .addFieldQuotedString("virtualness", getVirtualnessName(md->virtualness())) .addFieldQuotedString("protection", getProtectionName(md->protection())) .addFieldBoolean("static", md->isStatic()); |