[clang] [clang] implement current direction of CWG2765 for string literal comparisons in constant evaluation (PR #109208)
Aaron Ballman via cfe-commits
cfe-commits at lists.llvm.org
Thu Sep 19 05:13:24 PDT 2024
================
@@ -96,6 +96,8 @@ def note_constexpr_pointer_constant_comparison : Note<
"at runtime">;
def note_constexpr_literal_comparison : Note<
"comparison of addresses of literals has unspecified value">;
+def note_constexpr_opaque_call_comparison : Note<
+ "comparison against opaque constant has unspecified value">;
----------------
AaronBallman wrote:
Yeah, opaque constant is pretty opaque, but I'm struggling to think of a better way to phrase this. It only triggers when calling a builtin which forms an address constant.
Mayyyybbbe: comparison against an anonymous object with a constant address has unspecified value
? (or maybe 'unnamed' instead of 'anonymous')
https://github.com/llvm/llvm-project/pull/109208
More information about the cfe-commits
mailing list