1f4a2713aSLionel Sambuc // RUN: %clang_cc1 -std=c++11 -fsyntax-only -verify -pedantic %s 2f4a2713aSLionel Sambuc // expected-no-diagnostics 3f4a2713aSLionel Sambuc 4f4a2713aSLionel Sambuc namespace PR12866 { 5f4a2713aSLionel Sambuc struct bar { 6f4a2713aSLionel Sambuc union { 7f4a2713aSLionel Sambuc int member; 8f4a2713aSLionel Sambuc }; 9f4a2713aSLionel Sambuc }; 10f4a2713aSLionel Sambuc foo(void)11f4a2713aSLionel Sambuc void foo( void ) { 12f4a2713aSLionel Sambuc (void)sizeof(bar::member); 13f4a2713aSLionel Sambuc } 14f4a2713aSLionel Sambuc } 15*0a6a1f1dSLionel Sambuc 16*0a6a1f1dSLionel Sambuc namespace PR20021 { 17*0a6a1f1dSLionel Sambuc class C { 18*0a6a1f1dSLionel Sambuc union { 19*0a6a1f1dSLionel Sambuc static_assert(true, ""); 20*0a6a1f1dSLionel Sambuc int i; 21*0a6a1f1dSLionel Sambuc }; 22*0a6a1f1dSLionel Sambuc }; 23*0a6a1f1dSLionel Sambuc } 24