summaryrefslogtreecommitdiff
path: root/compilerplugins/clang/unusedvariablecheck.cxx
diff options
context:
space:
mode:
authorLuboš Luňák <l.lunak@suse.cz>2012-10-09 16:39:49 +0200
committerLuboš Luňák <l.lunak@suse.cz>2012-10-09 17:25:28 +0200
commit7cd19a8f10881028bfaf4217e586955f1d435c31 (patch)
tree676f9a1592d2702465140b9eddaa1096cdefd31a /compilerplugins/clang/unusedvariablecheck.cxx
parent4d05099806fc6116fbd7abe992d7f2f31210dd4c (diff)
do not analyse system headers in the compiler plugin
Change-Id: Ica1e233b45cc778bfdc86cfd608ada7fc261c6c2
Diffstat (limited to 'compilerplugins/clang/unusedvariablecheck.cxx')
-rw-r--r--compilerplugins/clang/unusedvariablecheck.cxx3
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;