From b40e4af8459c02b5dda2c6ad07aadfc5fe7719cf Mon Sep 17 00:00:00 2001 From: Benjamin Kramer Date: Wed, 5 Aug 2015 09:40:35 +0000 Subject: [AST] ArrayRefize BlockDecl::setCaptures. No functionality change intended. llvm-svn: 244027 --- clang/lib/Sema/SemaExpr.cpp | 3 +-- clang/lib/Sema/SemaLambda.cpp | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-) (limited to 'clang/lib/Sema') diff --git a/clang/lib/Sema/SemaExpr.cpp b/clang/lib/Sema/SemaExpr.cpp index af4e4af5dfa..dd99ad2f0c0 100644 --- a/clang/lib/Sema/SemaExpr.cpp +++ b/clang/lib/Sema/SemaExpr.cpp @@ -11397,8 +11397,7 @@ ExprResult Sema::ActOnBlockStmtExpr(SourceLocation CaretLoc, Cap.isNested(), Cap.getInitExpr()); Captures.push_back(NewCap); } - BSI->TheDecl->setCaptures(Context, Captures.begin(), Captures.end(), - BSI->CXXThisCaptureIndex != 0); + BSI->TheDecl->setCaptures(Context, Captures, BSI->CXXThisCaptureIndex != 0); // If the user wrote a function type in some form, try to use that. if (!BSI->FunctionType.isNull()) { diff --git a/clang/lib/Sema/SemaLambda.cpp b/clang/lib/Sema/SemaLambda.cpp index 8220641166b..952272e37f3 100644 --- a/clang/lib/Sema/SemaLambda.cpp +++ b/clang/lib/Sema/SemaLambda.cpp @@ -1700,8 +1700,7 @@ ExprResult Sema::BuildBlockForLambdaConversion(SourceLocation CurrentLocation, SC_None); BlockDecl::Capture Capture(/*Variable=*/CapVar, /*ByRef=*/false, /*Nested=*/false, /*Copy=*/Init.get()); - Block->setCaptures(Context, &Capture, &Capture + 1, - /*CapturesCXXThis=*/false); + Block->setCaptures(Context, Capture, /*CapturesCXXThis=*/false); // Add a fake function body to the block. IR generation is responsible // for filling in the actual body, which cannot be expressed as an AST. -- cgit v1.2.3