diff options
author | Nikola Smiljanic <popizdeh@gmail.com> | 2014-05-29 10:55:11 +0000 |
---|---|---|
committer | Nikola Smiljanic <popizdeh@gmail.com> | 2014-05-29 10:55:11 +0000 |
commit | 01a7598561561c6d34ba0683a550ed6326fa8f98 (patch) | |
tree | b3aff167bfd4e464e3fe245f683f1fca8820a9a8 /clang/lib/Sema/SemaLambda.cpp | |
parent | d670c7eee0ae157410e04b48319b804290e779ff (diff) | |
download | bcm5719-llvm-01a7598561561c6d34ba0683a550ed6326fa8f98.tar.gz bcm5719-llvm-01a7598561561c6d34ba0683a550ed6326fa8f98.zip |
Refactoring. Remove release and take methods from ActionResult. Rename takeAs to getAs.
llvm-svn: 209800
Diffstat (limited to 'clang/lib/Sema/SemaLambda.cpp')
-rw-r--r-- | clang/lib/Sema/SemaLambda.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/clang/lib/Sema/SemaLambda.cpp b/clang/lib/Sema/SemaLambda.cpp index ef92e7c5b79..0cf4ed7c608 100644 --- a/clang/lib/Sema/SemaLambda.cpp +++ b/clang/lib/Sema/SemaLambda.cpp @@ -782,7 +782,7 @@ QualType Sema::performLambdaInitCaptureInitialization(SourceLocation Loc, if (Result.isInvalid()) return QualType(); - Init = Result.takeAs<Expr>(); + Init = Result.getAs<Expr>(); // The init-capture initialization is a full-expression that must be // processed as one before we enter the declcontext of the lambda's @@ -793,7 +793,7 @@ QualType Sema::performLambdaInitCaptureInitialization(SourceLocation Loc, if (Result.isInvalid()) return QualType(); - Init = Result.takeAs<Expr>(); + Init = Result.getAs<Expr>(); return DeducedType; } @@ -1013,7 +1013,7 @@ void Sema::ActOnStartOfLambdaDefinition(LambdaIntroducer &Intro, if (C->InitCaptureType.get().isNull()) continue; Var = createLambdaInitCaptureVarDecl(C->Loc, C->InitCaptureType.get(), - C->Id, C->Init.take()); + C->Id, C->Init.get()); // C++1y [expr.prim.lambda]p11: // An init-capture behaves as if it declares and explicitly // captures a variable [...] whose declarative region is the @@ -1572,7 +1572,7 @@ ExprResult Sema::BuildBlockForLambdaConversion(SourceLocation CurrentLocation, /*NRVO=*/false), CurrentLocation, Src); if (!Init.isInvalid()) - Init = ActOnFinishFullExpr(Init.take()); + Init = ActOnFinishFullExpr(Init.get()); if (Init.isInvalid()) return ExprError(); @@ -1612,7 +1612,7 @@ ExprResult Sema::BuildBlockForLambdaConversion(SourceLocation CurrentLocation, Src->getType(), CapVarTSI, SC_None); BlockDecl::Capture Capture(/*Variable=*/CapVar, /*ByRef=*/false, - /*Nested=*/false, /*Copy=*/Init.take()); + /*Nested=*/false, /*Copy=*/Init.get()); Block->setCaptures(Context, &Capture, &Capture + 1, /*CapturesCXXThis=*/false); |