sammccall added a comment.

Most of the new diagnostics look good, as you say.

I'm okay with the regression around foreach loops, given that:

- per rsmith, the mechanism behind this diagnostic was misdesigned (relying on 
initializer making things invalid)
- it's a C++-only features and we should be able to flip on recoveryexpr for 
C++ soon



================
Comment at: clang/test/SemaCXX/constant-expression-cxx11.cpp:880
 constexpr Base *nullB1 = 0;
-static_assert((Bottom*)nullB == 0, "");
-static_assert((Derived*)nullB == 0, "");
-static_assert((void*)(Bottom*)nullB == (void*)(Derived*)nullB, "");
+static_assert((Bottom*)nullB == 0, ""); // expected-error {{static_assert 
expression is not an integral constant expression}}
+static_assert((Derived*)nullB == 0, ""); // expected-error {{static_assert 
expression is not an integral constant expression}}
----------------
I'm not *sure* what the purpose of these test is, but my guess is they're 
mostly trying to test nullpointer comparisons not error recovery. maybe we 
should have 1 with nullB and the error, and the rest use nullB1? 


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D78116



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

Reply via email to