You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
19 lines
431 B
19 lines
431 B
// RUN: %clang_cc1 -fsyntax-only -verify %s
|
|
|
|
int x;
|
|
void f()
|
|
{
|
|
static int s;
|
|
int x; // expected-note{{'x' declared here}}
|
|
extern int g();
|
|
|
|
struct local {
|
|
int g() { return x; } // expected-error{{reference to local variable 'x' declared in enclosing function 'f'}}
|
|
int h() { return s; }
|
|
int k() { return :: x; }
|
|
int l() { return g(); }
|
|
};
|
|
}
|
|
|
|
local* p = 0; // expected-error{{unknown type name 'local'}}
|