Revert "[Sema] Fix PR35832 - Ambiguity accessing anonymous struct/union with multiple bases."

This reverts commit r329519. There are some unaddressed test failures.

llvm-svn: 329520
This commit is contained in:
Eric Fiselier 2018-04-08 06:05:33 +00:00
parent 35177d0fec
commit 80440deed4
2 changed files with 1 additions and 20 deletions

View File

@ -848,7 +848,7 @@ Sema::BuildAnonymousStructUnionMemberReference(const CXXScopeSpec &SS,
// Build the first member access in the chain with full information.
result =
BuildFieldReferenceExpr(result, baseObjectIsPointer, SourceLocation(),
SS, field, foundDecl, memberNameInfo)
EmptySS, field, foundDecl, memberNameInfo)
.get();
if (!result)
return ExprError();

View File

@ -1,19 +0,0 @@
// RUN: %clang_cc1 -fsyntax-only -verify %s
// expected-no-diagnostics
class B {
public:
int i;
struct { struct { union { int j; }; }; };
};
class X : public B { };
class Y : public B { };
class Z : public X, Y {
public:
int a() { return X::i; }
int b() { return X::j; }
int c() { return this->X::j; }
};