diff --git a/clang/test/ClangScanDeps/Inputs/has_include_if_elif.json b/clang/test/ClangScanDeps/Inputs/has_include_if_elif.json --- a/clang/test/ClangScanDeps/Inputs/has_include_if_elif.json +++ b/clang/test/ClangScanDeps/Inputs/has_include_if_elif.json @@ -3,10 +3,5 @@ "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 --- a/clang/test/ClangScanDeps/Inputs/header_stat_before_open_cdb.json +++ b/clang/test/ClangScanDeps/Inputs/header_stat_before_open_cdb.json @@ -3,10 +3,5 @@ "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 --- a/clang/test/ClangScanDeps/Inputs/headerwithdirname.json +++ b/clang/test/ClangScanDeps/Inputs/headerwithdirname.json @@ -3,10 +3,5 @@ "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 --- a/clang/test/ClangScanDeps/Inputs/headerwithdirnamefollowedbyinclude.json +++ b/clang/test/ClangScanDeps/Inputs/headerwithdirnamefollowedbyinclude.json @@ -3,10 +3,5 @@ "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 deleted file mode 100644 --- a/clang/test/ClangScanDeps/Inputs/modules_cdb_clangcl.json +++ /dev/null @@ -1,22 +0,0 @@ -[ -{ - "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 deleted file mode 100644 --- a/clang/test/ClangScanDeps/Inputs/modules_cdb_clangcl_by_mod_name.json +++ /dev/null @@ -1,12 +0,0 @@ -[ -{ - "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 --- a/clang/test/ClangScanDeps/Inputs/no-werror.json +++ b/clang/test/ClangScanDeps/Inputs/no-werror.json @@ -3,10 +3,5 @@ "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 deleted file mode 100644 --- a/clang/test/ClangScanDeps/Inputs/regular_cdb_clangcl.json +++ /dev/null @@ -1,17 +0,0 @@ -[ -{ - "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 --- a/clang/test/ClangScanDeps/Inputs/static-analyzer-cdb.json +++ b/clang/test/ClangScanDeps/Inputs/static-analyzer-cdb.json @@ -3,10 +3,5 @@ "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 --- a/clang/test/ClangScanDeps/Inputs/target-filename-cdb.json +++ b/clang/test/ClangScanDeps/Inputs/target-filename-cdb.json @@ -23,45 +23,5 @@ "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 --- a/clang/test/ClangScanDeps/Inputs/vfsoverlay_cdb.json +++ b/clang/test/ClangScanDeps/Inputs/vfsoverlay_cdb.json @@ -4,9 +4,4 @@ "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 new file mode 100644 --- /dev/null +++ b/clang/test/ClangScanDeps/cl-output.c @@ -0,0 +1,87 @@ +// 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 new file mode 100644 --- /dev/null +++ b/clang/test/ClangScanDeps/cl-resource-dir.c @@ -0,0 +1,34 @@ +// 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: "/pass" diff --git a/clang/test/ClangScanDeps/cl-xclang.c b/clang/test/ClangScanDeps/cl-xclang.c new file mode 100644 --- /dev/null +++ b/clang/test/ClangScanDeps/cl-xclang.c @@ -0,0 +1,20 @@ +// 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 --- a/clang/test/ClangScanDeps/error.cpp +++ b/clang/test/ClangScanDeps/error.cpp @@ -3,16 +3,11 @@ // 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 --- a/clang/test/ClangScanDeps/has_include_if_elif.cpp +++ b/clang/test/ClangScanDeps/has_include_if_elif.cpp @@ -2,7 +2,6 @@ // 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 @@ -37,9 +36,3 @@ // 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 --- a/clang/test/ClangScanDeps/header_stat_before_open.m +++ b/clang/test/ClangScanDeps/header_stat_before_open.m @@ -2,7 +2,6 @@ // 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 @@ -17,8 +16,3 @@ // 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 --- a/clang/test/ClangScanDeps/headerwithdirname.cpp +++ b/clang/test/ClangScanDeps/headerwithdirname.cpp @@ -4,7 +4,6 @@ // 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 @@ -16,7 +15,3 @@ // 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 --- a/clang/test/ClangScanDeps/headerwithdirnamefollowedbyinclude.cpp +++ b/clang/test/ClangScanDeps/headerwithdirnamefollowedbyinclude.cpp @@ -7,7 +7,6 @@ // 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 @@ -20,7 +19,3 @@ // 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 --- 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{{(_clangcl)?}}/[[HASH_H2]]/header2-{{[A-Z0-9]+}}.pcm" +// CHECK-NEXT: "-fmodule-file=[[PREFIX]]/module-cache/[[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 --- a/clang/test/ClangScanDeps/modules-full-by-mod-name.cpp +++ b/clang/test/ClangScanDeps/modules-full-by-mod-name.cpp @@ -9,15 +9,10 @@ // 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 --- a/clang/test/ClangScanDeps/modules-full.cpp +++ b/clang/test/ClangScanDeps/modules-full.cpp @@ -8,7 +8,6 @@ // 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 @@ -22,10 +21,6 @@ // 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" @@ -43,7 +38,7 @@ // CHECK-NEXT: "-cc1" // CHECK: "-emit-module" // CHECK-NO-ABS-NOT: "-fmodule-file={{.*}}" -// CHECK-ABS: "-fmodule-file=[[PREFIX]]/module-cache{{(_clangcl)?}}/[[HASH_H2_DINCLUDE]]/header2-{{[A-Z0-9]+}}.pcm" +// CHECK-ABS: "-fmodule-file=[[PREFIX]]/module-cache/[[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" @@ -104,7 +99,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{{(_clangcl)?}}/[[HASH_H1]]/header1-{{[A-Z0-9]+}}.pcm" +// CHECK-ABS-NEXT: "-fmodule-file=[[PREFIX]]/module-cache/[[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": [ @@ -124,7 +119,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{{(_clangcl)?}}/[[HASH_H1]]/header1-{{[A-Z0-9]+}}.pcm" +// CHECK-ABS-NEXT: "-fmodule-file=[[PREFIX]]/module-cache/[[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": [ @@ -144,7 +139,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{{(_clangcl)?}}/[[HASH_H1]]/header1-{{[A-Z0-9]+}}.pcm" +// CHECK-ABS-NEXT: "-fmodule-file=[[PREFIX]]/module-cache/[[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": [ @@ -164,7 +159,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{{(_clangcl)?}}/[[HASH_H1_DINCLUDE]]/header1-{{[A-Z0-9]+}}.pcm" +// CHECK-ABS-NEXT: "-fmodule-file=[[PREFIX]]/module-cache/[[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 --- a/clang/test/ClangScanDeps/modules.cpp +++ b/clang/test/ClangScanDeps/modules.cpp @@ -1,8 +1,6 @@ // 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 @@ -11,12 +9,9 @@ // 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 @@ -25,20 +20,12 @@ // // 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 --- a/clang/test/ClangScanDeps/no-werror.cpp +++ b/clang/test/ClangScanDeps/no-werror.cpp @@ -2,7 +2,6 @@ // 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 @@ -15,6 +14,3 @@ // 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 --- a/clang/test/ClangScanDeps/regular_cdb.cpp +++ b/clang/test/ClangScanDeps/regular_cdb.cpp @@ -1,6 +1,5 @@ // 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 @@ -8,28 +7,19 @@ // 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 @@ -38,23 +28,15 @@ // // 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 --- a/clang/test/ClangScanDeps/static-analyzer.c +++ b/clang/test/ClangScanDeps/static-analyzer.c @@ -3,7 +3,6 @@ // 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 @@ -16,6 +15,3 @@ // 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 --- a/clang/test/ClangScanDeps/strip_diag_serialize.cpp +++ b/clang/test/ClangScanDeps/strip_diag_serialize.cpp @@ -2,7 +2,6 @@ // 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 --- a/clang/test/ClangScanDeps/target-filename.cpp +++ b/clang/test/ClangScanDeps/target-filename.cpp @@ -21,27 +21,3 @@ // 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 --- a/clang/test/ClangScanDeps/vfsoverlay.cpp +++ b/clang/test/ClangScanDeps/vfsoverlay.cpp @@ -2,7 +2,6 @@ // 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 @@ -16,7 +15,3 @@ // 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