Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions clang/lib/CodeGen/CGOpenMPRuntime.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -10532,8 +10532,7 @@ getNDSWDS(const FunctionDecl *FD, ArrayRef<ParamAttrTy> ParamAttrs) {
}) &&
"Invalid size");

return std::make_tuple(*std::min_element(std::begin(Sizes), std::end(Sizes)),
*std::max_element(std::begin(Sizes), std::end(Sizes)),
return std::make_tuple(*llvm::min_element(Sizes), *llvm::max_element(Sizes),
OutputBecomesInput);
}

Expand Down
2 changes: 1 addition & 1 deletion clang/lib/CodeGen/CodeGenPGO.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1486,7 +1486,7 @@ CodeGenFunction::createProfileWeights(ArrayRef<uint64_t> Weights) const {
return nullptr;

// Check for empty weights.
uint64_t MaxWeight = *std::max_element(Weights.begin(), Weights.end());
uint64_t MaxWeight = *llvm::max_element(Weights);
if (MaxWeight == 0)
return nullptr;

Expand Down
7 changes: 4 additions & 3 deletions clang/lib/Sema/SemaCUDA.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -330,9 +330,10 @@ void SemaCUDA::EraseUnwantedMatches(
};

// Find the best call preference among the functions in Matches.
CUDAFunctionPreference BestCFP = GetCFP(*std::max_element(
Matches.begin(), Matches.end(),
[&](const Pair &M1, const Pair &M2) { return GetCFP(M1) < GetCFP(M2); }));
CUDAFunctionPreference BestCFP =
GetCFP(*llvm::max_element(Matches, [&](const Pair &M1, const Pair &M2) {
return GetCFP(M1) < GetCFP(M2);
}));

// Erase all functions with lower priority.
llvm::erase_if(Matches,
Expand Down
5 changes: 2 additions & 3 deletions clang/utils/TableGen/ClangOptionDocEmitter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -336,9 +336,8 @@ void emitOption(const DocumentedOption &Option, const Record *DocInfo,
});
assert(!SphinxOptionIDs.empty() && "no flags for option");
static std::map<std::string, int> NextSuffix;
int SphinxWorkaroundSuffix = NextSuffix[*std::max_element(
SphinxOptionIDs.begin(), SphinxOptionIDs.end(),
[&](const std::string &A, const std::string &B) {
int SphinxWorkaroundSuffix = NextSuffix[*llvm::max_element(
SphinxOptionIDs, [&](const std::string &A, const std::string &B) {
return NextSuffix[A] < NextSuffix[B];
})];
for (auto &S : SphinxOptionIDs)
Expand Down
Loading