Skip to content

Commit b01974e

Browse files
author
git apple-llvm automerger
committed
Merge commit '55651e743b41' from llvm.org/main into next
2 parents 3fe3b35 + 55651e7 commit b01974e

File tree

5 files changed

+7
-9
lines changed

5 files changed

+7
-9
lines changed

clang/lib/Analysis/FlowSensitive/DataflowAnalysisContext.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ StorageLocation &DataflowAnalysisContext::createStorageLocation(QualType Type) {
8686
// Can't use `StringSet` as the return type as it doesn't support `operator==`.
8787
template <typename T>
8888
static llvm::DenseSet<llvm::StringRef> getKeys(const llvm::StringMap<T> &Map) {
89-
return llvm::DenseSet<llvm::StringRef>(Map.keys().begin(), Map.keys().end());
89+
return llvm::DenseSet<llvm::StringRef>(llvm::from_range, Map.keys());
9090
}
9191

9292
RecordStorageLocation &DataflowAnalysisContext::createRecordStorageLocation(

clang/lib/CodeGen/CGOpenMPRuntimeGPU.cpp

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -129,8 +129,8 @@ static RecordDecl *buildRecordForGlobalizedVars(
129129
// };
130130
RecordDecl *GlobalizedRD = C.buildImplicitRecord("_globalized_locals_ty");
131131
GlobalizedRD->startDefinition();
132-
llvm::SmallPtrSet<const ValueDecl *, 16> SingleEscaped(
133-
EscapedDeclsForTeams.begin(), EscapedDeclsForTeams.end());
132+
llvm::SmallPtrSet<const ValueDecl *, 16> SingleEscaped(llvm::from_range,
133+
EscapedDeclsForTeams);
134134
for (const auto &Pair : GlobalizedVars) {
135135
const ValueDecl *VD = Pair.second;
136136
QualType Type = VD->getType();
@@ -322,8 +322,7 @@ class CheckVarsEscapingDeclContext final
322322
public:
323323
CheckVarsEscapingDeclContext(CodeGenFunction &CGF,
324324
ArrayRef<const ValueDecl *> TeamsReductions)
325-
: CGF(CGF), EscapedDecls(TeamsReductions.begin(), TeamsReductions.end()) {
326-
}
325+
: CGF(CGF), EscapedDecls(llvm::from_range, TeamsReductions) {}
327326
virtual ~CheckVarsEscapingDeclContext() = default;
328327
void VisitDeclStmt(const DeclStmt *S) {
329328
if (!S)

clang/lib/Sema/SemaTemplateVariadic.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -498,7 +498,7 @@ bool Sema::DiagnoseUnexpandedParameterPackInRequiresExpr(RequiresExpr *RE) {
498498
// We only care about unexpanded references to the RequiresExpr's own
499499
// parameter packs.
500500
auto Parms = RE->getLocalParameters();
501-
llvm::SmallPtrSet<NamedDecl*, 8> ParmSet(Parms.begin(), Parms.end());
501+
llvm::SmallPtrSet<NamedDecl *, 8> ParmSet(llvm::from_range, Parms);
502502
SmallVector<UnexpandedParameterPack, 2> UnexpandedParms;
503503
for (auto Parm : Unexpanded)
504504
if (ParmSet.contains(Parm.first.dyn_cast<NamedDecl *>()))

clang/lib/Tooling/Inclusions/Stdlib/StandardLibrary.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ static int countSymbols(Lang Language) {
7777
}
7878
}
7979
#undef SYMBOL
80-
return llvm::DenseSet<StringRef>(Symbols.begin(), Symbols.end()).size();
80+
return llvm::DenseSet<StringRef>(llvm::from_range, Symbols).size();
8181
}
8282

8383
static int initialize(Lang Language) {

clang/unittests/Analysis/FlowSensitive/SimplifyConstraintsTest.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,7 @@ class SimplifyConstraintsTest : public ::testing::Test {
2424
protected:
2525
llvm::SetVector<const Formula *> parse(StringRef Lines) {
2626
std::vector<const Formula *> formulas = test::parseFormulas(A, Lines);
27-
llvm::SetVector<const Formula *> Constraints(formulas.begin(),
28-
formulas.end());
27+
llvm::SetVector<const Formula *> Constraints(llvm::from_range, formulas);
2928
return Constraints;
3029
}
3130

0 commit comments

Comments
 (0)