diff options
Diffstat (limited to 'test/CXX/expr')
-rw-r--r-- | test/CXX/expr/expr.prim/expr.prim.lambda/default-arguments.cpp | 2 | ||||
-rw-r--r-- | test/CXX/expr/expr.prim/expr.prim.lambda/p5.cpp | 8 |
2 files changed, 4 insertions, 6 deletions
diff --git a/test/CXX/expr/expr.prim/expr.prim.lambda/default-arguments.cpp b/test/CXX/expr/expr.prim/expr.prim.lambda/default-arguments.cpp index 5dac886d4d..38d5d0a6cd 100644 --- a/test/CXX/expr/expr.prim/expr.prim.lambda/default-arguments.cpp +++ b/test/CXX/expr/expr.prim/expr.prim.lambda/default-arguments.cpp @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -fsyntax-only -std=c++11 %s -Wno-lambda-extensions -verify +// RUN: %clang_cc1 -fsyntax-only -std=c++11 %s -verify void defargs() { auto l1 = [](int i, int j = 17, int k = 18) { return i + j + k; }; diff --git a/test/CXX/expr/expr.prim/expr.prim.lambda/p5.cpp b/test/CXX/expr/expr.prim/expr.prim.lambda/p5.cpp index 9dffc1ff26..dc2c209af2 100644 --- a/test/CXX/expr/expr.prim/expr.prim.lambda/p5.cpp +++ b/test/CXX/expr/expr.prim/expr.prim.lambda/p5.cpp @@ -39,12 +39,10 @@ void test_quals() { bogus_override_if_virtual<decltype(l)> bogus; } -// Default arguments (8.3.6) shall not be specified in the -// parameter-declaration-clause of a lambda- declarator. -// Note: Removed by core issue 974. +// Core issue 974: default arguments (8.3.6) may be specified in the +// parameter-declaration-clause of a lambda-declarator. int test_default_args() { - return [](int i = 5, // expected-warning{{C++11 forbids default arguments for lambda expressions}} - int j = 17) { return i+j;}(5, 6); + return [](int i = 5, int j = 17) { return i+j;}(5, 6); } // Any exception-specification specified on a lambda-expression |