mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
ABIChecker: add an option to avoid diagnosing about certain given SPI groups
rdar://92032848
This commit is contained in:
@@ -161,6 +161,7 @@ struct CheckerOptions {
|
||||
bool Migrator;
|
||||
StringRef LocationFilter;
|
||||
std::vector<std::string> ToolArgs;
|
||||
llvm::StringSet<> SPIGroupNamesToIgnore;
|
||||
};
|
||||
|
||||
class SDKContext {
|
||||
@@ -417,6 +418,12 @@ public:
|
||||
if (isObjc())
|
||||
return;
|
||||
}
|
||||
// Don't emit SPIs if the group name is out-out.
|
||||
for (auto spi: getSPIGroups()) {
|
||||
if (Ctx.getOpts().SPIGroupNamesToIgnore.contains(spi)) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
Ctx.getDiags(Loc).diagnose(Loc, ID, getScreenInfo(), std::move(Args)...);
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user