blob: 9cdd1d7c0eca6b38ce033dea656e298d3a8d48c9 [file] [log] [blame]
Douglas Gregorddc29e12009-02-06 22:42:48 +00001// RUN: clang -fsyntax-only -verify %s
Sebastian Redlab963c62008-11-08 15:40:37 +00002class C;
Argyrios Kyrtzidis4cc18a42008-06-24 22:12:16 +00003class C {
4public:
5protected:
6 typedef int A,B;
7 static int sf(), u;
8
9 struct S {};
10 enum {};
Douglas Gregor4920f1f2009-01-12 22:49:06 +000011 int; // expected-error {{declaration does not declare anything}}
Argyrios Kyrtzidis3a9fdb42008-06-28 08:10:48 +000012 int : 1, : 2;
Argyrios Kyrtzidis4cc18a42008-06-24 22:12:16 +000013
14public:
15 void m() {
16 int l = 2;
17 }
Sebastian Redlab963c62008-11-08 15:40:37 +000018 virtual int vf() const volatile = 0;
Argyrios Kyrtzidis4cc18a42008-06-24 22:12:16 +000019
20private:
21 int x,f(),y,g();
Sebastian Redlab963c62008-11-08 15:40:37 +000022 inline int h();
23 static const int sci = 10;
Sebastian Redl669d5d72008-11-14 23:42:31 +000024 mutable int mi;
Argyrios Kyrtzidis4cc18a42008-06-24 22:12:16 +000025};
Sebastian Redlab963c62008-11-08 15:40:37 +000026void glo()
27{
28 struct local {};
29}
Chris Lattnerbc8d5642008-12-18 01:12:00 +000030
31// PR3177
32typedef union {
33 __extension__ union {
34 int a;
35 float b;
36 } y;
37} bug3177;
38