diff options
author | Laurent Carlier <carlier.lau@gmail.com> | 2021-03-13 23:53:02 (GMT) |
---|---|---|
committer | Laurent Carlier <carlier.lau@gmail.com> | 2021-03-13 23:53:02 (GMT) |
commit | 2e16aef612692d255ad6026396557bfa0f311dd4 (patch) | |
tree | ed3e2aa423e6c503289dbc3746b378e39d09130c /src | |
parent | 9136e8c664bc4b0706a9cf419c76b2277b87f4a1 (diff) | |
download | Doxygen-2e16aef612692d255ad6026396557bfa0f311dd4.zip Doxygen-2e16aef612692d255ad6026396557bfa0f311dd4.tar.gz Doxygen-2e16aef612692d255ad6026396557bfa0f311dd4.tar.bz2 |
Fix bug linking C++ anonymouus workspace
When using the \copydoc or \copybrief command, a variable declared
inside an anonymous workspace couldn't be fixed.
This patch resolves this issue.
Diffstat (limited to 'src')
-rw-r--r-- | src/docparser.cpp | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/src/docparser.cpp b/src/docparser.cpp index 75fe570..820bd1e 100644 --- a/src/docparser.cpp +++ b/src/docparser.cpp @@ -734,7 +734,21 @@ static bool findDocsForMemberOrCompound(const char *commandName, // for symbols we need to normalize the separator, so A#B, or A\B, or A.B becomes A::B cmdArg = substitute(cmdArg,"#","::"); cmdArg = substitute(cmdArg,"\\","::"); - cmdArg = substitute(cmdArg,".","::"); + static bool extractAnonNs = Config_getBool(EXTRACT_ANON_NSPACES); + if (extractAnonNs && + cmdArg.startsWith("anonymous_namespace{") + ) + { + int rightBracePos = cmdArg.find("}", std::strlen("anonymous_namespace{")); + QCString leftPart = cmdArg.left(rightBracePos + 1); + QCString rightPart = cmdArg.right(cmdArg.size() - rightBracePos - 1); + rightPart = substitute(rightPart, ".", "::"); + cmdArg = leftPart + rightPart; + } + else + { + cmdArg = substitute(cmdArg,".","::"); + } int l=(int)cmdArg.length(); |