summaryrefslogtreecommitdiff
path: root/compilerplugins/clang/stringconcat.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'compilerplugins/clang/stringconcat.cxx')
-rw-r--r--compilerplugins/clang/stringconcat.cxx11
1 files changed, 11 insertions, 0 deletions
diff --git a/compilerplugins/clang/stringconcat.cxx b/compilerplugins/clang/stringconcat.cxx
index 9cef9866db61..da4b212e9f73 100644
--- a/compilerplugins/clang/stringconcat.cxx
+++ b/compilerplugins/clang/stringconcat.cxx
@@ -100,6 +100,17 @@ bool StringConcat::VisitCallExpr(CallExpr const * expr) {
}
leftLoc = compat::getBeginLoc(left->getArg(1));
}
+
+ // We add an extra " " in the TOOLS_WARN_EXCEPTION macro, which triggers this plugin
+ if (loplugin::isSamePathname(
+ compiler.getSourceManager().getFilename(
+ compiler.getSourceManager().getSpellingLoc(
+ compiler.getSourceManager().getImmediateMacroCallerLoc(
+ compiler.getSourceManager().getImmediateMacroCallerLoc(
+ compat::getBeginLoc(expr))))),
+ SRCDIR "/include/tools/diagnose_ex.h"))
+ return true;
+
StringRef name {
getFileNameOfSpellingLoc(
compiler.getSourceManager().getSpellingLoc(compat::getBeginLoc(expr))) };