From c7df5c77fa6a5e002655af0888cf209777539bd2 Mon Sep 17 00:00:00 2001 From: Eric Fiselier Date: Sun, 8 Apr 2018 06:05:33 +0000 Subject: [PATCH] Revert "[Sema] Fix PR35832 - Ambiguity accessing anonymous struct/union with multiple bases." This reverts commit r329519. There are some unaddressed test failures. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@329520 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Sema/SemaExprMember.cpp | 2 +- test/SemaCXX/PR35832.cpp | 19 ------------------- 2 files changed, 1 insertion(+), 20 deletions(-) delete mode 100644 test/SemaCXX/PR35832.cpp diff --git a/lib/Sema/SemaExprMember.cpp b/lib/Sema/SemaExprMember.cpp index 680ca99d66..c737d7bfd4 100644 --- a/lib/Sema/SemaExprMember.cpp +++ b/lib/Sema/SemaExprMember.cpp @@ -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(); diff --git a/test/SemaCXX/PR35832.cpp b/test/SemaCXX/PR35832.cpp deleted file mode 100644 index 67dd3c1dfa..0000000000 --- a/test/SemaCXX/PR35832.cpp +++ /dev/null @@ -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; } -}; -- 2.40.0