forked from OSchip/llvm-project
As part of using inclusive language within the llvm project,
migrate away from the use of blacklist and whitelist.
This commit is contained in:
parent
f92011d875
commit
937c135dd5
|
|
@ -27,7 +27,7 @@
|
||||||
// First argument of the command line received from underlying compilation
|
// First argument of the command line received from underlying compilation
|
||||||
// database is used as compiler driver path. Due to this arbitrary binary
|
// database is used as compiler driver path. Due to this arbitrary binary
|
||||||
// execution, this mechanism is not used by default and only executes binaries
|
// execution, this mechanism is not used by default and only executes binaries
|
||||||
// in the paths that are explicitly whitelisted by the user.
|
// in the paths that are explicitly included by the user.
|
||||||
|
|
||||||
#include "GlobalCompilationDatabase.h"
|
#include "GlobalCompilationDatabase.h"
|
||||||
#include "support/Logger.h"
|
#include "support/Logger.h"
|
||||||
|
|
@ -94,7 +94,7 @@ extractSystemIncludes(PathRef Driver, llvm::StringRef Lang,
|
||||||
SPAN_ATTACH(Tracer, "lang", Lang);
|
SPAN_ATTACH(Tracer, "lang", Lang);
|
||||||
|
|
||||||
if (!QueryDriverRegex.match(Driver)) {
|
if (!QueryDriverRegex.match(Driver)) {
|
||||||
vlog("System include extraction: not whitelisted driver {0}", Driver);
|
vlog("System include extraction: not allowed driver {0}", Driver);
|
||||||
return {};
|
return {};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -363,8 +363,8 @@ locateSymbolTextually(const SpelledWord &Word, ParsedAST &AST,
|
||||||
if ((Word.ExpandedToken && !isDependentName(NodeKind)) ||
|
if ((Word.ExpandedToken && !isDependentName(NodeKind)) ||
|
||||||
!Word.LikelyIdentifier || !Index)
|
!Word.LikelyIdentifier || !Index)
|
||||||
return {};
|
return {};
|
||||||
// We don't want to handle words in string literals. It'd be nice to whitelist
|
// We don't want to handle words in string literals. It'd be nice to include
|
||||||
// comments instead, but they're not retained in TokenBuffer.
|
// comments, but they're not retained in TokenBuffer.
|
||||||
if (Word.PartOfSpelledToken &&
|
if (Word.PartOfSpelledToken &&
|
||||||
isStringLiteral(Word.PartOfSpelledToken->kind()))
|
isStringLiteral(Word.PartOfSpelledToken->kind()))
|
||||||
return {};
|
return {};
|
||||||
|
|
@ -469,8 +469,8 @@ const syntax::Token *findNearbyIdentifier(const SpelledWord &Word,
|
||||||
// Unlikely identifiers are OK if they were used as identifiers nearby.
|
// Unlikely identifiers are OK if they were used as identifiers nearby.
|
||||||
if (Word.ExpandedToken)
|
if (Word.ExpandedToken)
|
||||||
return nullptr;
|
return nullptr;
|
||||||
// We don't want to handle words in string literals. It'd be nice to whitelist
|
// We don't want to handle words in string literals. It'd be nice to include
|
||||||
// comments instead, but they're not retained in TokenBuffer.
|
// comments, but they're not retained in TokenBuffer.
|
||||||
if (Word.PartOfSpelledToken &&
|
if (Word.PartOfSpelledToken &&
|
||||||
isStringLiteral(Word.PartOfSpelledToken->kind()))
|
isStringLiteral(Word.PartOfSpelledToken->kind()))
|
||||||
return {};
|
return {};
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue