compiler check to compare SAL_WARN/LOG areas against sal/inc/sal/log-areas.dox
Some of the areas are guesses I've added after seeing them, whoever feels reponsible for whichever part of the code feel free to adjust them. Change-Id: I2192de84d51cc2bc7c28fa84019d38b465985d15
This commit is contained in:
@@ -38,13 +38,10 @@ void UnusedVariableCheck::run()
|
||||
TraverseDecl( context.getTranslationUnitDecl());
|
||||
}
|
||||
|
||||
bool UnusedVariableCheck::VisitNamedDecl( NamedDecl* declaration )
|
||||
bool UnusedVariableCheck::VisitVarDecl( VarDecl* var )
|
||||
{
|
||||
if( ignoreLocation( declaration ))
|
||||
if( ignoreLocation( var ))
|
||||
return true;
|
||||
if( !isa< VarDecl >( declaration ))
|
||||
return true;
|
||||
const VarDecl* var = cast< VarDecl >( declaration );
|
||||
if( var->isReferenced() || var->isUsed())
|
||||
return true;
|
||||
if( var->isDefinedOutsideFunctionOrMethod())
|
||||
|
Reference in New Issue
Block a user