diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2013-06-05 23:32:16 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2013-06-05 23:32:16 +0200 |
commit | 3d963884cbb07f4674db2285c6ca6ac2ca1bad73 (patch) | |
tree | 1bbb59128ce1b16e429ef2005748972f1d4b4873 /compilerplugins | |
parent | CGColorCreateGenericRGB is not available on iOS (diff) | |
download | core-3d963884cbb07f4674db2285c6ca6ac2ca1bad73.tar.gz core-3d963884cbb07f4674db2285c6ca6ac2ca1bad73.zip |
Adapt UPDATE_FILES=<module> to headers being moved to include/
Change-Id: I6af5236358a51a51514d646c809147db56b2464b
Diffstat (limited to 'compilerplugins')
-rw-r--r-- | compilerplugins/clang/pluginhandler.cxx | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/compilerplugins/clang/pluginhandler.cxx b/compilerplugins/clang/pluginhandler.cxx index cd554aac97e7..e0edae21ddfa 100644 --- a/compilerplugins/clang/pluginhandler.cxx +++ b/compilerplugins/clang/pluginhandler.cxx @@ -21,6 +21,17 @@ This source file manages all plugin actions. It is not necessary to modify this file when adding new actions. */ + +namespace +{ + +bool isPrefix( const string& prefix, const string& full) + { + return full.compare(0, prefix.size(), prefix) == 0; + } + +} + namespace loplugin { @@ -193,7 +204,7 @@ void PluginHandler::HandleTranslationUnit( ASTContext& context ) ; // ok else // scope is module { - if( strncmp( modifyFile.c_str(), ( SRCDIR "/" + scope + "/" ).c_str(), ( SRCDIR "/" + scope + "/" ).size()) != 0 ) + if( !( isPrefix( SRCDIR "/" + scope + "/", modifyFile ) || isPrefix( SRCDIR "/include/" + scope + "/", modifyFile ) ) ) continue; } // Warn only now, so that files not in scope do not cause warnings. |