Run DCE after a LoopFlatten test to reduce spurious output [nfc]
[llvm-project.git] / clang / test / CXX / class / class.local / p1-0x.cpp
blob096f5080099ec1b19467127a720da3e60ce75295
1 // RUN: %clang_cc1 -fsyntax-only -verify -std=c++11 %s
3 void f() {
4 int x = 3; // expected-note{{'x' declared here}}
5 const int c = 2;
6 struct C {
7 int& x2 = x; // expected-error{{reference to local variable 'x' declared in enclosing function 'f'}}
8 int cc = c;
9 };
10 (void)[]() mutable {
11 int x = 3; // expected-note{{'x' declared here}}
12 struct C {
13 int& x2 = x; // expected-error{{reference to local variable 'x' declared in enclosing lambda expression}}
14 }c; // expected-note {{required here}}
16 C(); // expected-note {{required here}}