summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2014-01-10 11:07:55 +0100
committerStephan Bergmann <sbergman@redhat.com>2014-01-10 17:11:42 +0100
commit0d824b5cc1bbd88d6cc46f150ddcb08ac552d320 (patch)
treecd609ded4bceecc4aa7c9aae5dbeb8e361659237
parentf08b4f611634994539d78f05b8493dd7dc5478c5 (diff)
compilerplugins: ignore WORKDIR code
...which is typically external or generated code and causes warnings that we cannot easily fix. Change-Id: If86ecd96c069ec23c6b3d7f5c32bf962397393e5
-rw-r--r--compilerplugins/clang/plugin.cxx6
1 files changed, 3 insertions, 3 deletions
diff --git a/compilerplugins/clang/plugin.cxx b/compilerplugins/clang/plugin.cxx
index 38308128d6aa..4a936e4d4166 100644
--- a/compilerplugins/clang/plugin.cxx
+++ b/compilerplugins/clang/plugin.cxx
@@ -54,10 +54,10 @@ bool Plugin::ignoreLocation( SourceLocation loc )
if( compiler.getSourceManager().isInSystemHeader( expansionLoc ))
return true;
const char* bufferName = compiler.getSourceManager().getPresumedLoc( expansionLoc ).getFilename();
- if( bufferName == NULL )
+ if( bufferName == NULL
+ || strncmp( bufferName, WORKDIR, strlen( WORKDIR )) == 0 )
return true;
- if( strncmp( bufferName, WORKDIR, strlen( WORKDIR )) == 0
- || strncmp( bufferName, BUILDDIR, strlen( BUILDDIR )) == 0
+ if( strncmp( bufferName, BUILDDIR, strlen( BUILDDIR )) == 0
|| strncmp( bufferName, SRCDIR, strlen( SRCDIR )) == 0 )
return false; // ok
return true;