forked from OSchip/llvm-project
parent
21a92a8a55
commit
36fbd0da5f
|
@ -108,8 +108,7 @@ void AssertSideEffectCheck::check(const MatchFinder::MatchResult &Result) {
|
|||
StringRef MacroName = Lexer::getImmediateMacroName(Loc, SM, LangOpts);
|
||||
|
||||
// Check if this macro is an assert.
|
||||
if (std::find(AssertMacros.begin(), AssertMacros.end(), MacroName) !=
|
||||
AssertMacros.end()) {
|
||||
if (llvm::is_contained(AssertMacros, MacroName)) {
|
||||
AssertMacroName = MacroName;
|
||||
break;
|
||||
}
|
||||
|
|
|
@ -105,7 +105,7 @@ void ForwardingReferenceOverloadCheck::check(
|
|||
// template as the function parameter of that type. (This implies that type
|
||||
// deduction will happen on the type.)
|
||||
const TemplateParameterList *Params = FuncTemplate->getTemplateParameters();
|
||||
if (std::find(Params->begin(), Params->end(), TypeParmDecl) == Params->end())
|
||||
if (!llvm::is_contained(*Params, TypeParmDecl))
|
||||
return;
|
||||
|
||||
// Every parameter after the first must have a default value.
|
||||
|
|
|
@ -242,10 +242,8 @@ public:
|
|||
getOutermostMacroName(StartLoc, SM, Context.getLangOpts());
|
||||
|
||||
// Check to see if the user wants to replace the macro being expanded.
|
||||
if (std::find(NullMacros.begin(), NullMacros.end(), OutermostMacroName) ==
|
||||
NullMacros.end()) {
|
||||
if (!llvm::is_contained(NullMacros, OutermostMacroName))
|
||||
return skipSubTree();
|
||||
}
|
||||
|
||||
StartLoc = SM.getFileLoc(StartLoc);
|
||||
EndLoc = SM.getFileLoc(EndLoc);
|
||||
|
@ -327,8 +325,7 @@ private:
|
|||
|
||||
StringRef Name =
|
||||
Lexer::getImmediateMacroName(OldArgLoc, SM, Context.getLangOpts());
|
||||
return std::find(NullMacros.begin(), NullMacros.end(), Name) !=
|
||||
NullMacros.end();
|
||||
return llvm::is_contained(NullMacros, Name);
|
||||
}
|
||||
|
||||
MacroLoc = SM.getExpansionRange(ArgLoc).getBegin();
|
||||
|
|
|
@ -369,7 +369,7 @@ getModularizeArgumentsAdjuster(DependencyMap &Dependencies) {
|
|||
// Ignore warnings. (Insert after "clang_tool" at beginning.)
|
||||
NewArgs.insert(NewArgs.begin() + 1, "-w");
|
||||
// Since we are compiling .h files, assume C++ unless given a -x option.
|
||||
if (std::find(NewArgs.begin(), NewArgs.end(), "-x") == NewArgs.end()) {
|
||||
if (!llvm::is_contained(NewArgs, "-x")) {
|
||||
NewArgs.insert(NewArgs.begin() + 2, "-x");
|
||||
NewArgs.insert(NewArgs.begin() + 3, "c++");
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue