diff options
Diffstat (limited to 'test/CXX/expr/expr.prim/expr.prim.lambda/p8.cpp')
-rw-r--r-- | test/CXX/expr/expr.prim/expr.prim.lambda/p8.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/test/CXX/expr/expr.prim/expr.prim.lambda/p8.cpp b/test/CXX/expr/expr.prim/expr.prim.lambda/p8.cpp index d1384f1..b9b8cd7 100644 --- a/test/CXX/expr/expr.prim/expr.prim.lambda/p8.cpp +++ b/test/CXX/expr/expr.prim/expr.prim.lambda/p8.cpp @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -std=c++11 %s -verify +// RUN: %clang_cc1 -std=c++11 %s -verify -Wno-c++1y-extensions class X0 { void explicit_capture() { @@ -26,4 +26,7 @@ void S2::f(int i) { (void)[=, this]{ }; // expected-error{{'this' cannot be explicitly captured}} (void)[=]{ this->g(i); }; (void)[i, i]{ }; // expected-error{{'i' can appear only once in a capture list}} + (void)[i(0), i(1)]{ }; // expected-error{{'i' can appear only once in a capture list}} + (void)[i, i(1)]{ }; // expected-error{{'i' can appear only once in a capture list}} + (void)[i(0), i]{ }; // expected-error{{'i' can appear only once in a capture list}} } |