[clang] 4f5374b - [Clnag] Prefer octal to hex for printf
Aiden Grossman via cfe-commits
cfe-commits at lists.llvm.org
Sun Oct 19 20:09:47 PDT 2025
Author: Aiden Grossman
Date: 2025-10-20T03:09:39Z
New Revision: 4f5374bef554eb7f5429c1a86d90833e4a3c98de
URL: https://github.com/llvm/llvm-project/commit/4f5374bef554eb7f5429c1a86d90833e4a3c98de
DIFF: https://github.com/llvm/llvm-project/commit/4f5374bef554eb7f5429c1a86d90833e4a3c98de.diff
LOG: [Clnag] Prefer octal to hex for printf
The printf implementation on MacOS that gets picked up by the internal
shell does not support the \xff form as it is not mandated by POSIX.
Prefer octal which is supported and mandated by POSIX.
This is similar to c745c5497069a966a43e5ba03d137e0189921073.
Added:
Modified:
clang/test/Lexer/minimize_source_to_dependency_directives_utf8bom.c
Removed:
################################################################################
diff --git a/clang/test/Lexer/minimize_source_to_dependency_directives_utf8bom.c b/clang/test/Lexer/minimize_source_to_dependency_directives_utf8bom.c
index 46aba914441bc..6f574acab282e 100644
--- a/clang/test/Lexer/minimize_source_to_dependency_directives_utf8bom.c
+++ b/clang/test/Lexer/minimize_source_to_dependency_directives_utf8bom.c
@@ -1,5 +1,5 @@
// Test UTF8 BOM at start of file
-// RUN: printf '\xef\xbb\xbf' > %t.c
+// RUN: printf '\357\273\277' > %t.c
// RUN: echo '#ifdef TEST\n' >> %t.c
// RUN: echo '#include <string>' >> %t.c
// RUN: echo '#endif' >> %t.c
More information about the cfe-commits
mailing list