Index: clang/include/clang/AST/Stmt.h =================================================================== --- clang/include/clang/AST/Stmt.h +++ clang/include/clang/AST/Stmt.h @@ -1256,8 +1256,8 @@ // This gets the index of the last Stmt before the trailing NullStmts. If // this compound expression contains nothing but NullStmts, then we return // the index of the last one. - unsigned getLastNonNullStmt() const { - assert(!body_empty() && "getLastNonNullStmt"); + unsigned getIndexOfLastNonNullStmt() const { + assert(!body_empty() && "getIndexOfLastNonNullStmt"); for (unsigned I = size(), E = 0; I != E; I--) { if (!isa(body_begin()[I - 1])) return I - 1; @@ -1298,7 +1298,7 @@ // another Stmt. void setStmtExpr(Stmt *S) { assert(!body_empty() && "setStmtExpr"); - unsigned ExprResult = getLastNonNullStmt(); + unsigned ExprResult = getIndexOfLastNonNullStmt(); assert(!isa(body_begin()[ExprResult]) && "setStmtExpr but there is no non-NullStmt"); body_begin()[ExprResult] = S; @@ -1306,7 +1306,7 @@ // Get the Stmt representing the result of this compound expression. Stmt *getStmtExprResult() const { - unsigned ExprResult = getLastNonNullStmt(); + unsigned ExprResult = getIndexOfLastNonNullStmt(); return body_begin()[ExprResult]; } Index: clang/lib/CodeGen/CGStmt.cpp =================================================================== --- clang/lib/CodeGen/CGStmt.cpp +++ clang/lib/CodeGen/CGStmt.cpp @@ -382,7 +382,7 @@ bool GetLast, AggValueSlot AggSlot) { - Stmt *ExprResult = GetLast ? S.getStmtExprResult() : nullptr; + const Stmt *ExprResult = GetLast ? S.getStmtExprResult() : nullptr; Address RetAlloca = Address::invalid(); for (CompoundStmt::const_body_iterator I = S.body_begin(), E = S.body_end();