append [loplugin] automatically in report() rathen than manually everywhere
Change-Id: I2f98622f152ae0c7ac8d1113d6380f686ac7234c
This commit is contained in:
@@ -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();
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user