1 // RUN: %clang_cc1 -std=c++11 %s -verify
3 void test_reaching_scope() {
4 int local
; // expected-note{{declared here}}
5 static int local_static
;
10 return local
+ // expected-error{{reference to local variable 'local' declared in enclosing function 'test_reaching_scope'}}