CheckUnusedVar: My fix for #4955 was a quick fix causing false negatives. Fix some FN and add TODO to handle other FN better.

This commit is contained in:
Daniel Marjamäki 2016-01-31 09:11:52 +01:00
parent d5884692df
commit f6161c6f89
1 changed files with 3 additions and 1 deletions

View File

@ -772,8 +772,10 @@ void CheckUnusedVar::checkFunctionVariableUsage_iterateScopes(const Scope* const
break;
}
if (tok->isName() && tok->str().back() == '>') {
// TODO: This is a quick fix to handle when constants are used
// as template parameters. Try to handle this better, perhaps
// only remove constants.
variables.clear();
break;
}
// bailout when for_each is used