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

Shafik Yaghmour via cfe-commits cfe-commits at lists.llvm.org
Tue Apr 15 19:04:12 PDT 2025


================
@@ -3,6 +3,11 @@
 // RUN: %clang_cc1 -fblocks -fsyntax-only -verify -Wformat-nonliteral -isystem %S/Inputs -triple=x86_64-unknown-fuchsia %s
 // RUN: %clang_cc1 -fblocks -fsyntax-only -verify -Wformat-nonliteral -isystem %S/Inputs -triple=x86_64-linux-android %s
 
+// expected-note at -5{{format string was constant-evaluated}}
+// ^^^ there will be a <scratch space> SourceLocation caused by the
----------------
shafik wrote:

I have to say, I don't like this at all.

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


More information about the cfe-commits mailing list