From 6abb078cc5d9999c3ba43cca89e199e6d54fa791 Mon Sep 17 00:00:00 2001 From: Sebastian Redl Date: Fri, 26 Nov 2010 18:37:14 +0000 Subject: [PATCH] Forgot a file in r120182 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 | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 test/CXX/class/class.nest/p1-cxx0x.cpp diff --git a/test/CXX/class/class.nest/p1-cxx0x.cpp b/test/CXX/class/class.nest/p1-cxx0x.cpp new file mode 100644 index 0000000000..f8b06ac5f7 --- /dev/null +++ b/test/CXX/class/class.nest/p1-cxx0x.cpp @@ -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 }} + }; +}; -- 2.40.0