fix #331 Don't show function prototype tip for function name that contains namespace alias

This commit is contained in:
Roy Qu 2024-04-05 17:38:22 +08:00
parent e2aacd2361
commit 3ae25776b6
1 changed files with 8 additions and 1 deletions

View File

@ -153,7 +153,14 @@ QList<PStatement> CppParser::getListOfFunctions(const QString &fileName, const Q
if (mParsing) if (mParsing)
return result; return result;
PStatement statement = doFindStatementOf(fileName,phrase, line); QStringList expression = splitExpression(phrase);
PStatement scopeStatement = doFindScopeStatement(fileName,line);
int pos = 0;
PEvalStatement evalStatement = doEvalExpression(fileName, expression, pos, scopeStatement, PEvalStatement(), false, true);
if (!evalStatement)
return result;
PStatement statement = evalStatement->baseStatement;
if (!statement) if (!statement)
return result; return result;
if (statement->kind == StatementKind::Preprocessor) { if (statement->kind == StatementKind::Preprocessor) {