From 6bb836af2a60a11580c97c92487e4cf644ca051a Mon Sep 17 00:00:00 2001 From: Gulfem Savrun Yeniceri Date: Thu, 24 Mar 2022 18:10:08 +0000 Subject: [PATCH] Revert "[clang][deps] NFC: De-duplicate clang-cl tests" This reverts commit 30cb49b44e4e2af2e0627b2aa33df0ba57ab9e55. It caused test failures on Fuchsia Toolchain Mac builds: https://luci-milo.appspot.com/ui/p/fuchsia/builders/toolchain.ci/clang-mac-x64/b8818888168677577537/overview --- .../Inputs/has_include_if_elif.json | 5 ++ .../Inputs/header_stat_before_open_cdb.json | 5 ++ .../Inputs/headerwithdirname.json | 5 ++ .../headerwithdirnamefollowedbyinclude.json | 5 ++ .../Inputs/modules_cdb_clangcl.json | 22 +++++ .../modules_cdb_clangcl_by_mod_name.json | 12 +++ .../test/ClangScanDeps/Inputs/no-werror.json | 5 ++ .../Inputs/regular_cdb_clangcl.json | 17 ++++ .../Inputs/static-analyzer-cdb.json | 5 ++ .../Inputs/target-filename-cdb.json | 40 +++++++++ .../ClangScanDeps/Inputs/vfsoverlay_cdb.json | 5 ++ clang/test/ClangScanDeps/cl-output.c | 87 ------------------- clang/test/ClangScanDeps/cl-resource-dir.c | 34 -------- clang/test/ClangScanDeps/cl-xclang.c | 20 ----- clang/test/ClangScanDeps/error.cpp | 5 ++ .../ClangScanDeps/has_include_if_elif.cpp | 7 ++ .../ClangScanDeps/header_stat_before_open.m | 6 ++ .../test/ClangScanDeps/headerwithdirname.cpp | 5 ++ .../headerwithdirnamefollowedbyinclude.cpp | 5 ++ .../modules-fmodule-name-no-module-built.m | 2 +- .../modules-full-by-mod-name.cpp | 5 ++ clang/test/ClangScanDeps/modules-full.cpp | 15 ++-- clang/test/ClangScanDeps/modules.cpp | 13 +++ clang/test/ClangScanDeps/no-werror.cpp | 4 + clang/test/ClangScanDeps/regular_cdb.cpp | 18 ++++ clang/test/ClangScanDeps/static-analyzer.c | 4 + .../ClangScanDeps/strip_diag_serialize.cpp | 1 + clang/test/ClangScanDeps/target-filename.cpp | 24 +++++ clang/test/ClangScanDeps/vfsoverlay.cpp | 5 ++ 29 files changed, 239 insertions(+), 147 deletions(-) create mode 100644 clang/test/ClangScanDeps/Inputs/modules_cdb_clangcl.json create mode 100644 clang/test/ClangScanDeps/Inputs/modules_cdb_clangcl_by_mod_name.json create mode 100644 clang/test/ClangScanDeps/Inputs/regular_cdb_clangcl.json delete mode 100644 clang/test/ClangScanDeps/cl-output.c delete mode 100644 clang/test/ClangScanDeps/cl-resource-dir.c delete mode 100644 clang/test/ClangScanDeps/cl-xclang.c diff --git a/clang/test/ClangScanDeps/Inputs/has_include_if_elif.json b/clang/test/ClangScanDeps/Inputs/has_include_if_elif.json index 36ca006b0329..8fcc7ea34a9b 100644 --- a/clang/test/ClangScanDeps/Inputs/has_include_if_elif.json +++ b/clang/test/ClangScanDeps/Inputs/has_include_if_elif.json @@ -3,5 +3,10 @@ "directory": "DIR", "command": "clang -E DIR/has_include_if_elif2.cpp -IInputs", "file": "DIR/has_include_if_elif2.cpp" +}, +{ + "directory": "DIR", + "command": "clang-cl /E /IInputs -- DIR/has_include_if_elif2_clangcl.cpp", + "file": "DIR/has_include_if_elif2_clangcl.cpp" } ] diff --git a/clang/test/ClangScanDeps/Inputs/header_stat_before_open_cdb.json b/clang/test/ClangScanDeps/Inputs/header_stat_before_open_cdb.json index c5f027e9fd28..b99b541b1298 100644 --- a/clang/test/ClangScanDeps/Inputs/header_stat_before_open_cdb.json +++ b/clang/test/ClangScanDeps/Inputs/header_stat_before_open_cdb.json @@ -3,5 +3,10 @@ "directory": "DIR", "command": "clang -E DIR/header_stat_before_open_input.m -iframework Inputs/frameworks", "file": "DIR/header_stat_before_open_input.m" +}, +{ + "directory": "DIR", + "command": "clang-cl /E -Xclang -iframework -Xclang Inputs/frameworks -- DIR/header_stat_before_open_input_clangcl.m", + "file": "DIR/header_stat_before_open_input_clangcl.m" } ] diff --git a/clang/test/ClangScanDeps/Inputs/headerwithdirname.json b/clang/test/ClangScanDeps/Inputs/headerwithdirname.json index 2ae561935bec..ac12c92308fd 100644 --- a/clang/test/ClangScanDeps/Inputs/headerwithdirname.json +++ b/clang/test/ClangScanDeps/Inputs/headerwithdirname.json @@ -3,5 +3,10 @@ "directory": "DIR", "command": "clang -c -IDIR -IDIR/foodir -IInputs DIR/headerwithdirname_input.cpp", "file": "DIR/headerwithdirname_input.cpp" + }, + { + "directory": "DIR", + "command": "clang-cl /c /IDIR /IDIR/foodir -IInputs -- DIR/headerwithdirname_input_clangcl.cpp", + "file": "DIR/headerwithdirname_input_clangcl.cpp" } ] diff --git a/clang/test/ClangScanDeps/Inputs/headerwithdirnamefollowedbyinclude.json b/clang/test/ClangScanDeps/Inputs/headerwithdirnamefollowedbyinclude.json index de7759d0b110..1886328a9c3e 100644 --- a/clang/test/ClangScanDeps/Inputs/headerwithdirnamefollowedbyinclude.json +++ b/clang/test/ClangScanDeps/Inputs/headerwithdirnamefollowedbyinclude.json @@ -3,5 +3,10 @@ "directory": "DIR", "command": "clang -c -IDIR -IInputs DIR/headerwithdirname_input.cpp", "file": "DIR/headerwithdirname_input.cpp" + }, + { + "directory": "DIR", + "command": "clang-cl /c /IDIR /IInputs -- DIR/headerwithdirname_input_clangcl.cpp", + "file": "DIR/headerwithdirname_input_clangcl.cpp" } ] diff --git a/clang/test/ClangScanDeps/Inputs/modules_cdb_clangcl.json b/clang/test/ClangScanDeps/Inputs/modules_cdb_clangcl.json new file mode 100644 index 000000000000..a1f12867c45d --- /dev/null +++ b/clang/test/ClangScanDeps/Inputs/modules_cdb_clangcl.json @@ -0,0 +1,22 @@ +[ +{ + "directory": "DIR", + "command": "clang-cl /E /IInputs /D INCLUDE_HEADER2 /clang:-MD /clang:-MF /clang:DIR/modules_cdb2_clangcl.d /clang:-fmodules /clang:-fcxx-modules /clang:-fmodules-cache-path=DIR/module-cache_clangcl /clang:-fimplicit-modules /clang:-fimplicit-module-maps -- DIR/modules_cdb_input2.cpp", + "file": "DIR/modules_cdb_input2.cpp" +}, +{ + "directory": "DIR", + "command": "clang-cl /E /IInputs /clang:-fmodules /clang:-fcxx-modules /clang:-fmodules-cache-path=DIR/module-cache_clangcl /clang:-fimplicit-modules /clang:-fimplicit-module-maps -- DIR/modules_cdb_input.cpp", + "file": "DIR/modules_cdb_input.cpp" +}, +{ + "directory": "DIR", + "command": "clang-cl /E /IInputs /clang:-fmodules /clang:-fcxx-modules /clang:-fmodules-cache-path=DIR/module-cache_clangcl /clang:-fimplicit-modules /clang:-fimplicit-module-maps -o a.o -- DIR/modules_cdb_input.cpp", + "file": "DIR/modules_cdb_input.cpp" +}, +{ + "directory": "DIR", + "command": "clang-cl /E /IInputs /clang:-fmodules /clang:-fcxx-modules /clang:-fmodules-cache-path=DIR/module-cache_clangcl /clang:-fimplicit-modules /clang:-fimplicit-module-maps -o b.o -- DIR/modules_cdb_input.cpp", + "file": "DIR/modules_cdb_input.cpp" +} +] diff --git a/clang/test/ClangScanDeps/Inputs/modules_cdb_clangcl_by_mod_name.json b/clang/test/ClangScanDeps/Inputs/modules_cdb_clangcl_by_mod_name.json new file mode 100644 index 000000000000..ef44985a8f91 --- /dev/null +++ b/clang/test/ClangScanDeps/Inputs/modules_cdb_clangcl_by_mod_name.json @@ -0,0 +1,12 @@ +[ +{ + "directory": "DIR", + "command": "clang-cl /E /IInputs /D INCLUDE_HEADER2 /clang:-MD /clang:-MF /clang:DIR/modules_cdb2_clangcl.d /clang:-fmodules /clang:-fcxx-modules /clang:-fmodules-cache-path=DIR/module-cache_clangcl /clang:-fimplicit-modules /clang:-fimplicit-module-maps /clang:-x /clang:c++ --", + "file": "" +}, +{ + "directory": "DIR", + "command": "clang-cl /E /IInputs /clang:-fmodules /clang:-fcxx-modules /clang:-fmodules-cache-path=DIR/module-cache_clangcl /clang:-fimplicit-modules /clang:-fimplicit-module-maps /clang:-x /clang:c++ --", + "file": "" +}, +] diff --git a/clang/test/ClangScanDeps/Inputs/no-werror.json b/clang/test/ClangScanDeps/Inputs/no-werror.json index 2d1f46cf3af2..7438b670e853 100644 --- a/clang/test/ClangScanDeps/Inputs/no-werror.json +++ b/clang/test/ClangScanDeps/Inputs/no-werror.json @@ -3,5 +3,10 @@ "directory": "DIR", "command": "clang -E DIR/no-werror_input.cpp -IInputs -std=c++17 -Weverything -Werror", "file": "DIR/no-werror.cpp" +}, +{ + "directory": "DIR", + "command": "clang-cl /E /IInputs /std:c++17 -Weverything -Werror -- DIR/no-werror_input_clangcl.cpp", + "file": "DIR/no-werror_clangcl.cpp" } ] diff --git a/clang/test/ClangScanDeps/Inputs/regular_cdb_clangcl.json b/clang/test/ClangScanDeps/Inputs/regular_cdb_clangcl.json new file mode 100644 index 000000000000..bdb84bc9172f --- /dev/null +++ b/clang/test/ClangScanDeps/Inputs/regular_cdb_clangcl.json @@ -0,0 +1,17 @@ +[ +{ + "directory": "DIR", + "command": "clang --driver-mode=cl /E /IInputs /D INCLUDE_HEADER2 /clang:-MD /clang:-MF /clang:DIR/regular_cdb2_clangcl.d -- DIR/regular_cdb_input2.cpp", + "file": "DIR/regular_cdb_input2.cpp" +}, +{ + "directory": "DIR", + "command": "clang-cl /E /IInputs -- DIR/regular_cdb_input.cpp", + "file": "DIR/regular_cdb_input.cpp" +}, +{ + "directory": "DIR", + "command": "clang-cl /E /IInputs /Foadena.o -- DIR/regular_cdb_input.cpp", + "file": "DIR/regular_cdb_input.cpp" +} +] diff --git a/clang/test/ClangScanDeps/Inputs/static-analyzer-cdb.json b/clang/test/ClangScanDeps/Inputs/static-analyzer-cdb.json index 2f126aaa8572..a375f457aecb 100644 --- a/clang/test/ClangScanDeps/Inputs/static-analyzer-cdb.json +++ b/clang/test/ClangScanDeps/Inputs/static-analyzer-cdb.json @@ -3,5 +3,10 @@ "directory": "DIR", "command": "clang --analyze DIR/static-analyzer_clang.c", "file": "DIR/static-analyzer_clang.c" +}, +{ + "directory": "DIR", + "command": "clang-cl --analyze -- DIR/static-analyzer_clangcl.c", + "file": "DIR/static-analyzer_clangcl.c" } ] diff --git a/clang/test/ClangScanDeps/Inputs/target-filename-cdb.json b/clang/test/ClangScanDeps/Inputs/target-filename-cdb.json index 8aede7c6d970..90a3c81e57f4 100644 --- a/clang/test/ClangScanDeps/Inputs/target-filename-cdb.json +++ b/clang/test/ClangScanDeps/Inputs/target-filename-cdb.json @@ -23,5 +23,45 @@ "directory": "DIR", "command": "clang-cl /E -- DIR/target-filename_input.cpp", "file": "DIR/target-filename_input.cpp" +}, +{ + "directory": "DIR", + "command": "clang-cl /E -o clangcl-a.o -- DIR/target-filename_input.cpp", + "file": "DIR/target-filename_input.cpp" +}, +{ + "directory": "DIR", + "command": "clang-cl /E -oclangcl-b.o -- DIR/target-filename_input.cpp", + "file": "DIR/target-filename_input.cpp" +}, +{ + "directory": "DIR", + "command": "clang-cl /E /o clangcl-c.o -- DIR/target-filename_input.cpp", + "file": "DIR/target-filename_input.cpp" +}, +{ + "directory": "DIR", + "command": "clang-cl /E /oclangcl-d.o -- DIR/target-filename_input.cpp", + "file": "DIR/target-filename_input.cpp" +}, +{ + "directory": "DIR", + "command": "clang-cl /E /Foclangcl-e.o -- DIR/target-filename_input.cpp", + "file": "DIR/target-filename_input.cpp" +}, +{ + "directory": "DIR", + "command": "clang-cl /E -o clangcl-firstf.o -o clangcl-lastf.o -- DIR/target-filename_input.cpp", + "file": "DIR/target-filename_input.cpp" +}, +{ + "directory": "DIR", + "command": "clang-cl /E /oclangcl-firstg.o /Foclangcl-lastg.o -- DIR/target-filename_input.cpp", + "file": "DIR/target-filename_input.cpp" +}, +{ + "directory": "DIR", + "command": "clang-cl /E /Foclangcl-firsth.o -o clangcl-midh.o /oclangcl-lasth.o -- DIR/target-filename_input.cpp", + "file": "DIR/target-filename_input.cpp" } ] diff --git a/clang/test/ClangScanDeps/Inputs/vfsoverlay_cdb.json b/clang/test/ClangScanDeps/Inputs/vfsoverlay_cdb.json index ad21e52b600c..1b501fa7af41 100644 --- a/clang/test/ClangScanDeps/Inputs/vfsoverlay_cdb.json +++ b/clang/test/ClangScanDeps/Inputs/vfsoverlay_cdb.json @@ -4,4 +4,9 @@ "command": "clang -E DIR/vfsoverlay_input.cpp -IInputs -ivfsoverlay DIR/vfsoverlay.yaml", "file": "DIR/vfsoverlay_input.cpp" }, +{ + "directory": "DIR", + "command": "clang-cl /E /IInputs -Xclang -ivfsoverlay -Xclang DIR/vfsoverlay.yaml -- DIR/vfsoverlay_input_clangcl.cpp", + "file": "DIR/vfsoverlay_input_clangcl.cpp" +} ] diff --git a/clang/test/ClangScanDeps/cl-output.c b/clang/test/ClangScanDeps/cl-output.c deleted file mode 100644 index 102499191d30..000000000000 --- a/clang/test/ClangScanDeps/cl-output.c +++ /dev/null @@ -1,87 +0,0 @@ -// This test checks that the output path is correctly deduced/recognized in clang-cl mode. - -// RUN: rm -rf %t -// RUN: split-file %s %t - -//--- deduce-cdb.json.template -[{ - "file": "DIR/test.c", - "directory": "DIR", - "command": "clang --driver-mode=cl /c -- DIR/test.c" -},{ - "file": "DIR/test.c", - "directory": "DIR", - "command": "clang-cl /c -- DIR/test.c" -}] - -//--- recognize-cdb.json.template -[{ - "file": "DIR/test.c", - "directory": "DIR", - "command": "clang-cl /c -o DIR/test.o -- DIR/test.c" -},{ - "file": "DIR/test.c", - "directory": "DIR", - "command": "clang-cl /c /o DIR/test.o -- DIR/test.c" -},{ - "file": "DIR/test.c", - "directory": "DIR", - "command": "clang-cl /c -oDIR/test.o -- DIR/test.c" -},{ - "file": "DIR/test.c", - "directory": "DIR", - "command": "clang-cl /c /oDIR/test.o -- DIR/test.c" -},{ - "file": "DIR/test.c", - "directory": "DIR", - "command": "clang-cl /c -FoDIR/test.o -- DIR/test.c" -},{ - "file": "DIR/test.c", - "directory": "DIR", - "command": "clang-cl /c /FoDIR/test.o -- DIR/test.c" -}] - -//--- last-arg-cdb.json.template -[{ - "file": "DIR/test.c", - "directory": "DIR", - "command": "clang-cl /c -o DIR/test.o -o DIR/last.o -- DIR/test.c" -}] - -//--- test.c - -// Check that missing output path is deduced (with both clang-cl executable and driver mode flag): -// -// RUN: sed -e "s|DIR|%/t|g" %t/deduce-cdb.json.template > %t/deduce-cdb.json -// RUN: clang-scan-deps -compilation-database %t/deduce-cdb.json -j 1 > %t/deduce-result.d -// RUN: cat %t/deduce-result.d | sed 's:\\\\\?:/:g' | FileCheck %s -DPREFIX=%/t --check-prefix=CHECK-DEDUCE -// CHECK-DEDUCE: test.obj: -// CHECK-DEDUCE-NEXT: [[PREFIX]]/test.c -// CHECK-DEDUCE-NEXT: test.obj: -// CHECK-DEDUCE-NEXT: [[PREFIX]]/test.c - -// Check that all the different ways to specify output file are recognized: -// -// RUN: sed -e "s|DIR|%/t|g" %t/recognize-cdb.json.template > %t/recognize-cdb.json -// RUN: clang-scan-deps -compilation-database %t/recognize-cdb.json -j 1 > %t/recognize-result.d -// RUN: cat %t/recognize-result.d | sed 's:\\\\\?:/:g' | FileCheck %s -DPREFIX=%/t --check-prefix=CHECK-RECOGNIZE -// CHECK-RECOGNIZE: [[PREFIX]]/test.o: -// CHECK-RECOGNIZE-NEXT: [[PREFIX]]/test.c -// CHECK-RECOGNIZE-NEXT: [[PREFIX]]/test.o: -// CHECK-RECOGNIZE-NEXT: [[PREFIX]]/test.c -// CHECK-RECOGNIZE-NEXT: [[PREFIX]]/test.o: -// CHECK-RECOGNIZE-NEXT: [[PREFIX]]/test.c -// CHECK-RECOGNIZE-NEXT: [[PREFIX]]/test.o: -// CHECK-RECOGNIZE-NEXT: [[PREFIX]]/test.c -// CHECK-RECOGNIZE-NEXT: [[PREFIX]]/test.o: -// CHECK-RECOGNIZE-NEXT: [[PREFIX]]/test.c -// CHECK-RECOGNIZE-NEXT: [[PREFIX]]/test.o: -// CHECK-RECOGNIZE-NEXT: [[PREFIX]]/test.c - -// Check that the last argument specifying the output path wins. -// -// RUN: sed -e "s|DIR|%/t|g" %t/last-arg-cdb.json.template > %t/last-arg-cdb.json -// RUN: clang-scan-deps -compilation-database %t/last-arg-cdb.json > %t/last-arg-result.d -// RUN: cat %t/last-arg-result.d | sed 's:\\\\\?:/:g' | FileCheck %s -DPREFIX=%/t --check-prefix=CHECK-LAST -// CHECK-LAST: [[PREFIX]]/last.o: -// CHECK-LAST-NEXT: [[PREFIX]]/test.c diff --git a/clang/test/ClangScanDeps/cl-resource-dir.c b/clang/test/ClangScanDeps/cl-resource-dir.c deleted file mode 100644 index 043405291fbd..000000000000 --- a/clang/test/ClangScanDeps/cl-resource-dir.c +++ /dev/null @@ -1,34 +0,0 @@ -// This test checks that the clang-cl compiler is correctly invoked to deduce resource directory. - -// REQUIRES: shell - -// RUN: rm -rf %t -// RUN: split-file %s %t - -//--- cdb.json.template -[{ - "file": "DIR/test.c", - "directory": "DIR", - "command": "DIR/clang-cl /c /o DIR/test.o -- DIR/test.c" -}] - -//--- clang-cl -#!/bin/sh - -# This is a fake compiler that should be invoked the clang-cl way to print the resource directory. - -if [ "$1" = "/clang:-print-resource-dir" ]; then - echo "/pass" -else - echo "/fail" -fi; - -//--- test.c - -// RUN: chmod +x %t/clang-cl -// RUN: sed -e "s|DIR|%/t|g" %t/cdb.json.template > %t/cdb.json -// RUN: clang-scan-deps -compilation-database %t/cdb.json --resource-dir-recipe invoke-compiler \ -// RUN: --format experimental-full > %t/result.json -// RUN: cat %t/result.json | sed 's:\\\\\?:/:g' | FileCheck %s -// CHECK: "-resource-dir" -// CHECK-NEXT: "/pass" diff --git a/clang/test/ClangScanDeps/cl-xclang.c b/clang/test/ClangScanDeps/cl-xclang.c deleted file mode 100644 index 416e5de465c1..000000000000 --- a/clang/test/ClangScanDeps/cl-xclang.c +++ /dev/null @@ -1,20 +0,0 @@ -// This test checks that '-Xclang' arguments are ignored during the clang-cl command line adjustment. -// This prevents interpreting '-Xclang -I -Xclang /opt/include' as '/o pt/include' (output path). - -// RUN: rm -rf %t -// RUN: split-file %s %t - -//--- cdb.json.template -[{ - "file": "DIR/test.c", - "directory": "DIR", - "command": "clang-cl /c /o DIR/test.o -Xclang -I -Xclang /opt/include -- DIR/test.c" -}] - -//--- test.c - -// RUN: sed -e "s|DIR|%/t|g" %t/cdb.json.template > %t/cdb.json -// RUN: clang-scan-deps -compilation-database %t/cdb.json > %t/result.d -// RUN: cat %t/result.d | sed 's:\\\\\?:/:g' | FileCheck %s -DPREFIX=%/t -// CHECK: [[PREFIX]]/test.o: -// CHECK-NEXT: [[PREFIX]]/test.c diff --git a/clang/test/ClangScanDeps/error.cpp b/clang/test/ClangScanDeps/error.cpp index 1a717bacd757..d94ba4c03e50 100644 --- a/clang/test/ClangScanDeps/error.cpp +++ b/clang/test/ClangScanDeps/error.cpp @@ -3,11 +3,16 @@ // RUN: mkdir -p %t.dir // RUN: cp %s %t.dir/regular_cdb_input.cpp // RUN: sed -e "s|DIR|%/t.dir|g" %S/Inputs/regular_cdb.json > %t.cdb +// RUN: sed -e "s|DIR|%/t.dir|g" %S/Inputs/regular_cdb_clangcl.json > %t_clangcl.cdb // // RUN: not clang-scan-deps -compilation-database %t.cdb -j 1 2>%t.dir/errs // RUN: echo EOF >> %t.dir/errs // RUN: FileCheck %s --input-file %t.dir/errs +// RUN: not clang-scan-deps -compilation-database %t_clangcl.cdb -j 1 2>%t.dir/errs_clangcl +// RUN: echo EOF >> %t.dir/errs_clangcl +// RUN: FileCheck %s --input-file %t.dir/errs_clangcl + #include "missing.h" // CHECK: Error while scanning dependencies diff --git a/clang/test/ClangScanDeps/has_include_if_elif.cpp b/clang/test/ClangScanDeps/has_include_if_elif.cpp index dd56ecac69db..17eda40c1662 100644 --- a/clang/test/ClangScanDeps/has_include_if_elif.cpp +++ b/clang/test/ClangScanDeps/has_include_if_elif.cpp @@ -2,6 +2,7 @@ // RUN: rm -rf %t.cdb // RUN: mkdir -p %t.dir // RUN: cp %s %t.dir/has_include_if_elif2.cpp +// RUN: cp %s %t.dir/has_include_if_elif2_clangcl.cpp // RUN: mkdir %t.dir/Inputs // RUN: cp %S/Inputs/header.h %t.dir/Inputs/header.h // RUN: cp %S/Inputs/header.h %t.dir/Inputs/header2.h @@ -36,3 +37,9 @@ // CHECK-NEXT: Inputs{{/|\\}}header2.h // CHECK-NEXT: Inputs{{/|\\}}header3.h // CHECK-NEXT: Inputs{{/|\\}}header4.h + +// CHECK: has_include_if_elif2_clangcl.cpp +// CHECK-NEXT: Inputs{{/|\\}}header.h +// CHECK-NEXT: Inputs{{/|\\}}header2.h +// CHECK-NEXT: Inputs{{/|\\}}header3.h +// CHECK-NEXT: Inputs{{/|\\}}header4.h diff --git a/clang/test/ClangScanDeps/header_stat_before_open.m b/clang/test/ClangScanDeps/header_stat_before_open.m index f9f7d240f2c1..ce6f58f434ae 100644 --- a/clang/test/ClangScanDeps/header_stat_before_open.m +++ b/clang/test/ClangScanDeps/header_stat_before_open.m @@ -2,6 +2,7 @@ // RUN: rm -rf %t.cdb // RUN: mkdir -p %t.dir // RUN: cp %s %t.dir/header_stat_before_open_input.m +// RUN: cp %s %t.dir/header_stat_before_open_input_clangcl.m // RUN: mkdir %t.dir/Inputs // RUN: cp -R %S/Inputs/frameworks %t.dir/Inputs/frameworks // RUN: sed -e "s|DIR|%/t.dir|g" %S/Inputs/header_stat_before_open_cdb.json > %t.cdb @@ -16,3 +17,8 @@ // CHECK-NEXT: header_stat_before_open_input.m // CHECK-NEXT: Inputs{{/|\\}}frameworks{{/|\\}}Framework.framework{{/|\\}}Headers{{/|\\}}Framework.h // CHECK-NEXT: Inputs{{/|\\}}frameworks{{/|\\}}Framework.framework{{/|\\}}PrivateHeaders{{/|\\}}PrivateHeader.h + +// CHECK: header_stat_before_open_input_clangcl.o +// CHECK-NEXT: header_stat_before_open_input_clangcl.m +// CHECK-NEXT: Inputs{{/|\\}}frameworks{{/|\\}}Framework.framework{{/|\\}}Headers{{/|\\}}Framework.h +// CHECK-NEXT: Inputs{{/|\\}}frameworks{{/|\\}}Framework.framework{{/|\\}}PrivateHeaders{{/|\\}}PrivateHeader.h diff --git a/clang/test/ClangScanDeps/headerwithdirname.cpp b/clang/test/ClangScanDeps/headerwithdirname.cpp index 5eb4aaabc1bd..02b03926c553 100644 --- a/clang/test/ClangScanDeps/headerwithdirname.cpp +++ b/clang/test/ClangScanDeps/headerwithdirname.cpp @@ -4,6 +4,7 @@ // RUN: mkdir -p %t.dir // RUN: mkdir -p %t.dir/foodir // RUN: cp %s %t.dir/headerwithdirname_input.cpp +// RUN: cp %s %t.dir/headerwithdirname_input_clangcl.cpp // RUN: mkdir %t.dir/Inputs // RUN: cp %S/Inputs/foodir %t.dir/Inputs/foodir // RUN: sed -e "s|DIR|%/t.dir|g" %S/Inputs/headerwithdirname.json > %t.cdb @@ -15,3 +16,7 @@ // CHECK: headerwithdirname_input{{\.o|.*\.s}} // CHECK-NEXT: headerwithdirname_input.cpp // CHECK-NEXT: Inputs{{/|\\}}foodir + +// CHECK: headerwithdirname_input_clangcl.o +// CHECK-NEXT: headerwithdirname_input_clangcl.cpp +// CHECK-NEXT: Inputs{{/|\\}}foodir diff --git a/clang/test/ClangScanDeps/headerwithdirnamefollowedbyinclude.cpp b/clang/test/ClangScanDeps/headerwithdirnamefollowedbyinclude.cpp index 82d0f5bd0b26..f67b12787bd7 100644 --- a/clang/test/ClangScanDeps/headerwithdirnamefollowedbyinclude.cpp +++ b/clang/test/ClangScanDeps/headerwithdirnamefollowedbyinclude.cpp @@ -7,6 +7,7 @@ // RUN: cp %S/Inputs/header.h %t.dir/foodir/foodirheader.h // RUN: cp %s %t.dir/headerwithdirname_input.cpp +// RUN: cp %s %t.dir/headerwithdirname_input_clangcl.cpp // RUN: mkdir %t.dir/Inputs // RUN: cp %S/Inputs/foodir %t.dir/Inputs/foodir // RUN: sed -e "s|DIR|%/t.dir|g" %S/Inputs/headerwithdirnamefollowedbyinclude.json > %t.cdb @@ -19,3 +20,7 @@ // CHECK: headerwithdirname_input{{\.o|.*\.s}} // CHECK-NEXT: headerwithdirname_input.cpp // CHECK-NEXT: Inputs{{/|\\}}foodir + +// CHECK: headerwithdirname_input_clangcl.o +// CHECK-NEXT: headerwithdirname_input_clangcl.cpp +// CHECK-NEXT: Inputs{{/|\\}}foodir diff --git a/clang/test/ClangScanDeps/modules-fmodule-name-no-module-built.m b/clang/test/ClangScanDeps/modules-fmodule-name-no-module-built.m index f49a56665720..518d7040facd 100644 --- a/clang/test/ClangScanDeps/modules-fmodule-name-no-module-built.m +++ b/clang/test/ClangScanDeps/modules-fmodule-name-no-module-built.m @@ -43,7 +43,7 @@ // CHECK-NEXT: "command-line": [ // CHECK: "-fno-implicit-modules" // CHECK-NEXT: "-fno-implicit-module-maps" -// CHECK-NEXT: "-fmodule-file=[[PREFIX]]/module-cache/[[HASH_H2]]/header2-{{[A-Z0-9]+}}.pcm" +// CHECK-NEXT: "-fmodule-file=[[PREFIX]]/module-cache{{(_clangcl)?}}/[[HASH_H2]]/header2-{{[A-Z0-9]+}}.pcm" // CHECK-NEXT: ], // CHECK-NEXT: "file-deps": [ // CHECK-NEXT: "[[PREFIX]]/modules-fmodule-name-no-module-built.m" diff --git a/clang/test/ClangScanDeps/modules-full-by-mod-name.cpp b/clang/test/ClangScanDeps/modules-full-by-mod-name.cpp index 561fe6614c6b..f5d957ffc7a7 100644 --- a/clang/test/ClangScanDeps/modules-full-by-mod-name.cpp +++ b/clang/test/ClangScanDeps/modules-full-by-mod-name.cpp @@ -9,10 +9,15 @@ // RUN: cp %S/Inputs/header2.h %t.dir/Inputs/header2.h // RUN: cp %S/Inputs/module.modulemap %t.dir/Inputs/module.modulemap // RUN: sed -e "s|DIR|%/t.dir|g" %S/Inputs/modules_cdb_by_mod_name.json > %t.cdb +// RUN: sed -e "s|DIR|%/t.dir|g" %S/Inputs/modules_cdb_clangcl_by_mod_name.json > %t_clangcl.cdb // // RUN: clang-scan-deps -compilation-database %t.cdb -j 4 -format experimental-full \ // RUN: -mode preprocess-minimized-sources -module-name=header1 > %t.result // RUN: cat %t.result | sed 's:\\\\\?:/:g' | FileCheck -DPREFIX=%/t.dir --check-prefixes=CHECK %s +// +// RUN: clang-scan-deps -compilation-database %t_clangcl.cdb -j 4 -format experimental-full \ +// RUN: -mode preprocess-minimized-sources -module-name=header1 > %t_clangcl.result +// RUN: cat %t_clangcl.result | sed 's:\\\\\?:/:g' | FileCheck -DPREFIX=%/t.dir --check-prefixes=CHECK %s // CHECK: { // CHECK-NEXT: "modules": [ diff --git a/clang/test/ClangScanDeps/modules-full.cpp b/clang/test/ClangScanDeps/modules-full.cpp index 5f4bccdf2ad7..e628a5fa7a83 100644 --- a/clang/test/ClangScanDeps/modules-full.cpp +++ b/clang/test/ClangScanDeps/modules-full.cpp @@ -8,6 +8,7 @@ // RUN: cp %S/Inputs/header2.h %t.dir/Inputs/header2.h // RUN: cp %S/Inputs/module.modulemap %t.dir/Inputs/module.modulemap // RUN: sed -e "s|DIR|%/t.dir|g" %S/Inputs/modules_cdb.json > %t.cdb +// RUN: sed -e "s|DIR|%/t.dir|g" %S/Inputs/modules_cdb_clangcl.json > %t_clangcl.cdb // // RUN: clang-scan-deps -compilation-database %t.cdb -j 4 -format experimental-full \ // RUN: -mode preprocess-minimized-sources > %t.result @@ -21,6 +22,10 @@ // RUN: -generate-modules-path-args -module-files-dir %t.dir/custom \ // RUN: -mode preprocess-minimized-sources > %t.result // RUN: cat %t.result | sed 's:\\\\\?:/:g' | FileCheck -DPREFIX=%/t.dir --check-prefixes=CHECK,CHECK-CUSTOM %s +// +// RUN: clang-scan-deps -compilation-database %t_clangcl.cdb -j 4 -format experimental-full \ +// RUN: -mode preprocess-minimized-sources > %t_clangcl.result +// RUN: cat %t_clangcl.result | sed 's:\\\\\?:/:g' | FileCheck -DPREFIX=%/t.dir --check-prefixes=CHECK,CHECK-NO-ABS %s #include "header.h" @@ -38,7 +43,7 @@ // CHECK-NEXT: "-cc1" // CHECK: "-emit-module" // CHECK-NO-ABS-NOT: "-fmodule-file={{.*}}" -// CHECK-ABS: "-fmodule-file=[[PREFIX]]/module-cache/[[HASH_H2_DINCLUDE]]/header2-{{[A-Z0-9]+}}.pcm" +// CHECK-ABS: "-fmodule-file=[[PREFIX]]/module-cache{{(_clangcl)?}}/[[HASH_H2_DINCLUDE]]/header2-{{[A-Z0-9]+}}.pcm" // CHECK-CUSTOM: "-fmodule-file=[[PREFIX]]/custom/[[HASH_H2_DINCLUDE]]/header2-{{[A-Z0-9]+}}.pcm" // CHECK-NOT: "-fimplicit-module-maps" // CHECK: "-fmodule-name=header1" @@ -99,7 +104,7 @@ // CHECK: "-fno-implicit-modules" // CHECK-NEXT: "-fno-implicit-module-maps" // CHECK-NO-ABS-NOT: "-fmodule-file={{.*}}" -// CHECK-ABS-NEXT: "-fmodule-file=[[PREFIX]]/module-cache/[[HASH_H1]]/header1-{{[A-Z0-9]+}}.pcm" +// CHECK-ABS-NEXT: "-fmodule-file=[[PREFIX]]/module-cache{{(_clangcl)?}}/[[HASH_H1]]/header1-{{[A-Z0-9]+}}.pcm" // CHECK-CUSTOM-NEXT: "-fmodule-file=[[PREFIX]]/custom/[[HASH_H1]]/header1-{{[A-Z0-9]+}}.pcm" // CHECK-NEXT: ], // CHECK-NEXT: "file-deps": [ @@ -119,7 +124,7 @@ // CHECK: "-fno-implicit-modules" // CHECK-NEXT: "-fno-implicit-module-maps" // CHECK-NO-ABS-NOT: "-fmodule-file={{.*}}, -// CHECK-ABS-NEXT: "-fmodule-file=[[PREFIX]]/module-cache/[[HASH_H1]]/header1-{{[A-Z0-9]+}}.pcm" +// CHECK-ABS-NEXT: "-fmodule-file=[[PREFIX]]/module-cache{{(_clangcl)?}}/[[HASH_H1]]/header1-{{[A-Z0-9]+}}.pcm" // CHECK-CUSTOM-NEXT: "-fmodule-file=[[PREFIX]]/custom/[[HASH_H1]]/header1-{{[A-Z0-9]+}}.pcm" // CHECK-NEXT: ], // CHECK-NEXT: "file-deps": [ @@ -139,7 +144,7 @@ // CHECK: "-fno-implicit-modules" // CHECK-NEXT: "-fno-implicit-module-maps" // CHECK-NO-ABS-NOT: "-fmodule-file={{.*}}" -// CHECK-ABS-NEXT: "-fmodule-file=[[PREFIX]]/module-cache/[[HASH_H1]]/header1-{{[A-Z0-9]+}}.pcm" +// CHECK-ABS-NEXT: "-fmodule-file=[[PREFIX]]/module-cache{{(_clangcl)?}}/[[HASH_H1]]/header1-{{[A-Z0-9]+}}.pcm" // CHECK-CUSTOM-NEXT: "-fmodule-file=[[PREFIX]]/custom/[[HASH_H1]]/header1-{{[A-Z0-9]+}}.pcm" // CHECK-NEXT: ], // CHECK-NEXT: "file-deps": [ @@ -159,7 +164,7 @@ // CHECK: "-fno-implicit-modules" // CHECK-NEXT: "-fno-implicit-module-maps" // CHECK-NO-ABS-NOT: "-fmodule-file={{.*}}" -// CHECK-ABS-NEXT: "-fmodule-file=[[PREFIX]]/module-cache/[[HASH_H1_DINCLUDE]]/header1-{{[A-Z0-9]+}}.pcm" +// CHECK-ABS-NEXT: "-fmodule-file=[[PREFIX]]/module-cache{{(_clangcl)?}}/[[HASH_H1_DINCLUDE]]/header1-{{[A-Z0-9]+}}.pcm" // CHECK-CUSTOM-NEXT: "-fmodule-file=[[PREFIX]]/custom/[[HASH_H1_DINCLUDE]]/header1-{{[A-Z0-9]+}}.pcm" // CHECK-NEXT: ], // CHECK-NEXT: "file-deps": [ diff --git a/clang/test/ClangScanDeps/modules.cpp b/clang/test/ClangScanDeps/modules.cpp index 2f6e19ec1506..af7cdcb9d68c 100644 --- a/clang/test/ClangScanDeps/modules.cpp +++ b/clang/test/ClangScanDeps/modules.cpp @@ -1,6 +1,8 @@ // RUN: rm -rf %t.dir // RUN: rm -rf %t.cdb +// RUN: rm -rf %t_clangcl.cdb // RUN: rm -rf %t.module-cache +// RUN: rm -rf %t.module-cache_clangcl // RUN: mkdir -p %t.dir // RUN: cp %s %t.dir/modules_cdb_input.cpp // RUN: cp %s %t.dir/modules_cdb_input2.cpp @@ -9,9 +11,12 @@ // RUN: cp %S/Inputs/header2.h %t.dir/Inputs/header2.h // RUN: cp %S/Inputs/module.modulemap %t.dir/Inputs/module.modulemap // RUN: sed -e "s|DIR|%/t.dir|g" %S/Inputs/modules_cdb.json > %t.cdb +// RUN: sed -e "s|DIR|%/t.dir|g" %S/Inputs/modules_cdb_clangcl.json > %t_clangcl.cdb // // RUN: clang-scan-deps -compilation-database %t.cdb -j 1 -mode preprocess-minimized-sources | \ // RUN: FileCheck --check-prefixes=CHECK1,CHECK2,CHECK2NO %s +// RUN: clang-scan-deps -compilation-database %t_clangcl.cdb -j 1 -mode preprocess-minimized-sources | \ +// RUN: FileCheck --check-prefixes=CHECK1,CHECK2,CHECK2NO %s // // The output order is non-deterministic when using more than one thread, // so check the output using two runs. Note that the 'NOT' check is not used @@ -20,12 +25,20 @@ // // RUN: clang-scan-deps -compilation-database %t.cdb -j 2 -mode preprocess-minimized-sources | \ // RUN: FileCheck --check-prefix=CHECK1 %s +// RUN: clang-scan-deps -compilation-database %t_clangcl.cdb -j 2 -mode preprocess-minimized-sources | \ +// RUN: FileCheck --check-prefix=CHECK1 %s // RUN: clang-scan-deps -compilation-database %t.cdb -j 2 -mode preprocess | \ // RUN: FileCheck --check-prefix=CHECK1 %s +// RUN: clang-scan-deps -compilation-database %t_clangcl.cdb -j 2 -mode preprocess | \ +// RUN: FileCheck --check-prefix=CHECK1 %s // RUN: clang-scan-deps -compilation-database %t.cdb -j 2 -mode preprocess-minimized-sources | \ // RUN: FileCheck --check-prefix=CHECK2 %s +// RUN: clang-scan-deps -compilation-database %t_clangcl.cdb -j 2 -mode preprocess-minimized-sources | \ +// RUN: FileCheck --check-prefix=CHECK2 %s // RUN: clang-scan-deps -compilation-database %t.cdb -j 2 -mode preprocess | \ // RUN: FileCheck --check-prefix=CHECK2 %s +// RUN: clang-scan-deps -compilation-database %t_clangcl.cdb -j 2 -mode preprocess | \ +// RUN: FileCheck --check-prefix=CHECK2 %s #include "header.h" diff --git a/clang/test/ClangScanDeps/no-werror.cpp b/clang/test/ClangScanDeps/no-werror.cpp index 95407c51b3cc..11f1b718dac5 100644 --- a/clang/test/ClangScanDeps/no-werror.cpp +++ b/clang/test/ClangScanDeps/no-werror.cpp @@ -2,6 +2,7 @@ // RUN: rm -rf %t.cdb // RUN: mkdir -p %t.dir // RUN: cp %s %t.dir/no-werror_input.cpp +// RUN: cp %s %t.dir/no-werror_input_clangcl.cpp // RUN: mkdir %t.dir/Inputs // RUN: cp %S/Inputs/sys-header.h %t.dir/Inputs/sys-header.h // RUN: sed -e "s|DIR|%/t.dir|g" %S/Inputs/no-werror.json > %t.cdb @@ -14,3 +15,6 @@ // CHECK: no-werror_input.cpp // CHECK-NEXT: Inputs{{/|\\}}sys-header.h + +// CHECK: no-werror_input_clangcl.cpp +// CHECK-NEXT: Inputs{{/|\\}}sys-header.h diff --git a/clang/test/ClangScanDeps/regular_cdb.cpp b/clang/test/ClangScanDeps/regular_cdb.cpp index 46226f65a287..ee986005f97e 100644 --- a/clang/test/ClangScanDeps/regular_cdb.cpp +++ b/clang/test/ClangScanDeps/regular_cdb.cpp @@ -1,5 +1,6 @@ // RUN: rm -rf %t.dir // RUN: rm -rf %t.cdb +// RUN: rm -rf %t_clangcl.cdb // RUN: mkdir -p %t.dir // RUN: cp %s %t.dir/regular_cdb_input.cpp // RUN: cp %s %t.dir/regular_cdb_input2.cpp @@ -7,19 +8,28 @@ // RUN: cp %S/Inputs/header.h %t.dir/Inputs/header.h // RUN: cp %S/Inputs/header2.h %t.dir/Inputs/header2.h // RUN: sed -e "s|DIR|%/t.dir|g" %S/Inputs/regular_cdb.json > %t.cdb +// RUN: sed -e "s|DIR|%/t.dir|g" %S/Inputs/regular_cdb_clangcl.json > %t_clangcl.cdb // // RUN: clang-scan-deps -compilation-database %t.cdb -j 1 -mode preprocess-minimized-sources | \ // RUN: FileCheck --check-prefixes=CHECK1,CHECK2,CHECK2NO,CHECK3 %s +// RUN: clang-scan-deps -compilation-database %t_clangcl.cdb -j 1 -mode preprocess-minimized-sources | \ +// RUN: FileCheck --check-prefixes=CHECK1,CHECK2,CHECK2NO,CHECK3 %s // RUN: clang-scan-deps -compilation-database %t.cdb -j 1 -mode preprocess | \ // RUN: FileCheck --check-prefixes=CHECK1,CHECK2,CHECK2NO,CHECK3 %s +// RUN: clang-scan-deps -compilation-database %t_clangcl.cdb -j 1 -mode preprocess | \ +// RUN: FileCheck --check-prefixes=CHECK1,CHECK2,CHECK2NO,CHECK3 %s // RUN: clang-scan-deps -compilation-database %t.cdb -j 1 -mode preprocess-minimized-sources \ // RUN: -skip-excluded-pp-ranges=0 | FileCheck --check-prefixes=CHECK1,CHECK2,CHECK2NO,CHECK3 %s +// RUN: clang-scan-deps -compilation-database %t_clangcl.cdb -j 1 -mode preprocess-minimized-sources \ +// RUN: -skip-excluded-pp-ranges=0 | FileCheck --check-prefixes=CHECK1,CHECK2,CHECK2NO,CHECK3 %s // // Make sure we didn't produce any dependency files! // RUN: not cat %t.dir/regular_cdb.d +// RUN: not cat %t.dir/regular_cdb_clangcl.d // RUN: not cat %t.dir/regular_cdb2.d +// RUN: not cat %t.dir/regular_cdb2_clangcl.d // // The output order is non-deterministic when using more than one thread, // so check the output using two runs. Note that the 'NOT' check is not used @@ -28,15 +38,23 @@ // // RUN: clang-scan-deps -compilation-database %t.cdb -j 2 -mode preprocess-minimized-sources | \ // RUN: FileCheck --check-prefix=CHECK1 %s +// RUN: clang-scan-deps -compilation-database %t_clangcl.cdb -j 2 -mode preprocess-minimized-sources | \ +// RUN: FileCheck --check-prefix=CHECK1 %s // RUN: clang-scan-deps -compilation-database %t.cdb -j 2 -mode preprocess | \ // RUN: FileCheck --check-prefix=CHECK1 %s +// RUN: clang-scan-deps -compilation-database %t_clangcl.cdb -j 2 -mode preprocess | \ +// RUN: FileCheck --check-prefix=CHECK1 %s // RUN: clang-scan-deps -compilation-database %t.cdb -j 2 -mode preprocess-minimized-sources | \ // RUN: FileCheck --check-prefix=CHECK2 %s +// RUN: clang-scan-deps -compilation-database %t_clangcl.cdb -j 2 -mode preprocess-minimized-sources | \ +// RUN: FileCheck --check-prefix=CHECK2 %s // RUN: clang-scan-deps -compilation-database %t.cdb -j 2 -mode preprocess | \ // RUN: FileCheck --check-prefix=CHECK2 %s +// RUN: clang-scan-deps -compilation-database %t_clangcl.cdb -j 2 -mode preprocess | \ +// RUN: FileCheck --check-prefix=CHECK2 %s #include "header.h" diff --git a/clang/test/ClangScanDeps/static-analyzer.c b/clang/test/ClangScanDeps/static-analyzer.c index 305c7a8e0530..8edbf3eaae20 100644 --- a/clang/test/ClangScanDeps/static-analyzer.c +++ b/clang/test/ClangScanDeps/static-analyzer.c @@ -3,6 +3,7 @@ // RUN: mkdir -p %t.dir // Change file name to avoid false positives in CHECK, since "static-analyzer.c" is found in %S. // RUN: cp %s %t.dir/static-analyzer_clang.c +// RUN: cp %s %t.dir/static-analyzer_clangcl.c // RUN: mkdir %t.dir/Inputs // RUN: cp %S/Inputs/header.h %t.dir/Inputs/analyze_header_input.h // RUN: sed -e "s|DIR|%/t.dir|g" %S/Inputs/static-analyzer-cdb.json > %t-cdb.json @@ -15,3 +16,6 @@ // CHECK: static-analyzer_clang.c // CHECK-NEXT: analyze_header_input.h + +// CHECK: static-analyzer_clangcl.c +// CHECK-NEXT: analyze_header_input.h diff --git a/clang/test/ClangScanDeps/strip_diag_serialize.cpp b/clang/test/ClangScanDeps/strip_diag_serialize.cpp index ad0c8d96d8fc..c8713be7f3b7 100644 --- a/clang/test/ClangScanDeps/strip_diag_serialize.cpp +++ b/clang/test/ClangScanDeps/strip_diag_serialize.cpp @@ -2,6 +2,7 @@ // RUN: rm -rf %t.cdb // RUN: mkdir -p %t.dir // RUN: cp %s %t.dir/strip_diag_serialize_input.cpp +// RUN: cp %s %t.dir/strip_diag_serialize_input_clangcl.cpp // RUN: sed -e "s|DIR|%/t.dir|g" %S/Inputs/strip_diag_serialize.json > %t.cdb // // RUN: clang-scan-deps -compilation-database %t.cdb -j 1 2>&1 | FileCheck %s diff --git a/clang/test/ClangScanDeps/target-filename.cpp b/clang/test/ClangScanDeps/target-filename.cpp index 579407d07efa..02084ee9b372 100644 --- a/clang/test/ClangScanDeps/target-filename.cpp +++ b/clang/test/ClangScanDeps/target-filename.cpp @@ -21,3 +21,27 @@ // CHECK: target-filename_input.o: // CHECK-NEXT: target-filename_input.cpp + +// CHECK-NEXT: clangcl-a.o: +// CHECK-NEXT: target-filename_input.cpp + +// CHECK-NEXT: clangcl-b.o: +// CHECK-NEXT: target-filename_input.cpp + +// CHECK-NEXT: clangcl-c.o: +// CHECK-NEXT: target-filename_input.cpp + +// CHECK-NEXT: clangcl-d.o: +// CHECK-NEXT: target-filename_input.cpp + +// CHECK-NEXT: clangcl-e.o: +// CHECK-NEXT: target-filename_input.cpp + +// CHECK-NEXT: clangcl-lastf.o: +// CHECK-NEXT: target-filename_input.cpp + +// CHECK-NEXT: clangcl-lastg.o: +// CHECK-NEXT: target-filename_input.cpp + +// CHECK-NEXT: clangcl-lasth.o: +// CHECK-NEXT: target-filename_input.cpp diff --git a/clang/test/ClangScanDeps/vfsoverlay.cpp b/clang/test/ClangScanDeps/vfsoverlay.cpp index 517738943ab5..b3a2b23daad7 100644 --- a/clang/test/ClangScanDeps/vfsoverlay.cpp +++ b/clang/test/ClangScanDeps/vfsoverlay.cpp @@ -2,6 +2,7 @@ // RUN: rm -rf %t.cdb // RUN: mkdir -p %t.dir // RUN: cp %s %t.dir/vfsoverlay_input.cpp +// RUN: cp %s %t.dir/vfsoverlay_input_clangcl.cpp // RUN: sed -e "s|DIR|%/t.dir|g" %S/Inputs/vfsoverlay.yaml > %t.dir/vfsoverlay.yaml // RUN: mkdir %t.dir/Inputs // RUN: cp %S/Inputs/header.h %t.dir/Inputs/header.h @@ -15,3 +16,7 @@ // CHECK: vfsoverlay_input.o // CHECK-NEXT: vfsoverlay_input.cpp // CHECK-NEXT: Inputs{{/|\\}}header.h + +// CHECK: vfsoverlay_input_clangcl.o +// CHECK-NEXT: vfsoverlay_input_clangcl.cpp +// CHECK-NEXT: Inputs{{/|\\}}header.h