[cfe-commits] r120184 - /cfe/trunk/test/CXX/class/class.nest/p1-cxx0x.cpp
Sebastian Redl
sebastian.redl at getdesigned.at
Fri Nov 26 10:37:14 PST 2010
Author: cornedbee
Date: Fri Nov 26 12:37:14 2010
New Revision: 120184
URL: http://llvm.org/viewvc/llvm-project?rev=120184&view=rev
Log:
Forgot a file in r120182
Added:
cfe/trunk/test/CXX/class/class.nest/p1-cxx0x.cpp
Added: cfe/trunk/test/CXX/class/class.nest/p1-cxx0x.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CXX/class/class.nest/p1-cxx0x.cpp?rev=120184&view=auto
==============================================================================
--- cfe/trunk/test/CXX/class/class.nest/p1-cxx0x.cpp (added)
+++ cfe/trunk/test/CXX/class/class.nest/p1-cxx0x.cpp Fri Nov 26 12:37:14 2010
@@ -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 }}
+ };
+};
More information about the cfe-commits
mailing list