[clang] Update remaining tests for usage of CLANG_RESOURCE_DIR (PR #202475)

Yaxun Liu via cfe-commits cfe-commits at lists.llvm.org
Tue Jun 9 08:13:47 PDT 2026


================
@@ -4,14 +4,14 @@
 // Test standard include paths
 // -----------------------------------------------------------------------------
 // RUN: %clang -### --target=hexagon-none-elf --cstdlib=picolibc \
-// RUN:   -ccc-install-dir %S/Inputs/hexagon_tree/Tools/bin %s 2>&1 | FileCheck -check-prefix=CHECK-C-INCLUDES %s
-// CHECK-C-INCLUDES: "-cc1" {{.*}} "-internal-isystem" "{{.*}}{{/|\\\\}}lib{{/|\\\\}}clang{{/|\\\\}}{{[0-9]+}}{{/|\\\\}}include"
+// RUN:   -ccc-install-dir %S/Inputs/hexagon_tree/Tools/bin %s 2>&1 | FileCheck -check-prefix=CHECK-C-INCLUDES -DRESOURCE_DIR=%clang-resource-dir %s
+// CHECK-C-INCLUDES: "-cc1" {{.*}} "-internal-isystem" "[[RESOURCE_DIR]]/include"
----------------
yxsamliu wrote:

This direct `%clang-resource-dir` check does not work for `-###` output on Windows. The substitution gives a raw path like `C:\...\clang\23`, but `-###` prints escaped paths like `C:\\...\\clang\\23\\include`. Could we capture `RESOURCE_DIR` from the `"-resource-dir"` argument in this output and reuse it for the include path check? That should work for both Windows and Linux.

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


More information about the cfe-commits mailing list