hubert.reinterpretcast added a comment.

@aaron.ballman, I haven't had a chance to look at the code in detail yet, but I 
would like to get on the same page about the error/warning behaviour.

In the older modes, we stay conforming either

- by producing the warning (when we know the user said they wanted the function 
to be `constexpr`) and letting the code through or
- by doing what the older document says because a warning is inappropriate at 
the point of the check and we have no mechanism developed (including for other 
similar cases) for producing the warning only when semantically significant 
later.

In C++2b, the `-Wc++20-compat` warning is produced for the places where we warn 
above and is not produced for the places where we don't warn above.

Considering that the warning would be something like "this function is not 
implicitly constexpr in C++20 but is so in C++23", and we probably will have a 
lot of such cases for other reasons, I can buy that people are not interested 
in such a warning.



================
Comment at: clang/test/CXX/basic/basic.types/p10.cpp:23
 extern BeingDefined beingdefined;
-struct BeingDefined { 
+struct BeingDefined {
   static constexpr BeingDefined& t = beingdefined;
----------------
Seems like the only change in this file is drive-by NFC. Can this be pulled out 
of this patch?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D111400

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

Reply via email to