Douglas Gregor | d9949ab | 2009-08-28 22:03:51 +0000 | [diff] [blame] | 1 | // RUN: clang-cc -fsyntax-only %s |
2 | |||||
3 | // FIXME: We need to test anonymous structs/unions in templates for real. | ||||
4 | |||||
5 | template <typename T> class A { struct { }; }; | ||||
6 | |||||
7 | A<int> a0; | ||||
8 | |||||
Anders Carlsson | 20c5514 | 2009-09-01 04:26:58 +0000 | [diff] [blame^] | 9 | template <typename T> struct B { |
10 | union { | ||||
11 | int a; | ||||
12 | void* b; | ||||
13 | }; | ||||
14 | |||||
15 | void f() { | ||||
16 | a = 10; | ||||
17 | b = 0; | ||||
18 | } | ||||
19 | }; | ||||
20 | |||||
21 | B<int> b0; |