[clang] [clang][CodeView] Prevent the input name from appearing in LF_BUILDINFO (PR #194140)

Alexandre Ganea via cfe-commits cfe-commits at lists.llvm.org
Sun Apr 26 09:50:01 PDT 2026


================
@@ -45,3 +57,14 @@ int main(void) { return 42; }
 // MESSAGELEN: ============================================================
 // MESSAGELEN: 0x{{.+}} | LF_BUILDINFO [size = {{.+}}]
 // MESSAGELEN-NOT: -fmessage-length
+
+// The cmdline LF_STRING_ID quotes each cc1 arg, so a leaked source
+// positional appears as a quoted token. The FILEPATH LF_STRING_ID prints
+// the path without surrounding quotes, so it won't trigger the negative.
+// ABSPATH:     0x{{.+}} | LF_STRING_ID [size = {{.+}}] ID: <no type>, String: "-cc1
+// ABSPATH-NOT: "{{[^"]*[\\/]codeview-buildinfo\.c}}"
+// ABSPATH:     0x{{.+}} | LF_BUILDINFO [size = {{.+}}]
----------------
aganea wrote:

As suggested.

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


More information about the cfe-commits mailing list