Kaydet (Commit) 14c94c97 authored tarafından Noel Grandin's avatar Noel Grandin

cstylecast plugin - exclude some more files

Change-Id: I4dc6cc7f461fa11d12bf6fd9700befe4bbdac62c
üst 64a70d8c
...@@ -73,12 +73,19 @@ bool CStyleCast::VisitCStyleCastExpr(const CStyleCastExpr * expr) { ...@@ -73,12 +73,19 @@ bool CStyleCast::VisitCStyleCastExpr(const CStyleCastExpr * expr) {
if ( filename.endswith(".h") ) { if ( filename.endswith(".h") ) {
return true; return true;
} }
if ( compat::isInMainFile(compiler.getSourceManager(), spellingLocation) 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 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 || filename.startswith(SRCDIR "/bridges")) { // I'm not messing with this code - far too dangerous
: (filename.startswith(SRCDIR "/include/tools/solar.h")) ) {
return true; 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( report(
DiagnosticsEngine::Warning, DiagnosticsEngine::Warning,
"c-style cast, type=%0, from=%1, to=%2, recommendedFix=%3", "c-style cast, type=%0, from=%1, to=%2, recommendedFix=%3",
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment