зеркало из https://github.com/microsoft/clang-1.git
When rebuilding a MemberExpr that refers to an anonymous union, be
sure to perform derived-to-base conversions on the base expression. Fixes PR5868. Proper testcase is coming soon. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92139 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Родитель
f3c47c9525
Коммит
83a56c4a1d
|
@ -956,8 +956,11 @@ public:
|
|||
// We have a reference to an unnamed field.
|
||||
assert(!Qualifier && "Can't have an unnamed field with a qualifier!");
|
||||
|
||||
Expr *BaseExpr = Base.takeAs<Expr>();
|
||||
if (getSema().PerformObjectMemberConversion(BaseExpr, Member))
|
||||
return getSema().ExprError();
|
||||
MemberExpr *ME =
|
||||
new (getSema().Context) MemberExpr(Base.takeAs<Expr>(), isArrow,
|
||||
new (getSema().Context) MemberExpr(BaseExpr, isArrow,
|
||||
Member, MemberLoc,
|
||||
cast<FieldDecl>(Member)->getType());
|
||||
return getSema().Owned(ME);
|
||||
|
|
Загрузка…
Ссылка в новой задаче