diff options
Diffstat (limited to 'lib/AST/ExprCXX.cpp')
-rw-r--r-- | lib/AST/ExprCXX.cpp | 11 |
1 files changed, 0 insertions, 11 deletions
diff --git a/lib/AST/ExprCXX.cpp b/lib/AST/ExprCXX.cpp index a13d6f79c8..069404aa7c 100644 --- a/lib/AST/ExprCXX.cpp +++ b/lib/AST/ExprCXX.cpp @@ -905,26 +905,15 @@ LambdaExpr::Capture::Capture(SourceLocation Loc, bool Implicit, case LCK_ByRef: assert(Var && "capture must have a variable!"); break; - - case LCK_Init: - llvm_unreachable("don't use this constructor for an init-capture"); } DeclAndBits.setInt(Bits); } -LambdaExpr::Capture::Capture(FieldDecl *Field) - : DeclAndBits(Field, - Field->getType()->isReferenceType() ? 0 : Capture_ByCopy), - Loc(Field->getLocation()), EllipsisLoc() {} - LambdaCaptureKind LambdaExpr::Capture::getCaptureKind() const { Decl *D = DeclAndBits.getPointer(); if (!D) return LCK_This; - if (isa<FieldDecl>(D)) - return LCK_Init; - return (DeclAndBits.getInt() & Capture_ByCopy) ? LCK_ByCopy : LCK_ByRef; } |