diff options
Diffstat (limited to 'compilerplugins/clang/unusedvariablecheck.cxx')
-rw-r--r-- | compilerplugins/clang/unusedvariablecheck.cxx | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/compilerplugins/clang/unusedvariablecheck.cxx b/compilerplugins/clang/unusedvariablecheck.cxx index a9e47b2eb316..f2916320718d 100644 --- a/compilerplugins/clang/unusedvariablecheck.cxx +++ b/compilerplugins/clang/unusedvariablecheck.cxx @@ -40,8 +40,7 @@ void UnusedVariableCheck::run() bool UnusedVariableCheck::VisitNamedDecl( NamedDecl* declaration ) { - // TODO also LO header files? or a subdir? - if( !context.getSourceManager().isFromMainFile( declaration->getLocStart())) + if( ignoreLocation( declaration )) return true; if( !isa< VarDecl >( declaration )) return true; |