* c-c++-common/array-init.c: Add dg-prune-output. * g++.dg/cpp0x/lambda/lambda-const-this.C: Add dg-warning. * g++.dg/cpp0x/lambda/lambda-in-class-neg.C: Likewise. * g++.dg/cpp0x/lambda/lambda-in-class.C: Likewise. * g++.dg/cpp0x/lambda/lambda-nested.C: Likewise. * g++.dg/cpp0x/lambda/lambda-nsdmi1.C: Likewise. * g++.dg/cpp0x/lambda/lambda-nsdmi4.C: Likewise. * g++.dg/cpp0x/lambda/lambda-this.C: Likewise. * g++.dg/cpp0x/lambda/lambda-this17.C: Likewise. * g++.dg/cpp0x/lambda/lambda-this18.C: Likewise. * g++.dg/cpp0x/lambda/lambda-this2.C: Likewise. * g++.dg/cpp0x/lambda/lambda-this8.C: Likewise. * g++.dg/cpp1y/pr64382.C: Likewise. * g++.dg/cpp1y/pr77739.C: Likewise. * g++.dg/cpp1z/lambda-this1.C: Likewise. * g++.dg/cpp1z/lambda-this2.C: Likewise. * g++.dg/template/crash84.C: Adjust dg-error. From-SVN: r264169
18 lines
315 B
C
18 lines
315 B
C
// PR c++/43856
|
|
// Test for implicit 'this' capture via rewriting.
|
|
// { dg-do compile { target c++11 } }
|
|
|
|
struct S1 {
|
|
int operator()(int);
|
|
int i;
|
|
void g();
|
|
void f() {
|
|
[=]() { // { dg-warning "implicit capture" "" { target c++2a } }
|
|
i;
|
|
g();
|
|
S1::g();
|
|
operator()(42);
|
|
};
|
|
}
|
|
};
|