diff options
Diffstat (limited to 'test/CXX/expr/expr.prim/expr.prim.lambda/generic-lambda-unimplemented-1y.cpp')
-rw-r--r-- | test/CXX/expr/expr.prim/expr.prim.lambda/generic-lambda-unimplemented-1y.cpp | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/test/CXX/expr/expr.prim/expr.prim.lambda/generic-lambda-unimplemented-1y.cpp b/test/CXX/expr/expr.prim/expr.prim.lambda/generic-lambda-unimplemented-1y.cpp new file mode 100644 index 0000000..7f42c39 --- /dev/null +++ b/test/CXX/expr/expr.prim/expr.prim.lambda/generic-lambda-unimplemented-1y.cpp @@ -0,0 +1,31 @@ +// RUN: %clang_cc1 -fsyntax-only -std=c++1y %s -verify +//expected-no-diagnostics +namespace lambda_capturing { +// FIXME: Once return type deduction is implemented for generic lambdas +// this will need to be updated. +void test() { + int i = 10; + { + auto L = [=](auto a) -> int { + return i + a; + }; + L(3); + } + { + auto L = [i](auto a) -> int { + return i + a; + }; + L(3); + } + { + auto L = [i=i](auto a) -> int { + return i + a; + }; + L(3); + } + + +} + +} + |