mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
ABI checker: diagnose the missing of @available attributes for added ABIs
New ABIs should have an @available attribute to describe the introducing version. This patch teaches the tool to diagnose its missing. Decls with @_AlwaysEmitIntoClient are excluded from the blaming lists since they are essentially available all the time. rdar://51089418
This commit is contained in:
@@ -293,6 +293,9 @@ struct PlatformIntroVersion {
|
||||
StringRef tvos;
|
||||
StringRef watchos;
|
||||
StringRef swift;
|
||||
bool hasOSAvailability() const {
|
||||
return !macos.empty() || !ios.empty() || !tvos.empty() || !watchos.empty();
|
||||
}
|
||||
};
|
||||
|
||||
class SDKNodeDecl: public SDKNode {
|
||||
@@ -347,6 +350,7 @@ public:
|
||||
StringRef getScreenInfo() const;
|
||||
bool hasFixedBinaryOrder() const { return FixedBinaryOrder.hasValue(); }
|
||||
uint8_t getFixedBinaryOrder() const { return *FixedBinaryOrder; }
|
||||
PlatformIntroVersion getIntroducingVersion() const { return introVersions; }
|
||||
virtual void jsonize(json::Output &Out) override;
|
||||
virtual void diagnose(SDKNode *Right) override;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user