aboutsummaryrefslogtreecommitdiff
path: root/lib/Sema/SemaPseudoObject.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Sema/SemaPseudoObject.cpp')
-rw-r--r--lib/Sema/SemaPseudoObject.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/Sema/SemaPseudoObject.cpp b/lib/Sema/SemaPseudoObject.cpp
index fa56b258da..d5f1523f62 100644
--- a/lib/Sema/SemaPseudoObject.cpp
+++ b/lib/Sema/SemaPseudoObject.cpp
@@ -222,8 +222,8 @@ OpaqueValueExpr *PseudoOpBuilder::capture(Expr *e) {
// Make a new OVE whose source is the given expression.
OpaqueValueExpr *captured =
new (S.Context) OpaqueValueExpr(GenericLoc, e->getType(),
- e->getValueKind());
- captured->setSourceExpr(e);
+ e->getValueKind(), e->getObjectKind(),
+ e);
// Make sure we bind that in the semantics.
addSemanticExpr(captured);