[clang] [clang][test] Fix test failures when LLVM_WINDOWS_PREFER_FORWARD_SLAS… (PR #193156)

Takuto Ikuta via cfe-commits cfe-commits at lists.llvm.org
Thu Apr 23 02:41:26 PDT 2026


================
@@ -820,8 +820,8 @@ TEST(ToolChainTest, ConfigInexistentInclude) {
 
 #ifdef _WIN32
   const char *TestRoot = "C:\\";
-#define USERCONFIG "C:\\home\\user\\test.cfg"
-#define UNEXISTENT "C:\\home\\user\\file.rsp"
+#define USERCONFIG "C:/home/user/test.cfg"
+#define UNEXISTENT "C:/home/user/file.rsp"
----------------
atetubou wrote:

As this is constant string defined by macro, we cannot replace `\` to `/` in the path. Or is it better to construct expected string dynamically instead of converting path separator in actual error message?

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


More information about the cfe-commits mailing list