]> granicus.if.org Git - clang/commitdiff
Forgot a file in r120182
authorSebastian Redl <sebastian.redl@getdesigned.at>
Fri, 26 Nov 2010 18:37:14 +0000 (18:37 +0000)
committerSebastian Redl <sebastian.redl@getdesigned.at>
Fri, 26 Nov 2010 18:37:14 +0000 (18:37 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120184 91177308-0d34-0410-b5e6-96231b3b80d8

test/CXX/class/class.nest/p1-cxx0x.cpp [new file with mode: 0644]

diff --git a/test/CXX/class/class.nest/p1-cxx0x.cpp b/test/CXX/class/class.nest/p1-cxx0x.cpp
new file mode 100644 (file)
index 0000000..f8b06ac
--- /dev/null
@@ -0,0 +1,14 @@
+// RUN: %clang_cc1 -fsyntax-only -std=c++0x -verify %s
+
+class Outer {
+  int x;
+  static int sx;
+  int f();
+
+  // The first case is invalid in the C++03 mode but valid in C++0x (see 5.1.1.10).
+  class Inner {
+    static char a[sizeof(x)]; // okay
+    static char b[sizeof(sx)]; // okay
+    static char c[sizeof(f)]; // expected-error {{ call to non-static member function without an object argument }}
+  };
+};