1// RUN: %clang_cc1 -fsyntax-only -verify %s
2
3int x;
4void f()
5{
6  static int s;
7  int x; // expected-note{{'x' declared here}}
8  extern int g();
9
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(); }
15  };
16}
17
18local* p = 0; // expected-error{{unknown type name 'local'}}
19