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
913d34ec6b "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>
This commit is contained in:
Stephan Bergmann 2019-11-19 15:38:13 +01:00
parent 5a11fe87a6
commit c5e5afbb4e

View file

@ -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;
}