From 2734b80f2dcaac9dc6be842969d42414c7a37447 Mon Sep 17 00:00:00 2001 From: albert-github Date: Sun, 6 Oct 2019 17:53:40 +0200 Subject: issue #7295 Doxygen documentation of C++17 nested namespace erroneous documentation has to be added to the "last" entry not to the "first" / "top" --- src/scanner.l | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) 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(); -- cgit v0.12