Run DCE after a LoopFlatten test to reduce spurious output [nfc]
[llvm-project.git] / clang / test / CXX / class / class.local / p3.cpp
blob3753790384962358f6d4db73f9416930dc24cae2
1 // RUN: %clang_cc1 -fsyntax-only -verify %s
3 void f1() {
4 struct X {
5 struct Y;
6 };
8 struct X::Y {
9 void f() {}
13 void f2() {
14 struct X {
15 struct Y;
17 struct Y {
18 void f() {}
23 // A class nested within a local class is a local class.
24 void f3(int a) { // expected-note{{'a' declared here}}
25 struct X {
26 struct Y {
27 int f() { return a; } // expected-error{{reference to local variable 'a' declared in enclosing function 'f3'}}