cjdb added inline comments.

================
Comment at: clang/test/SemaCXX/warn-constant-evaluated-constexpr.cpp:38
 constexpr int fn5() {
-  if constexpr (__builtin_is_constant_evaluated()) // expected-warning 
{{'__builtin_is_constant_evaluated' will always evaluate to 'true' in a 
manifestly constant-evaluated expression}}
+  if constexpr (__builtin_is_constant_evaluated()) // expected-warning 
{{'__builtin_is_constant_evaluated' will always evaluate to true in this 
context}}
     return 0;
----------------
This should also generate a fix-it hint, since we can automate the fix.


================
Comment at: clang/test/SemaCXX/warn-tautological-meta-constant.cpp:18
+  } else {
+    if constexpr (std::is_constant_evaluated()) { // expected-warning {{always 
evaluate to true}}
+      return 0;
----------------
I'm not a fan of this diagnostic text: it doesn't offer insight into what's 
gone wrong or provide actionable feedback on how to fix the code.


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

https://reviews.llvm.org/D155064

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

Reply via email to