diff options
author | Dimitri van Heesch <doxygen@gmail.com> | 2021-06-12 19:27:38 (GMT) |
---|---|---|
committer | Dimitri van Heesch <doxygen@gmail.com> | 2021-06-12 19:27:38 (GMT) |
commit | 7536e3a858e3c94f0e2a2ece52208364fd4b92d6 (patch) | |
tree | 07c763a8f5076dd2c220262f33bf7b41c5c4244e | |
parent | 5be74469a6c35b086393b339ebb27328ceb73a4c (diff) | |
download | Doxygen-7536e3a858e3c94f0e2a2ece52208364fd4b92d6.zip Doxygen-7536e3a858e3c94f0e2a2ece52208364fd4b92d6.tar.gz Doxygen-7536e3a858e3c94f0e2a2ece52208364fd4b92d6.tar.bz2 |
issue #8588: References to multiply nested class is broken with INLINE_SIMPLE_STRUCTS=YES
-rw-r--r-- | src/memberdef.cpp | 12 | ||||
-rw-r--r-- | src/regex.h | 8 |
2 files changed, 10 insertions, 10 deletions
diff --git a/src/memberdef.cpp b/src/memberdef.cpp index 7133641..c116b7c 100644 --- a/src/memberdef.cpp +++ b/src/memberdef.cpp @@ -3659,16 +3659,16 @@ static QCString simplifyTypeForTable(const QCString &s) { QCString ts=removeAnonymousScopes(s); if (ts.right(2)=="::") ts = ts.left(ts.length()-2); - static const reg::Ex re1(R"(\a\w*::(\a\w*))"); // non-template version - static const reg::Ex re2(R"(\a\w*<[^>]*>::(\a\w*))"); // template version + static const reg::Ex re1(R"(\a\w*::)"); // non-template version + static const reg::Ex re2(R"(\a\w*<[^>]*>::)"); // template version reg::Match match; std::string t = ts.str(); - if (reg::search(t,match,re1) || reg::search(t,match,re2)) + while (reg::search(t,match,re2) || reg::search(t,match,re1)) { - ts = match[1].str(); // take the identifier after the last :: + t = match.prefix().str() + match.suffix().str(); // remove the matched part } - //printf("simplifyTypeForTable(%s)->%s\n",qPrint(s),qPrint(ts)); - return ts; + //printf("simplifyTypeForTable(%s)->%s\n",qPrint(s),t.c_str()); + return t; } QCString MemberDefImpl::fieldType() const diff --git a/src/regex.h b/src/regex.h index bedc052..531092b 100644 --- a/src/regex.h +++ b/src/regex.h @@ -162,11 +162,11 @@ class Match /** Return a string representing the matching part. */ std::string str() const { return m_subMatches[0].str(); } - /** Return the part of the string after the match */ - SubMatch suffix() const { SubMatch m(m_str); m.setMatch(0,position()); return m; } - /** Return the part of the string before the match */ - SubMatch prefix() const + SubMatch prefix() const { SubMatch m(m_str); m.setMatch(0,position()); return m; } + + /** Return the part of the string after the match */ + SubMatch suffix() const { SubMatch m(m_str); if (m_str) |