Skip to content

Commit 2037abd

Browse files
committed
Update ScanningOptimizations's default so CWD optimization is off.
1 parent bdace10 commit 2037abd

File tree

3 files changed

+7
-7
lines changed

3 files changed

+7
-7
lines changed

clang/include/clang/Tooling/DependencyScanning/DependencyScanningService.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ enum class ScanningOptimizations {
6767
IgnoreCWD = (1 << 4),
6868

6969
DSS_LAST_BITMASK_ENUM(IgnoreCWD),
70-
Default = All
70+
Default = All & (~IgnoreCWD)
7171
};
7272

7373
#undef DSS_LAST_BITMASK_ENUM

clang/test/ClangScanDeps/modules-context-hash-cwd.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,14 +9,14 @@
99
// RUN: sed -e "s|DIR|%/t|g" %t/cdb3.json.in > %t/cdb3.json
1010
// RUN: sed -e "s|DIR|%/t|g" %t/cdb4.json.in > %t/cdb4.json
1111
// RUN: sed -e "s|DIR|%/t|g" %t/cdb5.json.in > %t/cdb5.json
12-
// RUN: clang-scan-deps -compilation-database %t/cdb0.json -format experimental-full > %t/result0.json
13-
// RUN: clang-scan-deps -compilation-database %t/cdb1.json -format experimental-full > %t/result1.json
12+
// RUN: clang-scan-deps -compilation-database %t/cdb0.json -format experimental-full -optimize-args=all > %t/result0.json
13+
// RUN: clang-scan-deps -compilation-database %t/cdb1.json -format experimental-full -optimize-args=all > %t/result1.json
1414
// It is not a typo to use cdb1.json for result2. We intend to use the same
1515
// compilation database, but different clang-scan-deps optimize-args options.
1616
// RUN: clang-scan-deps -compilation-database %t/cdb1.json -format experimental-full -optimize-args=header-search,system-warnings,vfs,canonicalize-macros > %t/result2.json
17-
// RUN: clang-scan-deps -compilation-database %t/cdb3.json -format experimental-full > %t/result3.json
18-
// RUN: clang-scan-deps -compilation-database %t/cdb4.json -format experimental-full > %t/result4.json
19-
// RUN: clang-scan-deps -compilation-database %t/cdb5.json -format experimental-full > %t/result5.json
17+
// RUN: clang-scan-deps -compilation-database %t/cdb3.json -format experimental-full -optimize-args=all > %t/result3.json
18+
// RUN: clang-scan-deps -compilation-database %t/cdb4.json -format experimental-full -optimize-args=all > %t/result4.json
19+
// RUN: clang-scan-deps -compilation-database %t/cdb5.json -format experimental-full -optimize-args=all > %t/result5.json
2020
// RUN: cat %t/result0.json %t/result1.json | FileCheck %s
2121
// RUN: cat %t/result0.json %t/result2.json | FileCheck %s -check-prefix=SKIPOPT
2222
// RUN: cat %t/result3.json %t/result4.json | FileCheck %s -check-prefix=RELPATH

clang/test/ClangScanDeps/modules-debug-dir.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
// RUN: split-file %s %t
55
// RUN: sed -e "s|DIR|%/t|g" %t/cdb.json.in > %t/cdb.json
66
// RUN: clang-scan-deps -compilation-database %t/cdb.json -format \
7-
// RUN: experimental-full > %t/result.json
7+
// RUN: experimental-full -optimize-args=all > %t/result.json
88
// RUN: cat %t/result.json | sed 's:\\\\\?:/:g' | FileCheck %s
99

1010
//--- cdb.json.in

0 commit comments

Comments
 (0)