[Libreoffice-commits] core.git: compilerplugins/clang

Stephan Bergmann (via logerrit) logerrit at kemper.freedesktop.org
Fri Nov 15 18:17:22 UTC 2019


 compilerplugins/clang/fakebool.cxx |    5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

New commits:
commit 565bcfbdcbebc68c07eee9a30e0f82b0fdf7e846
Author:     Stephan Bergmann <sbergman at redhat.com>
AuthorDate: Fri Nov 15 16:43:37 2019 +0100
Commit:     Stephan Bergmann <sbergman at redhat.com>
CommitDate: Fri Nov 15 19:15:47 2019 +0100

    Fix loplugin:fakebool for Objective C
    
    ...ignoring uses of "BOOL" in Objective C for now
    
    Change-Id: I3eb48dc8d2592285f03f75dc7bc1b21e2383644d
    Reviewed-on: https://gerrit.libreoffice.org/82803
    Tested-by: Jenkins
    Reviewed-by: Stephan Bergmann <sbergman at redhat.com>

diff --git a/compilerplugins/clang/fakebool.cxx b/compilerplugins/clang/fakebool.cxx
index 1dbb535ceef9..99fbf95e3d29 100644
--- a/compilerplugins/clang/fakebool.cxx
+++ b/compilerplugins/clang/fakebool.cxx
@@ -931,7 +931,10 @@ bool FakeBool::VisitFieldDecl(FieldDecl const * decl) {
         return true;
     }
     TagDecl const * td = dyn_cast<TagDecl>(decl->getDeclContext());
-    assert(td != nullptr);
+    if (td == nullptr) {
+        //TODO: ObjCInterface
+        return true;
+    }
     if (!(((td->isStruct() || td->isUnion()) && td->isExternCContext())
           || isInUnoIncludeFile(
               compiler.getSourceManager().getSpellingLoc(


More information about the Libreoffice-commits mailing list