blob: 9c625d18c95c28750d3506b7436c36326f7724e1 [file] [log] [blame]
// RUN: clang-cc -fsyntax-only -verify %s
void f1() {
struct X {
struct Y;
};
struct X::Y {
void f() {}
};
}
void f2() {
struct X {
struct Y;
struct Y {
void f() {}
};
};
}
// A class nested within a local class is a local class.
void f3(int a) { // expected-note{{'a' declared here}}
struct X {
struct Y {
int f() { return a; } // expected-error{{reference to local variable 'a' declared in enclosed function 'f3'}}
};
};
}