summaryrefslogtreecommitdiffstats
path: root/test/CXX/class/class.local/p4.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'test/CXX/class/class.local/p4.cpp')
-rw-r--r--test/CXX/class/class.local/p4.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/test/CXX/class/class.local/p4.cpp b/test/CXX/class/class.local/p4.cpp
new file mode 100644
index 0000000..40702ad
--- /dev/null
+++ b/test/CXX/class/class.local/p4.cpp
@@ -0,0 +1,10 @@
+// RUN: clang-cc -fsyntax-only -verify %s
+
+void f() {
+ struct X {
+ static int a; // expected-error {{static data member 'a' not allowed in local class 'X'}}
+ int b;
+
+ static void f() { }
+ };
+} \ No newline at end of file
OpenPOWER on IntegriCloud