Optimization: Do not attempt to find a matching function for if, for, while, etc.
This commit is contained in:
parent
7ecd5db8fb
commit
900d05d9dd
|
@ -1149,7 +1149,7 @@ void SymbolDatabase::createSymbolDatabaseSetFunctionPointers()
|
|||
// Set function call pointers
|
||||
for (const Token* tok = _tokenizer->list.front(); tok != _tokenizer->list.back(); tok = tok->next()) {
|
||||
if (Token::Match(tok, "%name% (")) {
|
||||
if (!tok->function() && tok->varId() == 0) {
|
||||
if (!tok->function() && tok->varId() == 0 && !isReservedName(tok->str())) {
|
||||
const Function *function = findFunction(tok);
|
||||
if (function)
|
||||
const_cast<Token *>(tok)->function(function);
|
||||
|
|
Loading…
Reference in New Issue