diff options
Diffstat (limited to 'gcc/testsuite/g++.dg/cpp0x/lambda/lambda-shadow1.C')
-rw-r--r-- | gcc/testsuite/g++.dg/cpp0x/lambda/lambda-shadow1.C | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-shadow1.C b/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-shadow1.C new file mode 100644 index 00000000000..bb06bfe4afa --- /dev/null +++ b/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-shadow1.C @@ -0,0 +1,9 @@ +// PR c++/55357 +// { dg-options "-std=c++11 -Wshadow" } + +int main() { + int x = 1; // { dg-warning "shadowed" } + auto const lambda = [](int x) { // { dg-warning "shadows" } + return x; + }; +} |