summaryrefslogtreecommitdiffstats
path: root/src/scanner.l
diff options
context:
space:
mode:
authoralbert-github <albert.tests@gmail.com>2019-10-06 15:53:40 (GMT)
committeralbert-github <albert.tests@gmail.com>2019-10-06 15:53:40 (GMT)
commit2734b80f2dcaac9dc6be842969d42414c7a37447 (patch)
tree23e2a6820265c6427b65e2e270368ce790297739 /src/scanner.l
parent4e21d19cf63b17aadb62905535262deb208a0c73 (diff)
downloadDoxygen-2734b80f2dcaac9dc6be842969d42414c7a37447.zip
Doxygen-2734b80f2dcaac9dc6be842969d42414c7a37447.tar.gz
Doxygen-2734b80f2dcaac9dc6be842969d42414c7a37447.tar.bz2
issue #7295 Doxygen documentation of C++17 nested namespace erroneous
documentation has to be added to the "last" entry not to the "first" / "top"
Diffstat (limited to 'src/scanner.l')
-rw-r--r--src/scanner.l17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/scanner.l b/src/scanner.l
index 07d5c71..2a54121 100644
--- a/src/scanner.l
+++ b/src/scanner.l
@@ -3989,6 +3989,7 @@ OPERATOR "operator"{B}*({ARITHOP}|{ASSIGNOP}|{LOGICOP}|{BITOP})
if (current->section == Entry::NAMESPACE_SEC && current->type == "namespace")
{
int split_point;
+ Entry *first_current = current;
while ((split_point = current->name.find("::")) != -1)
{
Entry *new_current = new Entry(*current);
@@ -4007,6 +4008,22 @@ OPERATOR "operator"{B}*({ARITHOP}|{ASSIGNOP}|{LOGICOP}|{BITOP})
current_root = current;
current = new_current;
}
+ // put documentation in the right entity
+ if (first_current!=current)
+ {
+ current->doc = first_current->doc;
+ current->docLine = first_current->docLine;
+ current->docFile = first_current->docFile;
+ current->brief = first_current->brief;
+ current->briefLine = first_current->briefLine;
+ current->briefFile = first_current->briefFile;
+ first_current->doc = "";
+ first_current->docLine = 0;
+ first_current->docFile = "";
+ first_current->brief = "";
+ first_current->briefLine = 0;
+ first_current->briefFile = "";
+ }
}
QCString &cn = current->name;
QCString rn = current_root->name.copy();