Skip to content

Commit 089f473

Browse files
Update valueflow.cpp
1 parent 8479457 commit 089f473

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

lib/valueflow.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3142,7 +3142,7 @@ static void valueFlowLifetime(TokenList &tokenlist, ErrorLogger &errorLogger, co
31423142
valueFlowLifetimeConstructor(tok->next(), tokenlist, errorLogger, settings);
31433143
}
31443144
// Check function calls
3145-
else if (Token::Match(tok, "%name% (") && !Token::simpleMatch(tok->linkAt(1), ") {")) {
3145+
else if (tok->scope()->isExecutable() && Token::Match(tok, "%name% (")) {
31463146
valueFlowLifetimeFunction(tok, tokenlist, errorLogger, settings);
31473147
}
31483148
// Unique pointer lifetimes

0 commit comments

Comments
 (0)