Implement support for anonymous structs and unions in C. Both C and
C++ handle anonymous structs/unions in the same way. Addresses several
bugs:
<rdar://problem/6259534>
<rdar://problem/6481130>
<rdar://problem/6483159>
The test case in PR clang/1750 now passes with -fsyntax-only, but
CodeGen for inline assembler still fails.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62112 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/test/SemaCXX/anonymous-union.cpp b/test/SemaCXX/anonymous-union.cpp
index 872c45c..5860ed4 100644
--- a/test/SemaCXX/anonymous-union.cpp
+++ b/test/SemaCXX/anonymous-union.cpp
@@ -108,3 +108,6 @@
protected: float x2; // expected-error{{anonymous union cannot contain a protected data member}}
};
};
+
+// <rdar://problem/6481130>
+typedef union { }; // expected-error{{declaration does not declare anything}}