diff options
author | Sebastian Redl <sebastian.redl@getdesigned.at> | 2010-11-26 18:37:14 +0000 |
---|---|---|
committer | Sebastian Redl <sebastian.redl@getdesigned.at> | 2010-11-26 18:37:14 +0000 |
commit | 6abb078cc5d9999c3ba43cca89e199e6d54fa791 (patch) | |
tree | e1a6ccb8b95fb64f5eaae3b490e1c4de499ccd2c | |
parent | f9780007a9c31a46a025bdd3eaf5c2be31eb4c0e (diff) |
Forgot a file in r120182
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120184 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | test/CXX/class/class.nest/p1-cxx0x.cpp | 14 |
1 files changed, 14 insertions, 0 deletions
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 }} + }; +}; |