[clang] [clang] implement current direction of CWG2765 for string literal comparisons in constant evaluation (PR #109208)

Erich Keane via cfe-commits cfe-commits at lists.llvm.org
Thu Sep 19 12:02:44 PDT 2024


================
@@ -74,6 +74,22 @@ C++ Specific Potentially Breaking Changes
     template <typename T>
     void f();
 
+- During constant evaluation, comparisons between different evaluations of the
+  same string literal are now correctly treated as non-constant, and comparisons
+  between string literals that cannot possibly overlap in memory are now treated
+  as constant.
----------------
erichkeane wrote:

Could you mention the CWG issue here as well?

https://github.com/llvm/llvm-project/pull/109208


More information about the cfe-commits mailing list