xref: /minix3/external/bsd/llvm/dist/clang/test/CXX/class/class.nest/p1-cxx0x.cpp (revision f4a2713ac843a11c696ec80c0a5e3e5d80b4d338)
1*f4a2713aSLionel Sambuc // RUN: %clang_cc1 -fsyntax-only -std=c++11 -verify %s
2*f4a2713aSLionel Sambuc 
3*f4a2713aSLionel Sambuc class Outer {
4*f4a2713aSLionel Sambuc   int x;
5*f4a2713aSLionel Sambuc   static int sx;
6*f4a2713aSLionel Sambuc   int f();
7*f4a2713aSLionel Sambuc 
8*f4a2713aSLionel Sambuc   // The first case is invalid in the C++03 mode but valid in C++0x (see 5.1.1.10).
9*f4a2713aSLionel Sambuc   class Inner {
10*f4a2713aSLionel Sambuc     static char a[sizeof(x)]; // okay
11*f4a2713aSLionel Sambuc     static char b[sizeof(sx)]; // okay
12*f4a2713aSLionel Sambuc     static char c[sizeof(f)]; // expected-error {{call to non-static member function without an object argument}}
13*f4a2713aSLionel Sambuc   };
14*f4a2713aSLionel Sambuc };
15