1762bb9d0ad20320b9f97a841dce57ba5e8e48b07Richard Smith// RUN: %clang_cc1 -fsyntax-only -std=c++11 -verify %s 26abb078cc5d9999c3ba43cca89e199e6d54fa791Sebastian Redl 36abb078cc5d9999c3ba43cca89e199e6d54fa791Sebastian Redlclass Outer { 46abb078cc5d9999c3ba43cca89e199e6d54fa791Sebastian Redl int x; 56abb078cc5d9999c3ba43cca89e199e6d54fa791Sebastian Redl static int sx; 66abb078cc5d9999c3ba43cca89e199e6d54fa791Sebastian Redl int f(); 76abb078cc5d9999c3ba43cca89e199e6d54fa791Sebastian Redl 86abb078cc5d9999c3ba43cca89e199e6d54fa791Sebastian Redl // The first case is invalid in the C++03 mode but valid in C++0x (see 5.1.1.10). 96abb078cc5d9999c3ba43cca89e199e6d54fa791Sebastian Redl class Inner { 106abb078cc5d9999c3ba43cca89e199e6d54fa791Sebastian Redl static char a[sizeof(x)]; // okay 116abb078cc5d9999c3ba43cca89e199e6d54fa791Sebastian Redl static char b[sizeof(sx)]; // okay 126abb078cc5d9999c3ba43cca89e199e6d54fa791Sebastian Redl static char c[sizeof(f)]; // expected-error {{ call to non-static member function without an object argument }} 136abb078cc5d9999c3ba43cca89e199e6d54fa791Sebastian Redl }; 146abb078cc5d9999c3ba43cca89e199e6d54fa791Sebastian Redl}; 15