Run DCE after a LoopFlatten test to reduce spurious output [nfc]
[llvm-project.git] / clang / test / CXX / class / class.local / p1.cpp
blob62ade5cb8846195e1b934f3b49f13ca33598cb2f
1 // RUN: %clang_cc1 -fsyntax-only -verify %s
3 int x;
4 void f()
6 static int s;
7 int x; // expected-note{{'x' declared here}}
8 extern int g();
10 struct local {
11 int g() { return x; } // expected-error{{reference to local variable 'x' declared in enclosing function 'f'}}
12 int h() { return s; }
13 int k() { return :: x; }
14 int l() { return g(); }
18 local* p = 0; // expected-error{{unknown type name 'local'}}