diff options
Diffstat (limited to 'clang/test/ClangScanDeps/removed-args.c')
-rw-r--r-- | clang/test/ClangScanDeps/removed-args.c | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/clang/test/ClangScanDeps/removed-args.c b/clang/test/ClangScanDeps/removed-args.c index f49e4ea..3e108f0 100644 --- a/clang/test/ClangScanDeps/removed-args.c +++ b/clang/test/ClangScanDeps/removed-args.c @@ -93,3 +93,31 @@ // CHECK-NOT: "-fmodules-prune-interval= // CHECK-NOT: "-fmodules-prune-after= // CHECK: ], + +// Check for removed args for PCH invocations. + +// RUN: split-file %s %t +// RUN: sed "s|DIR|%/t|g" %t/cdb-pch.json.template > %t/cdb-pch.json +// RUN: clang-scan-deps -compilation-database %t/cdb-pch.json -format experimental-full > %t/result-pch.json +// RUN: cat %t/result-pch.json | sed 's:\\\\\?:/:g' | FileCheck %s -DPREFIX=%/t -check-prefix=PCH +// +// PCH-NOT: "-fdebug-compilation-dir=" +// PCH-NOT: "-fcoverage-compilation-dir=" +// PCH-NOT: "-coverage-notes-file +// PCH-NOT: "-coverage-data-file +// PCH-NOT: "-fprofile-instrument-use-path +// PCH-NOT: "-include" +// PCH-NOT: "-fmodules-cache-path= +// PCH-NOT: "-fmodules-validate-once-per-build-session" +// PCH-NOT: "-fbuild-session-timestamp= +// PCH-NOT: "-fmodules-prune-interval= +// PCH-NOT: "-fmodules-prune-after= + +//--- cdb-pch.json.template +[ + { + "directory": "DIR", + "command": "clang -x c-header DIR/header.h -fmodules -fimplicit-module-maps -fmodules-cache-path=DIR/cache -fdebug-compilation-dir=DIR/debug -fcoverage-compilation-dir=DIR/coverage -ftest-coverage -fprofile-instr-use=DIR/tu.profdata -o DIR/header.h.pch -serialize-diagnostics DIR/header.h.pch.diag ", + "file": "DIR/header.h.pch" + } +] |