Skip to content

Commit f6161c6

Browse files
committed
CheckUnusedVar: My fix for #4955 was a quick fix causing false negatives. Fix some FN and add TODO to handle other FN better.
1 parent d588469 commit f6161c6

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

lib/checkunusedvar.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -772,8 +772,10 @@ void CheckUnusedVar::checkFunctionVariableUsage_iterateScopes(const Scope* const
772772
break;
773773
}
774774
if (tok->isName() && tok->str().back() == '>') {
775+
// TODO: This is a quick fix to handle when constants are used
776+
// as template parameters. Try to handle this better, perhaps
777+
// only remove constants.
775778
variables.clear();
776-
break;
777779
}
778780

779781
// bailout when for_each is used

0 commit comments

Comments
 (0)