@@ -72,7 +72,7 @@ ModuleList("module-list-file",
72
72
llvm::cl::cat(Category));
73
73
74
74
static llvm::cl::opt<std::string>
75
- ProtReqWhiteList (" protocol-requirement-white -list" ,
75
+ ProtReqAllowList (" protocol-requirement-allow -list" ,
76
76
llvm::cl::desc (" File containing a new-line separated list of protocol names" ),
77
77
llvm::cl::cat(Category));
78
78
@@ -1085,7 +1085,7 @@ class PrunePass : public MatchedNodeListener, public SDKTreeDiffPass {
1085
1085
1086
1086
SDKContext &Ctx;
1087
1087
UpdatedNodesMap &UpdateMap;
1088
- llvm::StringSet<> ProtocolReqWhitelist ;
1088
+ llvm::StringSet<> ProtocolReqAllowlist ;
1089
1089
SDKNodeRoot *LeftRoot;
1090
1090
SDKNodeRoot *RightRoot;
1091
1091
@@ -1134,10 +1134,10 @@ class PrunePass : public MatchedNodeListener, public SDKTreeDiffPass {
1134
1134
1135
1135
public:
1136
1136
PrunePass (SDKContext &Ctx): Ctx(Ctx), UpdateMap(Ctx.getNodeUpdateMap()) {}
1137
- PrunePass (SDKContext &Ctx, llvm::StringSet<> prWhitelist ):
1137
+ PrunePass (SDKContext &Ctx, llvm::StringSet<> prAllowlist ):
1138
1138
Ctx (Ctx),
1139
1139
UpdateMap (Ctx.getNodeUpdateMap()),
1140
- ProtocolReqWhitelist (std::move(prWhitelist )) {}
1140
+ ProtocolReqAllowlist (std::move(prAllowlist )) {}
1141
1141
1142
1142
void diagnoseMissingAvailable (SDKNodeDecl *D) {
1143
1143
// For extensions of external types, we diagnose individual member's missing
@@ -1189,7 +1189,7 @@ class PrunePass : public MatchedNodeListener, public SDKTreeDiffPass {
1189
1189
ShouldComplain = false ;
1190
1190
}
1191
1191
if (ShouldComplain &&
1192
- ProtocolReqWhitelist .count (getParentProtocolName (D))) {
1192
+ ProtocolReqAllowlist .count (getParentProtocolName (D))) {
1193
1193
// Ignore protocol requirement additions if the protocol has been added
1194
1194
// to the allowlist.
1195
1195
ShouldComplain = false ;
@@ -2322,7 +2322,7 @@ createDiagConsumer(llvm::raw_ostream &OS, bool &FailOnError) {
2322
2322
2323
2323
static int diagnoseModuleChange (SDKContext &Ctx, SDKNodeRoot *LeftModule,
2324
2324
SDKNodeRoot *RightModule, StringRef OutputPath,
2325
- llvm::StringSet<> ProtocolReqWhitelist ) {
2325
+ llvm::StringSet<> ProtocolReqAllowlist ) {
2326
2326
assert (LeftModule);
2327
2327
assert (RightModule);
2328
2328
llvm::raw_ostream *OS = &llvm::errs ();
@@ -2345,7 +2345,7 @@ static int diagnoseModuleChange(SDKContext &Ctx, SDKNodeRoot *LeftModule,
2345
2345
RightModule->getJsonFormatVersion ()));
2346
2346
TypeAliasDiffFinder (LeftModule, RightModule,
2347
2347
Ctx.getTypeAliasUpdateMap ()).search ();
2348
- PrunePass Prune (Ctx, std::move (ProtocolReqWhitelist ));
2348
+ PrunePass Prune (Ctx, std::move (ProtocolReqAllowlist ));
2349
2349
Prune.pass (LeftModule, RightModule);
2350
2350
ChangeRefinementPass RefinementPass (Ctx.getNodeUpdateMap ());
2351
2351
RefinementPass.pass (LeftModule, RightModule);
@@ -2358,7 +2358,7 @@ static int diagnoseModuleChange(SDKContext &Ctx, SDKNodeRoot *LeftModule,
2358
2358
static int diagnoseModuleChange (StringRef LeftPath, StringRef RightPath,
2359
2359
StringRef OutputPath,
2360
2360
CheckerOptions Opts,
2361
- llvm::StringSet<> ProtocolReqWhitelist ) {
2361
+ llvm::StringSet<> ProtocolReqAllowlist ) {
2362
2362
if (!fs::exists (LeftPath)) {
2363
2363
llvm::errs () << LeftPath << " does not exist\n " ;
2364
2364
return 1 ;
@@ -2373,7 +2373,7 @@ static int diagnoseModuleChange(StringRef LeftPath, StringRef RightPath,
2373
2373
SwiftDeclCollector RightCollector (Ctx);
2374
2374
RightCollector.deSerialize (RightPath);
2375
2375
diagnoseModuleChange (Ctx, LeftCollector.getSDKRoot (), RightCollector.getSDKRoot (),
2376
- OutputPath, std::move (ProtocolReqWhitelist ));
2376
+ OutputPath, std::move (ProtocolReqAllowlist ));
2377
2377
return options::CompilerStyleDiags && Ctx.getDiags ().hadAnyError () ? 1 : 0 ;
2378
2378
}
2379
2379
@@ -2848,9 +2848,9 @@ int main(int argc, char *argv[]) {
2848
2848
case ActionType::MigratorGen:
2849
2849
case ActionType::DiagnoseSDKs: {
2850
2850
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 ))
2854
2854
return 1 ;
2855
2855
}
2856
2856
if (options::Action == ActionType::MigratorGen) {
@@ -2864,21 +2864,21 @@ int main(int argc, char *argv[]) {
2864
2864
return diagnoseModuleChange (options::SDKJsonPaths[0 ],
2865
2865
options::SDKJsonPaths[1 ],
2866
2866
options::OutputFile, Opts,
2867
- std::move (protocolWhitelist ));
2867
+ std::move (protocolAllowlist ));
2868
2868
}
2869
2869
case ComparisonInputMode::BaselineJson: {
2870
2870
SDKContext Ctx (Opts);
2871
2871
return diagnoseModuleChange (Ctx, getBaselineFromJson (argv[0 ], Ctx),
2872
2872
getSDKRoot (argv[0 ], Ctx, false ),
2873
2873
options::OutputFile,
2874
- std::move (protocolWhitelist ));
2874
+ std::move (protocolAllowlist ));
2875
2875
}
2876
2876
case ComparisonInputMode::BothLoad: {
2877
2877
SDKContext Ctx (Opts);
2878
2878
return diagnoseModuleChange (Ctx, getSDKRoot (argv[0 ], Ctx, true ),
2879
2879
getSDKRoot (argv[0 ], Ctx, false ),
2880
2880
options::OutputFile,
2881
- std::move (protocolWhitelist ));
2881
+ std::move (protocolAllowlist ));
2882
2882
}
2883
2883
}
2884
2884
}
0 commit comments