diff options
-rw-r--r-- | compilerplugins/clang/unnecessaryoverride.cxx | 2 |
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; } |