Skip to content

Commit 9eb1a70

Browse files
committed
swift-module-digester: test -v mode when diagnosing ABI/API changes.
1 parent 468f5b0 commit 9eb1a70

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

test/api-digester/stability-stdlib-abi.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
// RUN: %empty-directory(%t.tmp)
33
// mkdir %t.tmp/module-cache && mkdir %t.tmp/dummy.sdk
44
// RUN: %api-digester -dump-sdk -module Swift -o %t.tmp/current-stdlib.json -module-cache-path %t.tmp/module-cache -sdk %t.tmp/dummy.sdk -abi
5-
// RUN: %api-digester -diagnose-sdk -input-paths %S/Inputs/stdlib-stable-abi.json -input-paths %t.tmp/current-stdlib.json -abi -o %t.tmp/changes.txt
5+
// RUN: %api-digester -diagnose-sdk -input-paths %S/Inputs/stdlib-stable-abi.json -input-paths %t.tmp/current-stdlib.json -abi -o %t.tmp/changes.txt -v
66
// RUN: %clang -E -P -x c %S/Outputs/stability-stdlib-abi.swift.expected -o - | sed '/^\s*$/d' | sort > %t.tmp/stability-stdlib-abi.swift.expected
77
// RUN: %clang -E -P -x c %t.tmp/changes.txt -o - | sed '/^\s*$/d' | sort > %t.tmp/changes.txt.tmp
88
// RUN: diff -u %t.tmp/stability-stdlib-abi.swift.expected %t.tmp/changes.txt.tmp

test/api-digester/stability-stdlib-source.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
// RUN: %empty-directory(%t.tmp)
33
// mkdir %t.tmp/module-cache && mkdir %t.tmp/dummy.sdk
44
// RUN: %api-digester -dump-sdk -module Swift -o %t.tmp/current-stdlib.json -module-cache-path %t.tmp/module-cache -sdk %t.tmp/dummy.sdk
5-
// RUN: %api-digester -diagnose-sdk -input-paths %S/Inputs/stdlib-stable.json -input-paths %t.tmp/current-stdlib.json -o %t.tmp/changes.txt
5+
// RUN: %api-digester -diagnose-sdk -input-paths %S/Inputs/stdlib-stable.json -input-paths %t.tmp/current-stdlib.json -o %t.tmp/changes.txt -v
66
// RUN: %clang -E -P -x c %S/Outputs/stability-stdlib-source.swift.expected -o - | sed '/^\s*$/d' | sort > %t.tmp/stability-stdlib-source.swift.expected
77
// RUN: %clang -E -P -x c %t.tmp/changes.txt -o - | sed '/^\s*$/d' | sort > %t.tmp/changes.txt.tmp
88
// RUN: diff -u %t.tmp/stability-stdlib-source.swift.expected %t.tmp/changes.txt.tmp

tools/swift-api-digester/swift-api-digester.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -941,9 +941,9 @@ class PrunePass : public MatchedNodeListener, public SDKTreeDiffPass {
941941

942942
static void debugMatch(SDKNode *Left, SDKNode *Right, NodeMatchReason Reason,
943943
llvm::raw_ostream &OS) {
944-
if (Left && isa<SDKNodeType>(Left))
944+
if (Left && !isa<SDKNodeDecl>(Left))
945945
return;
946-
if (Right && isa<SDKNodeType>(Right))
946+
if (Right && !isa<SDKNodeDecl>(Right))
947947
return;
948948
StringRef Arrow = " <--------> ";
949949
switch (Reason) {

0 commit comments

Comments
 (0)