aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorRichard Smith <richard-llvm@metafoo.co.uk>2011-10-25 06:33:21 +0000
committerRichard Smith <richard-llvm@metafoo.co.uk>2011-10-25 06:33:21 +0000
commita01c71191c93691e592c030cc48764e52272eea5 (patch)
treed9902e2f23f8e511d4201bfed0940d08fab23c87 /lib
parent3045ce71304ec8ddef34ced5ee9fa9303f12432e (diff)
Don't forget the lvalue-to-rvalue conversion on the LHS when instantiating a
dependent ->, where the member being referred to is an anonymous struct or union. This path was missed by the fix in r142890. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142910 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib')
-rw-r--r--lib/Sema/TreeTransform.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/Sema/TreeTransform.h b/lib/Sema/TreeTransform.h
index 46bd05b14b..3c118cb423 100644
--- a/lib/Sema/TreeTransform.h
+++ b/lib/Sema/TreeTransform.h
@@ -1482,6 +1482,11 @@ public:
FoundDecl, Member);
if (BaseResult.isInvalid())
return ExprError();
+ if (isArrow) {
+ BaseResult = getSema().DefaultLvalueConversion(BaseResult.take());
+ if (BaseResult.isInvalid())
+ return ExprError();
+ }
Base = BaseResult.take();
ExprValueKind VK = isArrow ? VK_LValue : Base->getValueKind();
MemberExpr *ME =