diff --git a/lib/checkunusedvar.cpp b/lib/checkunusedvar.cpp index 238857fea..0ec4c56b9 100644 --- a/lib/checkunusedvar.cpp +++ b/lib/checkunusedvar.cpp @@ -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