summaryrefslogtreecommitdiffstats
path: root/clang/lib/AST/ExprCXX.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'clang/lib/AST/ExprCXX.cpp')
-rw-r--r--clang/lib/AST/ExprCXX.cpp11
1 files changed, 0 insertions, 11 deletions
diff --git a/clang/lib/AST/ExprCXX.cpp b/clang/lib/AST/ExprCXX.cpp
index a13d6f79c86..069404aa7cb 100644
--- a/clang/lib/AST/ExprCXX.cpp
+++ b/clang/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;
}
OpenPOWER on IntegriCloud