@@ -72,7 +72,7 @@ ModuleList("module-list-file",
7272 llvm::cl::cat(Category));
7373
7474static llvm::cl::opt<std::string>
75- ProtReqWhiteList (" protocol-requirement-white -list" ,
75+ ProtReqAllowList (" protocol-requirement-allow -list" ,
7676 llvm::cl::desc (" File containing a new-line separated list of protocol names" ),
7777 llvm::cl::cat(Category));
7878
@@ -1085,7 +1085,7 @@ class PrunePass : public MatchedNodeListener, public SDKTreeDiffPass {
10851085
10861086 SDKContext &Ctx;
10871087 UpdatedNodesMap &UpdateMap;
1088- llvm::StringSet<> ProtocolReqWhitelist ;
1088+ llvm::StringSet<> ProtocolReqAllowlist ;
10891089 SDKNodeRoot *LeftRoot;
10901090 SDKNodeRoot *RightRoot;
10911091
@@ -1134,10 +1134,10 @@ class PrunePass : public MatchedNodeListener, public SDKTreeDiffPass {
11341134
11351135public:
11361136 PrunePass (SDKContext &Ctx): Ctx(Ctx), UpdateMap(Ctx.getNodeUpdateMap()) {}
1137- PrunePass (SDKContext &Ctx, llvm::StringSet<> prWhitelist ):
1137+ PrunePass (SDKContext &Ctx, llvm::StringSet<> prAllowlist ):
11381138 Ctx (Ctx),
11391139 UpdateMap (Ctx.getNodeUpdateMap()),
1140- ProtocolReqWhitelist (std::move(prWhitelist )) {}
1140+ ProtocolReqAllowlist (std::move(prAllowlist )) {}
11411141
11421142 void diagnoseMissingAvailable (SDKNodeDecl *D) {
11431143 // For extensions of external types, we diagnose individual member's missing
@@ -1189,7 +1189,7 @@ class PrunePass : public MatchedNodeListener, public SDKTreeDiffPass {
11891189 ShouldComplain = false ;
11901190 }
11911191 if (ShouldComplain &&
1192- ProtocolReqWhitelist .count (getParentProtocolName (D))) {
1192+ ProtocolReqAllowlist .count (getParentProtocolName (D))) {
11931193 // Ignore protocol requirement additions if the protocol has been added
11941194 // to the allowlist.
11951195 ShouldComplain = false ;
@@ -2322,7 +2322,7 @@ createDiagConsumer(llvm::raw_ostream &OS, bool &FailOnError) {
23222322
23232323static int diagnoseModuleChange (SDKContext &Ctx, SDKNodeRoot *LeftModule,
23242324 SDKNodeRoot *RightModule, StringRef OutputPath,
2325- llvm::StringSet<> ProtocolReqWhitelist ) {
2325+ llvm::StringSet<> ProtocolReqAllowlist ) {
23262326 assert (LeftModule);
23272327 assert (RightModule);
23282328 llvm::raw_ostream *OS = &llvm::errs ();
@@ -2345,7 +2345,7 @@ static int diagnoseModuleChange(SDKContext &Ctx, SDKNodeRoot *LeftModule,
23452345 RightModule->getJsonFormatVersion ()));
23462346 TypeAliasDiffFinder (LeftModule, RightModule,
23472347 Ctx.getTypeAliasUpdateMap ()).search ();
2348- PrunePass Prune (Ctx, std::move (ProtocolReqWhitelist ));
2348+ PrunePass Prune (Ctx, std::move (ProtocolReqAllowlist ));
23492349 Prune.pass (LeftModule, RightModule);
23502350 ChangeRefinementPass RefinementPass (Ctx.getNodeUpdateMap ());
23512351 RefinementPass.pass (LeftModule, RightModule);
@@ -2358,7 +2358,7 @@ static int diagnoseModuleChange(SDKContext &Ctx, SDKNodeRoot *LeftModule,
23582358static int diagnoseModuleChange (StringRef LeftPath, StringRef RightPath,
23592359 StringRef OutputPath,
23602360 CheckerOptions Opts,
2361- llvm::StringSet<> ProtocolReqWhitelist ) {
2361+ llvm::StringSet<> ProtocolReqAllowlist ) {
23622362 if (!fs::exists (LeftPath)) {
23632363 llvm::errs () << LeftPath << " does not exist\n " ;
23642364 return 1 ;
@@ -2373,7 +2373,7 @@ static int diagnoseModuleChange(StringRef LeftPath, StringRef RightPath,
23732373 SwiftDeclCollector RightCollector (Ctx);
23742374 RightCollector.deSerialize (RightPath);
23752375 diagnoseModuleChange (Ctx, LeftCollector.getSDKRoot (), RightCollector.getSDKRoot (),
2376- OutputPath, std::move (ProtocolReqWhitelist ));
2376+ OutputPath, std::move (ProtocolReqAllowlist ));
23772377 return options::CompilerStyleDiags && Ctx.getDiags ().hadAnyError () ? 1 : 0 ;
23782378}
23792379
@@ -2848,9 +2848,9 @@ int main(int argc, char *argv[]) {
28482848 case ActionType::MigratorGen:
28492849 case ActionType::DiagnoseSDKs: {
28502850 ComparisonInputMode Mode = checkComparisonInputMode ();
2851- llvm::StringSet<> protocolWhitelist ;
2852- if (!options::ProtReqWhiteList .empty ()) {
2853- if (readFileLineByLine (options::ProtReqWhiteList, protocolWhitelist ))
2851+ llvm::StringSet<> protocolAllowlist ;
2852+ if (!options::ProtReqAllowList .empty ()) {
2853+ if (readFileLineByLine (options::ProtReqAllowList, protocolAllowlist ))
28542854 return 1 ;
28552855 }
28562856 if (options::Action == ActionType::MigratorGen) {
@@ -2864,21 +2864,21 @@ int main(int argc, char *argv[]) {
28642864 return diagnoseModuleChange (options::SDKJsonPaths[0 ],
28652865 options::SDKJsonPaths[1 ],
28662866 options::OutputFile, Opts,
2867- std::move (protocolWhitelist ));
2867+ std::move (protocolAllowlist ));
28682868 }
28692869 case ComparisonInputMode::BaselineJson: {
28702870 SDKContext Ctx (Opts);
28712871 return diagnoseModuleChange (Ctx, getBaselineFromJson (argv[0 ], Ctx),
28722872 getSDKRoot (argv[0 ], Ctx, false ),
28732873 options::OutputFile,
2874- std::move (protocolWhitelist ));
2874+ std::move (protocolAllowlist ));
28752875 }
28762876 case ComparisonInputMode::BothLoad: {
28772877 SDKContext Ctx (Opts);
28782878 return diagnoseModuleChange (Ctx, getSDKRoot (argv[0 ], Ctx, true ),
28792879 getSDKRoot (argv[0 ], Ctx, false ),
28802880 options::OutputFile,
2881- std::move (protocolWhitelist ));
2881+ std::move (protocolAllowlist ));
28822882 }
28832883 }
28842884 }
0 commit comments