=?utf-8?q?Félix?= Cloutier <fclout...@apple.com>,
=?utf-8?q?Félix?= Cloutier <fclout...@apple.com>
Message-ID:
In-Reply-To: <llvm.org/llvm/llvm-project/pull/135...@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">;
----------------
apple-fcloutier wrote:

I find this format awkward when it doesn't have the source immediately after. 
For instance, [clang-tidy displays the note without the \<scratch buffer\> 
contents](https://github.com/llvm/llvm-project/pull/135864#discussion_r2054861426).
 I like the current wording because it feels complete even when that's missing. 
(I know the C++ diagnostics have lots of "found this candidate", "candidate 
ignored because ...", "in template instantiation requested here", etc, but I 
think that they are a necessary evil rather than the format to strive for.)

As I understand your concerns, the main problem with my wording is that it 
needs an adjective to qualify "string" with that is ideally something other 
than "constant" because it's not used in the standard sense.

"non-literal format string evaluated/resolved/computed at compile time"? Or do 
you see something else in that vein that would work? There is one other 
diagnostic that says "compile time constant expression" (and I'm OK dropping 
"constant expression" for all the reasons above).

https://github.com/llvm/llvm-project/pull/135864
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to