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
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ StorageLocation &DataflowAnalysisContext::createStorageLocation(QualType Type) {
// Can't use `StringSet` as the return type as it doesn't support `operator==`.
template <typename T>
static llvm::DenseSet<llvm::StringRef> getKeys(const llvm::StringMap<T> &Map) {
return llvm::DenseSet<llvm::StringRef>(Map.keys().begin(), Map.keys().end());
return llvm::DenseSet<llvm::StringRef>(llvm::from_range, Map.keys());
}

RecordStorageLocation &DataflowAnalysisContext::createRecordStorageLocation(
Expand Down
7 changes: 3 additions & 4 deletions clang/lib/CodeGen/CGOpenMPRuntimeGPU.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -129,8 +129,8 @@ static RecordDecl *buildRecordForGlobalizedVars(
// };
RecordDecl *GlobalizedRD = C.buildImplicitRecord("_globalized_locals_ty");
GlobalizedRD->startDefinition();
llvm::SmallPtrSet<const ValueDecl *, 16> SingleEscaped(
EscapedDeclsForTeams.begin(), EscapedDeclsForTeams.end());
llvm::SmallPtrSet<const ValueDecl *, 16> SingleEscaped(llvm::from_range,
EscapedDeclsForTeams);
for (const auto &Pair : GlobalizedVars) {
const ValueDecl *VD = Pair.second;
QualType Type = VD->getType();
Expand Down Expand Up @@ -322,8 +322,7 @@ class CheckVarsEscapingDeclContext final
public:
CheckVarsEscapingDeclContext(CodeGenFunction &CGF,
ArrayRef<const ValueDecl *> TeamsReductions)
: CGF(CGF), EscapedDecls(TeamsReductions.begin(), TeamsReductions.end()) {
}
: CGF(CGF), EscapedDecls(llvm::from_range, TeamsReductions) {}
virtual ~CheckVarsEscapingDeclContext() = default;
void VisitDeclStmt(const DeclStmt *S) {
if (!S)
Expand Down
2 changes: 1 addition & 1 deletion clang/lib/Sema/SemaTemplateVariadic.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -498,7 +498,7 @@ bool Sema::DiagnoseUnexpandedParameterPackInRequiresExpr(RequiresExpr *RE) {
// We only care about unexpanded references to the RequiresExpr's own
// parameter packs.
auto Parms = RE->getLocalParameters();
llvm::SmallPtrSet<NamedDecl*, 8> ParmSet(Parms.begin(), Parms.end());
llvm::SmallPtrSet<NamedDecl *, 8> ParmSet(llvm::from_range, Parms);
SmallVector<UnexpandedParameterPack, 2> UnexpandedParms;
for (auto Parm : Unexpanded)
if (ParmSet.contains(Parm.first.dyn_cast<NamedDecl *>()))
Expand Down
2 changes: 1 addition & 1 deletion clang/lib/Tooling/Inclusions/Stdlib/StandardLibrary.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ static int countSymbols(Lang Language) {
}
}
#undef SYMBOL
return llvm::DenseSet<StringRef>(Symbols.begin(), Symbols.end()).size();
return llvm::DenseSet<StringRef>(llvm::from_range, Symbols).size();
}

static int initialize(Lang Language) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,7 @@ class SimplifyConstraintsTest : public ::testing::Test {
protected:
llvm::SetVector<const Formula *> parse(StringRef Lines) {
std::vector<const Formula *> formulas = test::parseFormulas(A, Lines);
llvm::SetVector<const Formula *> Constraints(formulas.begin(),
formulas.end());
llvm::SetVector<const Formula *> Constraints(llvm::from_range, formulas);
return Constraints;
}

Expand Down
Loading