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:
Luboš Luňák
2012-10-13 17:38:58 +02:00
parent e3418e9a85
commit 1e313e759b
10 changed files with 312 additions and 9 deletions

View File

@@ -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())