aboutsummaryrefslogtreecommitdiff
path: root/lib/Sema/SemaPseudoObject.cpp
diff options
context:
space:
mode:
authorDouglas Gregor <dgregor@apple.com>2012-02-23 22:17:26 +0000
committerDouglas Gregor <dgregor@apple.com>2012-02-23 22:17:26 +0000
commit97df54e0c075bc8d6a869597e771dad0c11a2180 (patch)
tree5cb7cc543568fd24b656fc7ad89f5b45b7353cbe /lib/Sema/SemaPseudoObject.cpp
parent0227aded18df817bc50114a6c916fc564d3ee712 (diff)
Pull the OpaqueValueExpr's source expression into its constructor, so
that we can correctly compute value-dependence of the OVE. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@151291 91177308-0d34-0410-b5e6-96231b3b80d8
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);