summaryrefslogtreecommitdiff
path: root/compilerplugins
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2019-11-19 15:38:13 +0100
committerStephan Bergmann <sbergman@redhat.com>2019-11-19 21:34:45 +0100
commitc5e5afbb4e0a7ac41ba4d70d4c9aeb5daa35205c (patch)
tree95afd0c9a16a0db4a6dfceb8e486b966242e4628 /compilerplugins
parent5a11fe87a6f1507149a0965aa740dcdf4ccef3c3 (diff)
Fix loplugin:fakebool (clang-cl)
...where it failed with > In file included from C:/lo-clang/core/extensions/source/activex/SOActiveX.cxx:23: > C:/lo-clang/core/extensions/source/activex/SOActiveX.h(160,1): error: VarDecl, use "bool" instead of 'BOOL' (aka 'int') [loplugin:fakebool] > BEGIN_MSG_MAP(CSOActiveX) > ^~~~~~~~~~~~~~~~~~~~~~~~~ > C:/PROGRA~2/MIB055~1/2019/COMMUN~1/VC/Tools/MSVC/1423~1.281/atlmfc/include\atlwin.h(2692,3): note: expanded from macro 'BEGIN_MSG_MAP' > BOOL bHandled = TRUE; \ > ^~~~~~~~~~~~~~~~~~~~ and no idea why I did the getImmediateMacroCallerLoc call in 913d34ec6b8fdb2796f76ce90fee51ade2051189 "Extend loplugin:salbool to loplugin:fakebool". Removing it doesn't cause any issues at least with my local Linux and Windows --enable-compiler-plugins builds. Change-Id: I64bd906a34e724aefe980ce8ff2b675e8fb2ec8a Reviewed-on: https://gerrit.libreoffice.org/83212 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'compilerplugins')
-rw-r--r--compilerplugins/clang/fakebool.cxx2
1 files changed, 1 insertions, 1 deletions
diff --git a/compilerplugins/clang/fakebool.cxx b/compilerplugins/clang/fakebool.cxx
index da42db3fde69..62fbc936e897 100644
--- a/compilerplugins/clang/fakebool.cxx
+++ b/compilerplugins/clang/fakebool.cxx
@@ -893,7 +893,7 @@ bool FakeBool::VisitVarDecl(VarDecl const * decl) {
l = compiler.getSourceManager().getImmediateMacroCallerLoc(l);
}
if (compiler.getSourceManager().isMacroBodyExpansion(l)
- && isSharedCAndCppCode(compiler.getSourceManager().getImmediateMacroCallerLoc(l)))
+ && isSharedCAndCppCode(l))
{
return true;
}