blob: d265dd757398e89b08e770010562f060507d9af8 [file] [log] [blame]
Douglas Gregorf02455e2012-02-10 09:26:04 +00001// RUN: %clang_cc1 -std=c++11 %s -verify
2
3void test_reaching_scope() {
4 int local; // expected-note{{declared here}}
5 static int local_static;
6 (void)[=]() {
7 struct InnerLocal {
8 void member() {
9 (void)[=]() {
10 return local + // expected-error{{reference to local variable 'local' declared in enclosing function 'test_reaching_scope'}}
11 local_static;
12 };
13 }
14 };
15 };
16}