From 872421a090753577d8e5e783c7b0729024bc2251 Mon Sep 17 00:00:00 2001 From: albert-github Date: Wed, 15 Dec 2021 12:17:38 +0100 Subject: [PATCH] bug_365053 Wrong reference to ::classname (in typedef) This fixes the second problem: ``` class Foo { typedef ::Bar MyBar; } ``` mentioned in the issue. Besides the already supported words also the word `typedef` should be supported. --- src/scanner.l | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/scanner.l b/src/scanner.l index 4c72f00a780..4cac5c406e8 100644 --- a/src/scanner.l +++ b/src/scanner.l @@ -2346,6 +2346,18 @@ NONLopt [^\n]* } yyextra->current->name=yyextra->current->name.mid(9); } + else if (yyextra->current->name.left(8)=="typedef ") + { + if (yyextra->current->type.isEmpty()) + { + yyextra->current->type="typedef"; + } + else + { + yyextra->current->type+="typedef "; + } + yyextra->current->name=yyextra->current->name.mid(8); + } } QCString tmp=yytext; if (nameIsOperator(tmp))