append [loplugin] automatically in report() rathen than manually everywhere

Change-Id: I2f98622f152ae0c7ac8d1113d6380f686ac7234c
This commit is contained in:
Luboš Luňák
2013-02-02 19:38:56 +01:00
parent b4392c575e
commit f5ee30c3ee
6 changed files with 21 additions and 20 deletions

View File

@@ -89,11 +89,11 @@ bool UnusedVariableCheck::VisitVarDecl( VarDecl* var )
if( const FunctionDecl* func = dyn_cast_or_null< FunctionDecl >( param->getParentFunctionOrMethod()))
if( !func->doesThisDeclarationHaveABody())
return true;
report( DiagnosticsEngine::Warning, "unused parameter %0 [loplugin]",
report( DiagnosticsEngine::Warning, "unused parameter %0",
var->getLocation()) << var->getDeclName();
}
else
report( DiagnosticsEngine::Warning, "unused variable %0 [loplugin]",
report( DiagnosticsEngine::Warning, "unused variable %0",
var->getLocation()) << var->getDeclName();
}
}