Skip to content

Commit 2d31060

Browse files
committed
ABI/API checker: tool's return value should indicate whether error occurred
1 parent 8e61c23 commit 2d31060

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2145,7 +2145,7 @@ static int diagnoseModuleChange(SDKContext &Ctx, SDKNodeRoot *LeftModule,
21452145
// Find member hoist changes to help refine diagnostics.
21462146
findTypeMemberDiffs(LeftModule, RightModule, Ctx.getTypeMemberDiffs());
21472147
DiagnosisEmitter::diagnosis(LeftModule, RightModule, Ctx);
2148-
return 0;
2148+
return options::CompilerStyleDiags && Ctx.getDiags().hadAnyError() ? 1 : 0;
21492149
}
21502150

21512151
static int diagnoseModuleChange(StringRef LeftPath, StringRef RightPath,
@@ -2167,7 +2167,7 @@ static int diagnoseModuleChange(StringRef LeftPath, StringRef RightPath,
21672167
RightCollector.deSerialize(RightPath);
21682168
diagnoseModuleChange(Ctx, LeftCollector.getSDKRoot(), RightCollector.getSDKRoot(),
21692169
OutputPath, std::move(ProtocolReqWhitelist));
2170-
return 0;
2170+
return options::CompilerStyleDiags && Ctx.getDiags().hadAnyError() ? 1 : 0;
21712171
}
21722172

21732173
static void populateAliasChanges(NodeMap &AliasMap, DiffVector &AllItems,

0 commit comments

Comments
 (0)