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

Eric Fiselier via cfe-commits cfe-commits at lists.llvm.org
Sat Apr 7 23:05:34 PDT 2018


Author: ericwf
Date: Sat Apr  7 23:05:33 2018
New Revision: 329520

URL: http://llvm.org/viewvc/llvm-project?rev=329520&view=rev
Log:
Revert "[Sema] Fix PR35832 - Ambiguity accessing anonymous struct/union with multiple bases."

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

Removed:
    cfe/trunk/test/SemaCXX/PR35832.cpp
Modified:
    cfe/trunk/lib/Sema/SemaExprMember.cpp

Modified: cfe/trunk/lib/Sema/SemaExprMember.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/SemaExprMember.cpp?rev=329520&r1=329519&r2=329520&view=diff
==============================================================================
--- cfe/trunk/lib/Sema/SemaExprMember.cpp (original)
+++ cfe/trunk/lib/Sema/SemaExprMember.cpp Sat Apr  7 23:05:33 2018
@@ -848,7 +848,7 @@ Sema::BuildAnonymousStructUnionMemberRef
     // 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();

Removed: cfe/trunk/test/SemaCXX/PR35832.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/SemaCXX/PR35832.cpp?rev=329519&view=auto
==============================================================================
--- cfe/trunk/test/SemaCXX/PR35832.cpp (original)
+++ cfe/trunk/test/SemaCXX/PR35832.cpp (removed)
@@ -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; }
-};




More information about the cfe-commits mailing list