forked from OSchip/llvm-project
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:
parent
35177d0fec
commit
80440deed4
|
@ -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();
|
||||
|
|
|
@ -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; }
|
||||
};
|
Loading…
Reference in New Issue