mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
swift-module-digester: diagnose adding variables with fixed binary order.
Removing these variables should be detected as API breakages already.
This commit is contained in:
@@ -762,6 +762,14 @@ public:
|
||||
case NodeMatchReason::Added:
|
||||
assert(!Left);
|
||||
Right->annotate(NodeAnnotation::Added);
|
||||
if (Ctx.checkingABI()) {
|
||||
if (auto *VAD = dyn_cast<SDKNodeDeclVar>(Right)) {
|
||||
if (VAD->hasFixedBinaryOrder()) {
|
||||
Ctx.getDiags().diagnose(SourceLoc(), diag::decl_added,
|
||||
VAD->getScreenInfo());
|
||||
}
|
||||
}
|
||||
}
|
||||
return;
|
||||
case NodeMatchReason::Removed:
|
||||
assert(!Right);
|
||||
|
||||
Reference in New Issue
Block a user