summaryrefslogtreecommitdiffstats
path: root/test/Parser/cxx2a-template-lambdas.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'test/Parser/cxx2a-template-lambdas.cpp')
-rw-r--r--test/Parser/cxx2a-template-lambdas.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/test/Parser/cxx2a-template-lambdas.cpp b/test/Parser/cxx2a-template-lambdas.cpp
new file mode 100644
index 0000000000..034a3b157d
--- /dev/null
+++ b/test/Parser/cxx2a-template-lambdas.cpp
@@ -0,0 +1,8 @@
+// RUN: %clang_cc1 -std=c++2a %s -verify
+
+auto L0 = []<> { }; //expected-error {{cannot be empty}}
+
+auto L1 = []<typename T1, typename T2> { };
+auto L2 = []<typename T1, typename T2>(T1 arg1, T2 arg2) -> T1 { };
+auto L3 = []<typename T>(auto arg) { T t; };
+auto L4 = []<int I>() { };