diff options
author | John McCall <rjmccall@apple.com> | 2011-02-21 05:25:38 +0000 |
---|---|---|
committer | John McCall <rjmccall@apple.com> | 2011-02-21 05:25:38 +0000 |
commit | 7cc25fe47290dc302157e15b04a1f95395f43ab5 (patch) | |
tree | 924395564143a287dd81183bf5047954711e1527 /lib/CodeGen/CGExpr.cpp | |
parent | 30decb84883d3676f347bfe50f8eb8f5f62e447d (diff) |
Bind references to opaque r-values correctly. Add a few test cases
for ?: on record types.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126113 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/CGExpr.cpp')
-rw-r--r-- | lib/CodeGen/CGExpr.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/CodeGen/CGExpr.cpp b/lib/CodeGen/CGExpr.cpp index 1b7e7a007e..5d69aad42f 100644 --- a/lib/CodeGen/CGExpr.cpp +++ b/lib/CodeGen/CGExpr.cpp @@ -260,6 +260,10 @@ EmitExprForReferenceBinding(CodeGenFunction &CGF, const Expr *E, } } + if (const OpaqueValueExpr *opaque = dyn_cast<OpaqueValueExpr>(E)) + if (opaque->getType()->isRecordType()) + return CGF.EmitOpaqueValueLValue(opaque).getAddress(); + // Nothing changed. break; } |