Skip to content

Commit 9023781

Browse files
committed
issue #3760 C++ using directives are not understood (Origin: bugzilla #617285)
1 parent c2c9dc3 commit 9023781

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/doxygen.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2194,7 +2194,7 @@ static void findUsingDeclImports(const Entry *root)
21942194
{
21952195
AUTO_TRACE_ADD("found scope '{}'",scope->name());
21962196
SymbolResolver resolver;
2197-
const Definition *def = resolver.resolveSymbol(scope,root->name);
2197+
const Definition *def = resolver.resolveSymbol(root->name.startsWith("::") ? nullptr : scope,root->name);
21982198
if (def && def->definitionType()==Definition::TypeMember)
21992199
{
22002200
int i=root->name.find("::");

src/scanner.l

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1976,7 +1976,7 @@ NONLopt [^\n]*
19761976
BEGIN(Using);
19771977
}
19781978
<Using>"namespace"{BN}+ { lineCount(yyscanner); BEGIN(UsingDirective); }
1979-
<Using>({ID}{BN}*("::"|"."){BN}*)*({ID}|{OPERATOR}) {
1979+
<Using>("::")?({ID}{BN}*("::"|"."){BN}*)*({ID}|{OPERATOR}) {
19801980
lineCount(yyscanner);
19811981
yyextra->current->name=yytext;
19821982
yyextra->current->fileName = yyextra->fileName;

0 commit comments

Comments
 (0)