ahatanak added a comment.

Thanks all for the review.



================
Comment at: cfe/trunk/test/SemaCXX/lambda-expressions.cpp:572
+void foo1() {
+  auto s0 = S1{[name=]() {}}; // expected-error 2 {{expected expression}}
+  auto s1 = S1{[name=name]() {}}; // expected-error {{use of undeclared 
identifier 'name'; did you mean 'name1'?}}
----------------
"expected expression" error is emitted twice because ParseInitializer() is 
called twice: first MayBeDesignationStart is called, and then it throws away 
what was parsed, and then ParseInitializer() is called the second time at 
Parser::ParseBraceInitializer:427.

I'm not sure what's the best way to fix this.


Repository:
  rL LLVM

https://reviews.llvm.org/D25206



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to