summaryrefslogtreecommitdiff
path: root/compilerplugins
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2014-12-04 11:19:19 +0200
committerNoel Grandin <noel@peralex.com>2014-12-04 11:19:19 +0200
commit14c94c97ffcb4b51974a8177a8017d620b4d9293 (patch)
tree25940280307c5ab5d51b66d0fd0433d39835a85d /compilerplugins
parent64a70d8cf56b4a9c1b6bdf920f71cc49c3a2240e (diff)
cstylecast plugin - exclude some more files
Change-Id: I4dc6cc7f461fa11d12bf6fd9700befe4bbdac62c
Diffstat (limited to 'compilerplugins')
-rw-r--r--compilerplugins/clang/store/cstylecast.cxx17
1 files changed, 12 insertions, 5 deletions
diff --git a/compilerplugins/clang/store/cstylecast.cxx b/compilerplugins/clang/store/cstylecast.cxx
index b8f732577251..b036e1b78600 100644
--- a/compilerplugins/clang/store/cstylecast.cxx
+++ b/compilerplugins/clang/store/cstylecast.cxx
@@ -73,11 +73,18 @@ bool CStyleCast::VisitCStyleCastExpr(const CStyleCastExpr * expr) {
if ( filename.endswith(".h") ) {
return true;
}
- if ( compat::isInMainFile(compiler.getSourceManager(), spellingLocation)
- ? (filename.startswith(SRCDIR "/sal") // sal has tons of weird stuff going on that I don't understand enough to fix
- || filename.startswith(SRCDIR "/bridges")) // I'm not messing with this code - far too dangerous
- : (filename.startswith(SRCDIR "/include/tools/solar.h")) ) {
- return true;
+ if ( compat::isInMainFile(compiler.getSourceManager(), spellingLocation) ) {
+ if (filename.startswith(SRCDIR "/sal") // sal has tons of weird stuff going on that I don't understand enough to fix
+ || filename.startswith(SRCDIR "/bridges")) { // I'm not messing with this code - far too dangerous
+ return true;
+ }
+ } else {
+ if (filename.startswith(SRCDIR "/include/tools/solar.h")
+ // the GetSalDisplay/GetGtkDisplay methods are problematic
+ || filename.startswith(SRCDIR "/vcl/inc/generic/gendata.hxx")
+ || filename.startswith(SRCDIR "/include/cppuhelper/")) {
+ return true;
+ }
}
report(
DiagnosticsEngine::Warning,