summaryrefslogtreecommitdiffstats
path: root/clang/test/Parser/cxx0x-lambda-expressions.cpp
diff options
context:
space:
mode:
authorErik Pilkington <erik.pilkington@gmail.com>2019-07-30 19:21:20 +0000
committerErik Pilkington <erik.pilkington@gmail.com>2019-07-30 19:21:20 +0000
commitbe19c48f6d6b7dd8e4c94dc15eba6963fa22fd10 (patch)
tree0ae699d28781e47f370d4622e93858831c930589 /clang/test/Parser/cxx0x-lambda-expressions.cpp
parentd2254dbf21a3243233b75294ef901086199df1b9 (diff)
downloadbcm5719-llvm-be19c48f6d6b7dd8e4c94dc15eba6963fa22fd10.tar.gz
bcm5719-llvm-be19c48f6d6b7dd8e4c94dc15eba6963fa22fd10.zip
[Parser] Lambda capture lists can start with '*'
Fixes llvm.org/PR42778 llvm-svn: 367346
Diffstat (limited to 'clang/test/Parser/cxx0x-lambda-expressions.cpp')
-rw-r--r--clang/test/Parser/cxx0x-lambda-expressions.cpp13
1 files changed, 13 insertions, 0 deletions
diff --git a/clang/test/Parser/cxx0x-lambda-expressions.cpp b/clang/test/Parser/cxx0x-lambda-expressions.cpp
index b297d7356ca..2acd8144b7a 100644
--- a/clang/test/Parser/cxx0x-lambda-expressions.cpp
+++ b/clang/test/Parser/cxx0x-lambda-expressions.cpp
@@ -126,6 +126,19 @@ void PR22122() {
template void PR22122<int>();
+namespace PR42778 {
+struct A {
+ template <class F> A(F&&) {}
+};
+
+struct S {
+ void mf() { A{[*this]{}}; }
+#if __cplusplus < 201703L
+ // expected-warning@-2 {{C++17 extension}}
+#endif
+};
+}
+
struct S {
template <typename T>
void m (T x =[0); // expected-error{{expected variable name or 'this' in lambda capture list}}
OpenPOWER on IntegriCloud