Daniel Dunbar | d7d5f02 | 2009-03-24 02:24:46 +0000 | [diff] [blame] | 1 | // RUN: clang-cc -fsyntax-only -verify %s |
Sebastian Redl | ab963c6 | 2008-11-08 15:40:37 +0000 | [diff] [blame] | 2 | class C; |
Argyrios Kyrtzidis | 4cc18a4 | 2008-06-24 22:12:16 +0000 | [diff] [blame] | 3 | class C { |
4 | public: | ||||
5 | protected: | ||||
6 | typedef int A,B; | ||||
7 | static int sf(), u; | ||||
8 | |||||
9 | struct S {}; | ||||
10 | enum {}; | ||||
Douglas Gregor | 4920f1f | 2009-01-12 22:49:06 +0000 | [diff] [blame] | 11 | int; // expected-error {{declaration does not declare anything}} |
Argyrios Kyrtzidis | 3a9fdb4 | 2008-06-28 08:10:48 +0000 | [diff] [blame] | 12 | int : 1, : 2; |
Argyrios Kyrtzidis | 4cc18a4 | 2008-06-24 22:12:16 +0000 | [diff] [blame] | 13 | |
14 | public: | ||||
15 | void m() { | ||||
16 | int l = 2; | ||||
17 | } | ||||
Sebastian Redl | ab963c6 | 2008-11-08 15:40:37 +0000 | [diff] [blame] | 18 | virtual int vf() const volatile = 0; |
Argyrios Kyrtzidis | 4cc18a4 | 2008-06-24 22:12:16 +0000 | [diff] [blame] | 19 | |
20 | private: | ||||
21 | int x,f(),y,g(); | ||||
Sebastian Redl | ab963c6 | 2008-11-08 15:40:37 +0000 | [diff] [blame] | 22 | inline int h(); |
23 | static const int sci = 10; | ||||
Sebastian Redl | 669d5d7 | 2008-11-14 23:42:31 +0000 | [diff] [blame] | 24 | mutable int mi; |
Argyrios Kyrtzidis | 4cc18a4 | 2008-06-24 22:12:16 +0000 | [diff] [blame] | 25 | }; |
Sebastian Redl | ab963c6 | 2008-11-08 15:40:37 +0000 | [diff] [blame] | 26 | void glo() |
27 | { | ||||
28 | struct local {}; | ||||
29 | } | ||||
Chris Lattner | bc8d564 | 2008-12-18 01:12:00 +0000 | [diff] [blame] | 30 | |
31 | // PR3177 | ||||
32 | typedef union { | ||||
33 | __extension__ union { | ||||
34 | int a; | ||||
35 | float b; | ||||
36 | } y; | ||||
37 | } bug3177; | ||||
38 |