Fixes llvm.org/PR42778
llvm-svn: 367346
case tok::amp:
case tok::kw_this:
+ case tok::star:
case tok::identifier:
// We have to do additional analysis, because these could be the
// start of a constant expression or a lambda capture list.
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}}