diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2015-01-06 22:55:00 +0100 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2015-01-07 14:42:07 +0100 |
commit | 25fb44265113c670ac3aaedb5a46c39a8c2895c8 (patch) | |
tree | aa504bc3663d14a0369b934f916d3e49860b702b /compilerplugins | |
parent | 7b1261f6f956271ec2a545f635e11432a5e64fa1 (diff) |
loplugin:cstylecast: bridges
Change-Id: I7c41b90c9af045fd452ee62ed0c5d9b261236855
Diffstat (limited to 'compilerplugins')
-rw-r--r-- | compilerplugins/clang/cstylecast.cxx | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/compilerplugins/clang/cstylecast.cxx b/compilerplugins/clang/cstylecast.cxx index 6fbf60b66ab7..19b016332a21 100644 --- a/compilerplugins/clang/cstylecast.cxx +++ b/compilerplugins/clang/cstylecast.cxx @@ -96,15 +96,11 @@ bool CStyleCast::VisitCStyleCastExpr(const CStyleCastExpr * expr) { if ( filename.endswith(".h") ) { return true; } - if ( compat::isInMainFile(compiler.getSourceManager(), spellingLocation) ) { - if (filename.startswith(SRCDIR "/bridges/")) { // I'm not messing with this code - far too dangerous - return true; - } - } else { - if (filename == SRCDIR "/include/tools/solar.h" - || filename.startswith(SRCDIR "/include/cppuhelper/")) { - return true; - } + if (!compat::isInMainFile(compiler.getSourceManager(), spellingLocation) + && (filename == SRCDIR "/include/tools/solar.h" + || filename.startswith(SRCDIR "/include/cppuhelper/"))) + { + return true; } report( DiagnosticsEngine::Warning, |