diff options
Diffstat (limited to 'test/CXX/expr/expr.prim/expr.prim.lambda/p2-template-parameter.cpp')
-rw-r--r-- | test/CXX/expr/expr.prim/expr.prim.lambda/p2-template-parameter.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/test/CXX/expr/expr.prim/expr.prim.lambda/p2-template-parameter.cpp b/test/CXX/expr/expr.prim/expr.prim.lambda/p2-template-parameter.cpp new file mode 100644 index 000000000000..f120a63badcb --- /dev/null +++ b/test/CXX/expr/expr.prim/expr.prim.lambda/p2-template-parameter.cpp @@ -0,0 +1,7 @@ +// RUN: %clang_cc1 -std=c++17 %s -verify + +template<auto> struct Nothing {}; + +void pr33696() { + Nothing<[]() { return 0; }()> nothing; // expected-error{{a lambda expression cannot appear in this context}} +} |