cor3ntin added inline comments.
================
Comment at: clang/lib/Parse/ParseStmt.cpp:2200
         Diag(Tok, diag::err_expected_semi_for);
-      else
-        // Skip until semicolon or rparen, don't consume it.
----------------
shafik wrote:
> Can you explain why you removed this?
The current diagnostics are pretty bad https://godbolt.org/z/z9odv3zjb - this 
fixes that


================
Comment at: clang/test/Parser/cxx0x-for-range.cpp:67
+    int a[] = {1, 2, 3, 4, 5};
+    for (auto x = n ? 1 : 2 : a); // expected-error {{expected ';' in 'for' 
statement specifier}} \
+                                  // expected-error {{expected expression}}
----------------
shafik wrote:
> Did you try dropping the `;` at the end of this line to make sure it still 
> does what we expect?
yup, you think it's worth adding a test?


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D152009/new/

https://reviews.llvm.org/D152009

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

Reply via email to