diff options
author | Nico Weber <nicolasweber@gmx.de> | 2012-12-29 20:03:39 +0000 |
---|---|---|
committer | Nico Weber <nicolasweber@gmx.de> | 2012-12-29 20:03:39 +0000 |
commit | d36aa359e2f45cd22c7366a015ad94de08044dbb (patch) | |
tree | e62717815d76fb34c6b7b78681b038fd778f7693 /lib/Sema/SemaStmt.cpp | |
parent | 5ba0c8e4077902f53e5f3e8271e470a1d8c1c074 (diff) |
ArrayRefize a CompoundStmt constructor.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@171238 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/SemaStmt.cpp')
-rw-r--r-- | lib/Sema/SemaStmt.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/lib/Sema/SemaStmt.cpp b/lib/Sema/SemaStmt.cpp index 472338a541..df6b8283b7 100644 --- a/lib/Sema/SemaStmt.cpp +++ b/lib/Sema/SemaStmt.cpp @@ -298,7 +298,9 @@ Sema::ActOnCompoundStmt(SourceLocation L, SourceLocation R, DiagnoseEmptyLoopBody(Elts[i], Elts[i + 1]); } - return Owned(new (Context) CompoundStmt(Context, Elts, NumElts, L, R)); + return Owned(new (Context) CompoundStmt(Context, + llvm::makeArrayRef(Elts, NumElts), + L, R)); } StmtResult @@ -1937,8 +1939,7 @@ Sema::BuildCXXForRangeStmt(SourceLocation ForLoc, SourceLocation ColonLoc, Expr *Range = BEFFailure ? EndRangeRef.get() : BeginRangeRef.get(); Diag(Range->getLocStart(), diag::err_for_range_invalid) << RangeLoc << Range->getType() << BEFFailure; - CandidateSet.NoteCandidates(*this, OCD_AllCandidates, - llvm::makeArrayRef(&Range, /*NumArgs=*/1)); + CandidateSet.NoteCandidates(*this, OCD_AllCandidates, Range); } // Return an error if no fix was discovered. if (RangeStatus != FRS_Success) |