Omit unneeded computations

This commit is contained in:
Dmitry-Me 2017-08-28 18:10:49 +03:00
parent 02a1b7cd2d
commit cf6d3ba398
1 changed files with 6 additions and 1 deletions

View File

@ -1052,8 +1052,13 @@ void CheckCondition::alwaysTrueFalse()
break;
}
}
if (isExpandedMacro)
continue;
for (const Token *parent = tok; parent; parent = parent->astParent()) {
isExpandedMacro |= parent->isExpandedMacro();
if (parent->isExpandedMacro()) {
isExpandedMacro = true;
break;
}
}
if (isExpandedMacro)
continue;