summaryrefslogtreecommitdiffstats
path: root/test/Parser/cxx-class.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'test/Parser/cxx-class.cpp')
-rw-r--r--test/Parser/cxx-class.cpp38
1 files changed, 38 insertions, 0 deletions
diff --git a/test/Parser/cxx-class.cpp b/test/Parser/cxx-class.cpp
new file mode 100644
index 0000000..ff452b9
--- /dev/null
+++ b/test/Parser/cxx-class.cpp
@@ -0,0 +1,38 @@
+// RUN: clang-cc -fsyntax-only -verify %s
+class C;
+class C {
+public:
+protected:
+ typedef int A,B;
+ static int sf(), u;
+
+ struct S {};
+ enum {};
+ int; // expected-error {{declaration does not declare anything}}
+ int : 1, : 2;
+
+public:
+ void m() {
+ int l = 2;
+ }
+ virtual int vf() const volatile = 0;
+
+private:
+ int x,f(),y,g();
+ inline int h();
+ static const int sci = 10;
+ mutable int mi;
+};
+void glo()
+{
+ struct local {};
+}
+
+// PR3177
+typedef union {
+ __extension__ union {
+ int a;
+ float b;
+ } y;
+} bug3177;
+
OpenPOWER on IntegriCloud