summaryrefslogtreecommitdiff
path: root/compilerplugins
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2016-07-18 11:46:41 +0200
committerStephan Bergmann <sbergman@redhat.com>2016-07-18 11:46:41 +0200
commite8b2fc7a92ca4d725b125a13795a48c01d2f8231 (patch)
tree9d8180e20839430fddbf9f7eeea20be4f3fa8ba0 /compilerplugins
parent1d3ee7663da5f9f2ab2e2b8181cf2f6be5d6e524 (diff)
Adapt to older Clang that don't have CompoundStmt::body_front
Change-Id: I41555c0a2b35ad950797f65e02ed1ee060c4bf0a
Diffstat (limited to 'compilerplugins')
-rw-r--r--compilerplugins/clang/unnecessaryoverride.cxx2
1 files changed, 1 insertions, 1 deletions
diff --git a/compilerplugins/clang/unnecessaryoverride.cxx b/compilerplugins/clang/unnecessaryoverride.cxx
index 06a468c0f61d..cd426695cd6b 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;
}