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

Stephan Bergmann sbergman at redhat.com
Mon Jul 18 09:47:08 UTC 2016


 compilerplugins/clang/unnecessaryoverride.cxx |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit e8b2fc7a92ca4d725b125a13795a48c01d2f8231
Author: Stephan Bergmann <sbergman at redhat.com>
Date:   Mon Jul 18 11:46:41 2016 +0200

    Adapt to older Clang that don't have CompoundStmt::body_front
    
    Change-Id: I41555c0a2b35ad950797f65e02ed1ee060c4bf0a

diff --git a/compilerplugins/clang/unnecessaryoverride.cxx b/compilerplugins/clang/unnecessaryoverride.cxx
index 06a468c..cd42669 100644
--- a/compilerplugins/clang/unnecessaryoverride.cxx
+++ b/compilerplugins/clang/unnecessaryoverride.cxx
@@ -79,7 +79,7 @@ bool UnnecessaryOverride::VisitCXXMethodDecl(const CXXMethodDecl* methodDecl)
     const CompoundStmt* compoundStmt = dyn_cast<CompoundStmt>(methodDecl->getBody());
     if (!compoundStmt || compoundStmt->size() != 1)
         return true;
-    auto returnStmt = dyn_cast<ReturnStmt>(compoundStmt->body_front());
+    auto returnStmt = dyn_cast<ReturnStmt>(*compoundStmt->body_begin());
     if (returnStmt == nullptr) {
         return true;
     }


More information about the Libreoffice-commits mailing list