diff options
Diffstat (limited to 'test/CXX/drs/dr22xx.cpp')
-rw-r--r-- | test/CXX/drs/dr22xx.cpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/test/CXX/drs/dr22xx.cpp b/test/CXX/drs/dr22xx.cpp index 021707d876..70a26db757 100644 --- a/test/CXX/drs/dr22xx.cpp +++ b/test/CXX/drs/dr22xx.cpp @@ -15,3 +15,14 @@ struct AnonBitfieldQualifiers { const volatile unsigned i3 : 1; }; } + +#if __cplusplus >= 201103L +namespace dr2211 { // dr2211: 8 +void f() { + int a; + auto f = [a](int a) { (void)a; }; // expected-error {{a lambda parameter cannot shadow an explicitly captured entity}} + // expected-note@-1{{variable 'a' is explicitly captured here}} + auto g = [=](int a) { (void)a; }; +} +} +#endif |