@@ -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
@@ -1074,7 +1074,7 @@ class PrunePass : public MatchedNodeListener, public SDKTreeDiffPass {
1074
1074
1075
1075
SDKContext &Ctx;
1076
1076
UpdatedNodesMap &UpdateMap;
1077
- llvm::StringSet<> ProtocolReqWhitelist ;
1077
+ llvm::StringSet<> ProtocolReqAllowlist ;
1078
1078
SDKNodeRoot *LeftRoot;
1079
1079
SDKNodeRoot *RightRoot;
1080
1080
@@ -1123,10 +1123,10 @@ class PrunePass : public MatchedNodeListener, public SDKTreeDiffPass {
1123
1123
1124
1124
public:
1125
1125
PrunePass (SDKContext &Ctx): Ctx(Ctx), UpdateMap(Ctx.getNodeUpdateMap()) {}
1126
- PrunePass (SDKContext &Ctx, llvm::StringSet<> prWhitelist ):
1126
+ PrunePass (SDKContext &Ctx, llvm::StringSet<> prAllowlist ):
1127
1127
Ctx (Ctx),
1128
1128
UpdateMap (Ctx.getNodeUpdateMap()),
1129
- ProtocolReqWhitelist (std::move(prWhitelist )) {}
1129
+ ProtocolReqAllowlist (std::move(prAllowlist )) {}
1130
1130
1131
1131
void diagnoseMissingAvailable (SDKNodeDecl *D) {
1132
1132
// For extensions of external types, we diagnose individual member's missing
@@ -1178,7 +1178,7 @@ class PrunePass : public MatchedNodeListener, public SDKTreeDiffPass {
1178
1178
ShouldComplain = false ;
1179
1179
}
1180
1180
if (ShouldComplain &&
1181
- ProtocolReqWhitelist .count (getParentProtocolName (D))) {
1181
+ ProtocolReqAllowlist .count (getParentProtocolName (D))) {
1182
1182
// Ignore protocol requirement additions if the protocol has been added
1183
1183
// to the allowlist.
1184
1184
ShouldComplain = false ;
@@ -2311,7 +2311,7 @@ createDiagConsumer(llvm::raw_ostream &OS, bool &FailOnError) {
2311
2311
2312
2312
static int diagnoseModuleChange (SDKContext &Ctx, SDKNodeRoot *LeftModule,
2313
2313
SDKNodeRoot *RightModule, StringRef OutputPath,
2314
- llvm::StringSet<> ProtocolReqWhitelist ) {
2314
+ llvm::StringSet<> ProtocolReqAllowlist ) {
2315
2315
assert (LeftModule);
2316
2316
assert (RightModule);
2317
2317
llvm::raw_ostream *OS = &llvm::errs ();
@@ -2334,7 +2334,7 @@ static int diagnoseModuleChange(SDKContext &Ctx, SDKNodeRoot *LeftModule,
2334
2334
RightModule->getJsonFormatVersion ()));
2335
2335
TypeAliasDiffFinder (LeftModule, RightModule,
2336
2336
Ctx.getTypeAliasUpdateMap ()).search ();
2337
- PrunePass Prune (Ctx, std::move (ProtocolReqWhitelist ));
2337
+ PrunePass Prune (Ctx, std::move (ProtocolReqAllowlist ));
2338
2338
Prune.pass (LeftModule, RightModule);
2339
2339
ChangeRefinementPass RefinementPass (Ctx.getNodeUpdateMap ());
2340
2340
RefinementPass.pass (LeftModule, RightModule);
@@ -2347,7 +2347,7 @@ static int diagnoseModuleChange(SDKContext &Ctx, SDKNodeRoot *LeftModule,
2347
2347
static int diagnoseModuleChange (StringRef LeftPath, StringRef RightPath,
2348
2348
StringRef OutputPath,
2349
2349
CheckerOptions Opts,
2350
- llvm::StringSet<> ProtocolReqWhitelist ) {
2350
+ llvm::StringSet<> ProtocolReqAllowlist ) {
2351
2351
if (!fs::exists (LeftPath)) {
2352
2352
llvm::errs () << LeftPath << " does not exist\n " ;
2353
2353
return 1 ;
@@ -2362,7 +2362,7 @@ static int diagnoseModuleChange(StringRef LeftPath, StringRef RightPath,
2362
2362
SwiftDeclCollector RightCollector (Ctx);
2363
2363
RightCollector.deSerialize (RightPath);
2364
2364
diagnoseModuleChange (Ctx, LeftCollector.getSDKRoot (), RightCollector.getSDKRoot (),
2365
- OutputPath, std::move (ProtocolReqWhitelist ));
2365
+ OutputPath, std::move (ProtocolReqAllowlist ));
2366
2366
return options::CompilerStyleDiags && Ctx.getDiags ().hadAnyError () ? 1 : 0 ;
2367
2367
}
2368
2368
@@ -2837,9 +2837,9 @@ int main(int argc, char *argv[]) {
2837
2837
case ActionType::MigratorGen:
2838
2838
case ActionType::DiagnoseSDKs: {
2839
2839
ComparisonInputMode Mode = checkComparisonInputMode ();
2840
- llvm::StringSet<> protocolWhitelist ;
2841
- if (!options::ProtReqWhiteList .empty ()) {
2842
- if (readFileLineByLine (options::ProtReqWhiteList, protocolWhitelist ))
2840
+ llvm::StringSet<> protocolAllowlist ;
2841
+ if (!options::ProtReqAllowList .empty ()) {
2842
+ if (readFileLineByLine (options::ProtReqAllowList, protocolAllowlist ))
2843
2843
return 1 ;
2844
2844
}
2845
2845
if (options::Action == ActionType::MigratorGen) {
@@ -2853,21 +2853,21 @@ int main(int argc, char *argv[]) {
2853
2853
return diagnoseModuleChange (options::SDKJsonPaths[0 ],
2854
2854
options::SDKJsonPaths[1 ],
2855
2855
options::OutputFile, Opts,
2856
- std::move (protocolWhitelist ));
2856
+ std::move (protocolAllowlist ));
2857
2857
}
2858
2858
case ComparisonInputMode::BaselineJson: {
2859
2859
SDKContext Ctx (Opts);
2860
2860
return diagnoseModuleChange (Ctx, getBaselineFromJson (argv[0 ], Ctx),
2861
2861
getSDKRoot (argv[0 ], Ctx, false ),
2862
2862
options::OutputFile,
2863
- std::move (protocolWhitelist ));
2863
+ std::move (protocolAllowlist ));
2864
2864
}
2865
2865
case ComparisonInputMode::BothLoad: {
2866
2866
SDKContext Ctx (Opts);
2867
2867
return diagnoseModuleChange (Ctx, getSDKRoot (argv[0 ], Ctx, true ),
2868
2868
getSDKRoot (argv[0 ], Ctx, false ),
2869
2869
options::OutputFile,
2870
- std::move (protocolWhitelist ));
2870
+ std::move (protocolAllowlist ));
2871
2871
}
2872
2872
}
2873
2873
}
0 commit comments