aboutsummaryrefslogtreecommitdiff
path: root/test/CXX/class/class.nest/p1.cpp
blob: 49e1bd235396122b827bbc0d474f36e2b06d7de0 (plain)
1
2
3
4
5
6
7
8
9
10
11
// RUN: clang-cc -fsyntax-only -verify %s

class Outer {
  int x;
  static int sx;

  class Inner {
    static char a[sizeof(x)]; // expected-error {{ invalid use of nonstatic data member 'x' }}
    static char b[sizeof(sx)]; // okay
  };
};