Optimization: Do not attempt to find a matching function for if, for, while, etc.

This commit is contained in:
PKEuS 2017-02-26 20:08:59 +01:00
parent 7ecd5db8fb
commit 900d05d9dd
1 changed files with 1 additions and 1 deletions

View File

@ -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);