summaryrefslogtreecommitdiff
path: root/compilerplugins/clang/postfixincrementfix.cxx
diff options
context:
space:
mode:
authorLuboš Luňák <l.lunak@suse.cz>2013-01-03 20:15:21 +0100
committerLuboš Luňák <l.lunak@suse.cz>2013-01-04 15:27:24 +0100
commit217e3f2ea1e8983328364607f244daceeafca167 (patch)
tree136686e0e8faadfcc91c8a24a74318cf550700b4 /compilerplugins/clang/postfixincrementfix.cxx
parent1cec392ef50699cc0f310823e4e5fdbb9b272f0f (diff)
better handling of which files are processed by clang plugins
Check that only LO's files are processed, as there's no point otherwise. Also warn about files in workdir/solver/builddir, as those are either generated or copies. Try to automatically match include files from solver to srcdir though, as that's where include files are usually included from :(. Change-Id: Ie8389e903f623a9d0e75015091acc0da78e76c3a
Diffstat (limited to 'compilerplugins/clang/postfixincrementfix.cxx')
-rw-r--r--compilerplugins/clang/postfixincrementfix.cxx3
1 files changed, 1 insertions, 2 deletions
diff --git a/compilerplugins/clang/postfixincrementfix.cxx b/compilerplugins/clang/postfixincrementfix.cxx
index c5c17fb14b5d..bfaf77cefa6c 100644
--- a/compilerplugins/clang/postfixincrementfix.cxx
+++ b/compilerplugins/clang/postfixincrementfix.cxx
@@ -28,8 +28,7 @@ void PostfixIncrementFix::run()
bool PostfixIncrementFix::VisitFunctionDecl( FunctionDecl* declaration )
{
- // TODO also LO header files? or a subdir?
- if( !context.getSourceManager().isFromMainFile( declaration->getLocStart()))
+ if( ignoreLocation( declaration ))
return true;
if( !declaration->doesThisDeclarationHaveABody())
return true;