[clang] [clang] Constant-evaluate format strings as last resort (PR #135864)

Hubert Tong via cfe-commits cfe-commits at lists.llvm.org
Tue Apr 22 16:09:00 PDT 2025


=?utf-8?q?F=C3=A9lix?= Cloutier <fcloutier at apple.com>,
=?utf-8?q?F=C3=A9lix?= Cloutier <fcloutier at apple.com>
Message-ID:
In-Reply-To: <llvm.org/llvm/llvm-project/pull/135864 at github.com>


================
@@ -10170,6 +10170,8 @@ def warn_format_bool_as_character : Warning<
   "using '%0' format specifier, but argument has boolean value">,
   InGroup<Format>;
 def note_format_string_defined : Note<"format string is defined here">;
+def note_format_string_evaluated_to : Note<
+  "format string was constant-evaluated">;
----------------
hubert-reinterpretcast wrote:

> "non-literal format string evaluated/resolved/computed at compile time"

"computed format string for diagnostic purposes"?

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


More information about the cfe-commits mailing list