[clang] [clang][OpenMP] Rename `varlists` to `varlist`, NFC (PR #101058)
Krzysztof Parzyszek via cfe-commits
cfe-commits at lists.llvm.org
Mon Jul 29 11:37:01 PDT 2024
https://github.com/kparzysz created https://github.com/llvm/llvm-project/pull/101058
It returns a range of variables (via Expr*), not a range of lists.
>From e6286e542ede1dfe5b63ce3b8d86a78fc8c8c895 Mon Sep 17 00:00:00 2001
From: Krzysztof Parzyszek <Krzysztof.Parzyszek at amd.com>
Date: Mon, 29 Jul 2024 13:29:09 -0500
Subject: [PATCH] [clang][OpenMP] Rename `varlists` to `varlist`, NFC
It returns a range of variables (via Expr*), not a range of lists.
---
clang/include/clang/AST/ASTNodeTraverser.h | 4 +-
clang/include/clang/AST/DeclOpenMP.h | 8 +--
clang/include/clang/AST/OpenMPClause.h | 4 +-
clang/include/clang/AST/RecursiveASTVisitor.h | 8 +--
clang/lib/AST/StmtProfile.cpp | 4 +-
clang/lib/CodeGen/CGDecl.cpp | 2 +-
clang/lib/CodeGen/CGOpenMPRuntime.cpp | 18 +++----
clang/lib/CodeGen/CGStmtOpenMP.cpp | 38 ++++++-------
clang/lib/CodeGen/CodeGenModule.cpp | 2 +-
clang/lib/Sema/SemaOpenMP.cpp | 18 +++----
.../lib/Sema/SemaTemplateInstantiateDecl.cpp | 10 ++--
clang/lib/Sema/TreeTransform.h | 50 ++++++++---------
clang/lib/Serialization/ASTWriter.cpp | 54 +++++++++----------
13 files changed, 110 insertions(+), 110 deletions(-)
diff --git a/clang/include/clang/AST/ASTNodeTraverser.h b/clang/include/clang/AST/ASTNodeTraverser.h
index 616f92691ec32..0546c19ce8119 100644
--- a/clang/include/clang/AST/ASTNodeTraverser.h
+++ b/clang/include/clang/AST/ASTNodeTraverser.h
@@ -583,7 +583,7 @@ class ASTNodeTraverser
void VisitCapturedDecl(const CapturedDecl *D) { Visit(D->getBody()); }
void VisitOMPThreadPrivateDecl(const OMPThreadPrivateDecl *D) {
- for (const auto *E : D->varlists())
+ for (const auto *E : D->varlist())
Visit(E);
}
@@ -603,7 +603,7 @@ class ASTNodeTraverser
}
void VisitOMPAllocateDecl(const OMPAllocateDecl *D) {
- for (const auto *E : D->varlists())
+ for (const auto *E : D->varlist())
Visit(E);
for (const auto *C : D->clauselists())
Visit(C);
diff --git a/clang/include/clang/AST/DeclOpenMP.h b/clang/include/clang/AST/DeclOpenMP.h
index e542c3c8e66b0..868662208efa1 100644
--- a/clang/include/clang/AST/DeclOpenMP.h
+++ b/clang/include/clang/AST/DeclOpenMP.h
@@ -143,10 +143,10 @@ class OMPThreadPrivateDecl final : public OMPDeclarativeDirective<Decl> {
unsigned varlist_size() const { return Data->getNumChildren(); }
bool varlist_empty() const { return Data->getChildren().empty(); }
- varlist_range varlists() {
+ varlist_range varlist() {
return varlist_range(varlist_begin(), varlist_end());
}
- varlist_const_range varlists() const {
+ varlist_const_range varlist() const {
return varlist_const_range(varlist_begin(), varlist_end());
}
varlist_iterator varlist_begin() { return getVars().begin(); }
@@ -513,10 +513,10 @@ class OMPAllocateDecl final : public OMPDeclarativeDirective<Decl> {
unsigned clauselist_size() const { return Data->getNumClauses(); }
bool clauselist_empty() const { return Data->getClauses().empty(); }
- varlist_range varlists() {
+ varlist_range varlist() {
return varlist_range(varlist_begin(), varlist_end());
}
- varlist_const_range varlists() const {
+ varlist_const_range varlist() const {
return varlist_const_range(varlist_begin(), varlist_end());
}
varlist_iterator varlist_begin() { return getVars().begin(); }
diff --git a/clang/include/clang/AST/OpenMPClause.h b/clang/include/clang/AST/OpenMPClause.h
index 325a1baa44614..b029c72fa7d8f 100644
--- a/clang/include/clang/AST/OpenMPClause.h
+++ b/clang/include/clang/AST/OpenMPClause.h
@@ -316,10 +316,10 @@ template <class T> class OMPVarListClause : public OMPClause {
unsigned varlist_size() const { return NumVars; }
bool varlist_empty() const { return NumVars == 0; }
- varlist_range varlists() {
+ varlist_range varlist() {
return varlist_range(varlist_begin(), varlist_end());
}
- varlist_const_range varlists() const {
+ varlist_const_range varlist() const {
return varlist_const_range(varlist_begin(), varlist_end());
}
diff --git a/clang/include/clang/AST/RecursiveASTVisitor.h b/clang/include/clang/AST/RecursiveASTVisitor.h
index e3c0cb46799f7..79a1f4c0ea1d7 100644
--- a/clang/include/clang/AST/RecursiveASTVisitor.h
+++ b/clang/include/clang/AST/RecursiveASTVisitor.h
@@ -1772,7 +1772,7 @@ DEF_TRAVERSE_DECL(UsingShadowDecl, {})
DEF_TRAVERSE_DECL(ConstructorUsingShadowDecl, {})
DEF_TRAVERSE_DECL(OMPThreadPrivateDecl, {
- for (auto *I : D->varlists()) {
+ for (auto *I : D->varlist()) {
TRY_TO(TraverseStmt(I));
}
})
@@ -1801,7 +1801,7 @@ DEF_TRAVERSE_DECL(OMPDeclareMapperDecl, {
DEF_TRAVERSE_DECL(OMPCapturedExprDecl, { TRY_TO(TraverseVarHelper(D)); })
DEF_TRAVERSE_DECL(OMPAllocateDecl, {
- for (auto *I : D->varlists())
+ for (auto *I : D->varlist())
TRY_TO(TraverseStmt(I));
for (auto *C : D->clauselists())
TRY_TO(TraverseOMPClause(C));
@@ -3552,7 +3552,7 @@ bool RecursiveASTVisitor<Derived>::VisitOMPNocontextClause(
template <typename Derived>
template <typename T>
bool RecursiveASTVisitor<Derived>::VisitOMPClauseList(T *Node) {
- for (auto *E : Node->varlists()) {
+ for (auto *E : Node->varlist()) {
TRY_TO(TraverseStmt(E));
}
return true;
@@ -3926,7 +3926,7 @@ template <typename Derived>
bool RecursiveASTVisitor<Derived>::VisitOMPAffinityClause(
OMPAffinityClause *C) {
TRY_TO(TraverseStmt(C->getModifier()));
- for (Expr *E : C->varlists())
+ for (Expr *E : C->varlist())
TRY_TO(TraverseStmt(E));
return true;
}
diff --git a/clang/lib/AST/StmtProfile.cpp b/clang/lib/AST/StmtProfile.cpp
index 89d2a422509d8..f1e723b4242ee 100644
--- a/clang/lib/AST/StmtProfile.cpp
+++ b/clang/lib/AST/StmtProfile.cpp
@@ -624,7 +624,7 @@ void OMPClauseProfiler::VisitOMPFilterClause(const OMPFilterClause *C) {
template<typename T>
void OMPClauseProfiler::VisitOMPClauseList(T *Node) {
- for (auto *E : Node->varlists()) {
+ for (auto *E : Node->varlist()) {
if (E)
Profiler->VisitStmt(E);
}
@@ -918,7 +918,7 @@ void OMPClauseProfiler::VisitOMPUsesAllocatorsClause(
void OMPClauseProfiler::VisitOMPAffinityClause(const OMPAffinityClause *C) {
if (const Expr *Modifier = C->getModifier())
Profiler->VisitStmt(Modifier);
- for (const Expr *E : C->varlists())
+ for (const Expr *E : C->varlist())
Profiler->VisitStmt(E);
}
void OMPClauseProfiler::VisitOMPOrderClause(const OMPOrderClause *C) {}
diff --git a/clang/lib/CodeGen/CGDecl.cpp b/clang/lib/CodeGen/CGDecl.cpp
index c3251bb5ab565..882dbad456379 100644
--- a/clang/lib/CodeGen/CGDecl.cpp
+++ b/clang/lib/CodeGen/CGDecl.cpp
@@ -2790,7 +2790,7 @@ void CodeGenModule::EmitOMPRequiresDecl(const OMPRequiresDecl *D) {
}
void CodeGenModule::EmitOMPAllocateDecl(const OMPAllocateDecl *D) {
- for (const Expr *E : D->varlists()) {
+ for (const Expr *E : D->varlist()) {
const auto *DE = cast<DeclRefExpr>(E);
const auto *VD = cast<VarDecl>(DE->getDecl());
diff --git a/clang/lib/CodeGen/CGOpenMPRuntime.cpp b/clang/lib/CodeGen/CGOpenMPRuntime.cpp
index ec644acf68a20..d869aa3322cce 100644
--- a/clang/lib/CodeGen/CGOpenMPRuntime.cpp
+++ b/clang/lib/CodeGen/CGOpenMPRuntime.cpp
@@ -3861,7 +3861,7 @@ CGOpenMPRuntime::emitTaskInit(CodeGenFunction &CGF, SourceLocation Loc,
HasIterator = true;
continue;
}
- for (const Expr *E : C->varlists()) {
+ for (const Expr *E : C->varlist()) {
llvm::Value *Addr;
llvm::Value *Size;
std::tie(Addr, Size) = getPointerAndSize(CGF, E);
@@ -3894,7 +3894,7 @@ CGOpenMPRuntime::emitTaskInit(CodeGenFunction &CGF, SourceLocation Loc,
continue;
OMPIteratorGeneratorScope IteratorScope(
CGF, cast_or_null<OMPIteratorExpr>(Modifier->IgnoreParenImpCasts()));
- for (const Expr *E : C->varlists()) {
+ for (const Expr *E : C->varlist()) {
llvm::Value *Addr;
llvm::Value *Size;
std::tie(Addr, Size) = getPointerAndSize(CGF, E);
@@ -8187,7 +8187,7 @@ class MappableExprsHandler {
: CurDir(&Dir), CGF(CGF) {
// Extract firstprivate clause information.
for (const auto *C : Dir.getClausesOfKind<OMPFirstprivateClause>())
- for (const auto *D : C->varlists())
+ for (const auto *D : C->varlist())
FirstPrivateDecls.try_emplace(
cast<VarDecl>(cast<DeclRefExpr>(D)->getDecl()), C->isImplicit());
// Extract implicit firstprivates from uses_allocators clauses.
@@ -11506,7 +11506,7 @@ void CGOpenMPRuntime::LastprivateConditionalRAII::tryToDisableInnerAnalysis(
}
// Exclude vars in private clauses.
for (const auto *C : S.getClausesOfKind<OMPPrivateClause>()) {
- for (const Expr *Ref : C->varlists()) {
+ for (const Expr *Ref : C->varlist()) {
if (!Ref->getType()->isScalarType())
continue;
const auto *DRE = dyn_cast<DeclRefExpr>(Ref->IgnoreParenImpCasts());
@@ -11516,7 +11516,7 @@ void CGOpenMPRuntime::LastprivateConditionalRAII::tryToDisableInnerAnalysis(
}
}
for (const auto *C : S.getClausesOfKind<OMPFirstprivateClause>()) {
- for (const Expr *Ref : C->varlists()) {
+ for (const Expr *Ref : C->varlist()) {
if (!Ref->getType()->isScalarType())
continue;
const auto *DRE = dyn_cast<DeclRefExpr>(Ref->IgnoreParenImpCasts());
@@ -11526,7 +11526,7 @@ void CGOpenMPRuntime::LastprivateConditionalRAII::tryToDisableInnerAnalysis(
}
}
for (const auto *C : S.getClausesOfKind<OMPLastprivateClause>()) {
- for (const Expr *Ref : C->varlists()) {
+ for (const Expr *Ref : C->varlist()) {
if (!Ref->getType()->isScalarType())
continue;
const auto *DRE = dyn_cast<DeclRefExpr>(Ref->IgnoreParenImpCasts());
@@ -11536,7 +11536,7 @@ void CGOpenMPRuntime::LastprivateConditionalRAII::tryToDisableInnerAnalysis(
}
}
for (const auto *C : S.getClausesOfKind<OMPReductionClause>()) {
- for (const Expr *Ref : C->varlists()) {
+ for (const Expr *Ref : C->varlist()) {
if (!Ref->getType()->isScalarType())
continue;
const auto *DRE = dyn_cast<DeclRefExpr>(Ref->IgnoreParenImpCasts());
@@ -11546,7 +11546,7 @@ void CGOpenMPRuntime::LastprivateConditionalRAII::tryToDisableInnerAnalysis(
}
}
for (const auto *C : S.getClausesOfKind<OMPLinearClause>()) {
- for (const Expr *Ref : C->varlists()) {
+ for (const Expr *Ref : C->varlist()) {
if (!Ref->getType()->isScalarType())
continue;
const auto *DRE = dyn_cast<DeclRefExpr>(Ref->IgnoreParenImpCasts());
@@ -11589,7 +11589,7 @@ CGOpenMPRuntime::LastprivateConditionalRAII::LastprivateConditionalRAII(
if (C->getKind() != OMPC_LASTPRIVATE_conditional)
continue;
- for (const Expr *Ref : C->varlists()) {
+ for (const Expr *Ref : C->varlist()) {
Data.DeclToUniqueName.insert(std::make_pair(
cast<DeclRefExpr>(Ref->IgnoreParenImpCasts())->getDecl(),
SmallString<16>(generateUniqueName(CGM, "pl_cond", Ref))));
diff --git a/clang/lib/CodeGen/CGStmtOpenMP.cpp b/clang/lib/CodeGen/CGStmtOpenMP.cpp
index 4ee9840f12e06..b1ac9361957ff 100644
--- a/clang/lib/CodeGen/CGStmtOpenMP.cpp
+++ b/clang/lib/CodeGen/CGStmtOpenMP.cpp
@@ -156,7 +156,7 @@ class OMPLoopScope : public CodeGenFunction::RunCleanupsScope {
}
// Mark private vars as undefs.
for (const auto *C : LD->getClausesOfKind<OMPPrivateClause>()) {
- for (const Expr *IRef : C->varlists()) {
+ for (const Expr *IRef : C->varlist()) {
const auto *OrigVD =
cast<VarDecl>(cast<DeclRefExpr>(IRef)->getDecl());
if (EmittedAsPrivate.insert(OrigVD->getCanonicalDecl()).second) {
@@ -257,13 +257,13 @@ class OMPSimdLexicalScope : public CodeGenFunction::LexicalScope {
}
}
} else if (const auto *UDP = dyn_cast<OMPUseDevicePtrClause>(C)) {
- for (const Expr *E : UDP->varlists()) {
+ for (const Expr *E : UDP->varlist()) {
const Decl *D = cast<DeclRefExpr>(E)->getDecl();
if (const auto *OED = dyn_cast<OMPCapturedExprDecl>(D))
CGF.EmitVarDecl(*OED);
}
} else if (const auto *UDP = dyn_cast<OMPUseDeviceAddrClause>(C)) {
- for (const Expr *E : UDP->varlists()) {
+ for (const Expr *E : UDP->varlist()) {
const Decl *D = getBaseDecl(E);
if (const auto *OED = dyn_cast<OMPCapturedExprDecl>(D))
CGF.EmitVarDecl(*OED);
@@ -865,7 +865,7 @@ bool CodeGenFunction::EmitOMPFirstprivateClause(const OMPExecutableDirective &D,
bool FirstprivateIsLastprivate = false;
llvm::DenseMap<const VarDecl *, OpenMPLastprivateModifier> Lastprivates;
for (const auto *C : D.getClausesOfKind<OMPLastprivateClause>()) {
- for (const auto *D : C->varlists())
+ for (const auto *D : C->varlist())
Lastprivates.try_emplace(
cast<VarDecl>(cast<DeclRefExpr>(D)->getDecl())->getCanonicalDecl(),
C->getKind());
@@ -1545,7 +1545,7 @@ checkForLastprivateConditionalUpdate(CodeGenFunction &CGF,
return;
llvm::DenseSet<CanonicalDeclPtr<const VarDecl>> PrivateDecls;
for (const auto *C : S.getClausesOfKind<OMPReductionClause>()) {
- for (const Expr *Ref : C->varlists()) {
+ for (const Expr *Ref : C->varlist()) {
if (!Ref->getType()->isScalarType())
continue;
const auto *DRE = dyn_cast<DeclRefExpr>(Ref->IgnoreParenImpCasts());
@@ -1556,7 +1556,7 @@ checkForLastprivateConditionalUpdate(CodeGenFunction &CGF,
}
}
for (const auto *C : S.getClausesOfKind<OMPLastprivateClause>()) {
- for (const Expr *Ref : C->varlists()) {
+ for (const Expr *Ref : C->varlist()) {
if (!Ref->getType()->isScalarType())
continue;
const auto *DRE = dyn_cast<DeclRefExpr>(Ref->IgnoreParenImpCasts());
@@ -1567,7 +1567,7 @@ checkForLastprivateConditionalUpdate(CodeGenFunction &CGF,
}
}
for (const auto *C : S.getClausesOfKind<OMPLinearClause>()) {
- for (const Expr *Ref : C->varlists()) {
+ for (const Expr *Ref : C->varlist()) {
if (!Ref->getType()->isScalarType())
continue;
const auto *DRE = dyn_cast<DeclRefExpr>(Ref->IgnoreParenImpCasts());
@@ -1582,7 +1582,7 @@ checkForLastprivateConditionalUpdate(CodeGenFunction &CGF,
// Firstprivates do not return value but may be passed by reference - no need
// to check for updated lastprivate conditional.
for (const auto *C : S.getClausesOfKind<OMPFirstprivateClause>()) {
- for (const Expr *Ref : C->varlists()) {
+ for (const Expr *Ref : C->varlist()) {
if (!Ref->getType()->isScalarType())
continue;
const auto *DRE = dyn_cast<DeclRefExpr>(Ref->IgnoreParenImpCasts());
@@ -2288,7 +2288,7 @@ static void emitAlignedClause(CodeGenFunction &CGF,
cast<llvm::ConstantInt>(CGF.EmitScalarExpr(AlignmentExpr));
ClauseAlignment = AlignmentCI->getValue();
}
- for (const Expr *E : Clause->varlists()) {
+ for (const Expr *E : Clause->varlist()) {
llvm::APInt Alignment(ClauseAlignment);
if (Alignment == 0) {
// OpenMP [2.8.1, Description]
@@ -2407,7 +2407,7 @@ void CodeGenFunction::EmitOMPLinearClause(
}
for (const auto *C : D.getClausesOfKind<OMPLinearClause>()) {
auto CurPrivate = C->privates().begin();
- for (const Expr *E : C->varlists()) {
+ for (const Expr *E : C->varlist()) {
const auto *VD = cast<VarDecl>(cast<DeclRefExpr>(E)->getDecl());
const auto *PrivateVD =
cast<VarDecl>(cast<DeclRefExpr>(*CurPrivate)->getDecl());
@@ -2711,7 +2711,7 @@ GetAlignedMapping(const OMPLoopDirective &S, CodeGenFunction &CGF) {
cast<llvm::ConstantInt>(CGF.EmitScalarExpr(AlignmentExpr));
ClauseAlignment = AlignmentCI->getValue();
}
- for (const Expr *E : Clause->varlists()) {
+ for (const Expr *E : Clause->varlist()) {
llvm::APInt Alignment(ClauseAlignment);
if (Alignment == 0) {
// OpenMP [2.8.1, Description]
@@ -4329,7 +4329,7 @@ void CodeGenFunction::EmitOMPSingleDirective(const OMPSingleDirective &S) {
// Build a list of copyprivate variables along with helper expressions
// (<source>, <destination>, <destination>=<source> expressions)
for (const auto *C : S.getClausesOfKind<OMPCopyprivateClause>()) {
- CopyprivateVars.append(C->varlists().begin(), C->varlists().end());
+ CopyprivateVars.append(C->varlist_begin(), C->varlist_end());
DestExprs.append(C->destination_exprs().begin(),
C->destination_exprs().end());
SrcExprs.append(C->source_exprs().begin(), C->source_exprs().end());
@@ -5035,7 +5035,7 @@ void CodeGenFunction::EmitOMPTaskBasedDirective(
auto IPriv = C->privates().begin();
auto IRed = C->reduction_ops().begin();
auto ITD = C->taskgroup_descriptors().begin();
- for (const Expr *Ref : C->varlists()) {
+ for (const Expr *Ref : C->varlist()) {
InRedVars.emplace_back(Ref);
InRedPrivs.emplace_back(*IPriv);
InRedOps.emplace_back(*IRed);
@@ -5318,7 +5318,7 @@ void CodeGenFunction::processInReduction(const OMPExecutableDirective &S,
auto IPriv = C->privates().begin();
auto IRed = C->reduction_ops().begin();
auto ITD = C->taskgroup_descriptors().begin();
- for (const Expr *Ref : C->varlists()) {
+ for (const Expr *Ref : C->varlist()) {
InRedVars.emplace_back(Ref);
InRedPrivs.emplace_back(*IPriv);
InRedOps.emplace_back(*IRed);
@@ -7346,7 +7346,7 @@ void CodeGenFunction::EmitOMPUseDevicePtrClause(
const llvm::DenseMap<const ValueDecl *, llvm::Value *>
CaptureDeviceAddrMap) {
llvm::SmallDenseSet<CanonicalDeclPtr<const Decl>, 4> Processed;
- for (const Expr *OrigVarIt : C.varlists()) {
+ for (const Expr *OrigVarIt : C.varlist()) {
const auto *OrigVD = cast<VarDecl>(cast<DeclRefExpr>(OrigVarIt)->getDecl());
if (!Processed.insert(OrigVD).second)
continue;
@@ -7397,7 +7397,7 @@ void CodeGenFunction::EmitOMPUseDeviceAddrClause(
const llvm::DenseMap<const ValueDecl *, llvm::Value *>
CaptureDeviceAddrMap) {
llvm::SmallDenseSet<CanonicalDeclPtr<const Decl>, 4> Processed;
- for (const Expr *Ref : C.varlists()) {
+ for (const Expr *Ref : C.varlist()) {
const VarDecl *OrigVD = getBaseDecl(Ref);
if (!Processed.insert(OrigVD).second)
continue;
@@ -7494,13 +7494,13 @@ void CodeGenFunction::EmitOMPTargetDataDirective(
if (CGM.getLangOpts().OMPTargetTriples.empty()) {
// Emit helper decls of the use_device_ptr/use_device_addr clauses.
for (const auto *C : S.getClausesOfKind<OMPUseDevicePtrClause>())
- for (const Expr *E : C->varlists()) {
+ for (const Expr *E : C->varlist()) {
const Decl *D = cast<DeclRefExpr>(E)->getDecl();
if (const auto *OED = dyn_cast<OMPCapturedExprDecl>(D))
CGF.EmitVarDecl(*OED);
}
for (const auto *C : S.getClausesOfKind<OMPUseDeviceAddrClause>())
- for (const Expr *E : C->varlists()) {
+ for (const Expr *E : C->varlist()) {
const Decl *D = getBaseDecl(E);
if (const auto *OED = dyn_cast<OMPCapturedExprDecl>(D))
CGF.EmitVarDecl(*OED);
@@ -8232,7 +8232,7 @@ void CodeGenFunction::EmitSimpleOMPExecutableDirective(
if (isOpenMPTaskingDirective(D.getDirectiveKind())) {
// Capture global firstprivates to avoid crash.
for (const auto *C : D.getClausesOfKind<OMPFirstprivateClause>()) {
- for (const Expr *Ref : C->varlists()) {
+ for (const Expr *Ref : C->varlist()) {
const auto *DRE = cast<DeclRefExpr>(Ref->IgnoreParenImpCasts());
if (!DRE)
continue;
diff --git a/clang/lib/CodeGen/CodeGenModule.cpp b/clang/lib/CodeGen/CodeGenModule.cpp
index 63ed5b4dd0c31..344a0e538f22a 100644
--- a/clang/lib/CodeGen/CodeGenModule.cpp
+++ b/clang/lib/CodeGen/CodeGenModule.cpp
@@ -7484,7 +7484,7 @@ void CodeGenModule::EmitOMPThreadPrivateDecl(const OMPThreadPrivateDecl *D) {
// Do not emit threadprivates in simd-only mode.
if (LangOpts.OpenMP && LangOpts.OpenMPSimd)
return;
- for (auto RefExpr : D->varlists()) {
+ for (auto RefExpr : D->varlist()) {
auto *VD = cast<VarDecl>(cast<DeclRefExpr>(RefExpr)->getDecl());
bool PerformInit =
VD->getAnyInitializer() &&
diff --git a/clang/lib/Sema/SemaOpenMP.cpp b/clang/lib/Sema/SemaOpenMP.cpp
index 9c80b3eec914c..ab8f293d0a683 100644
--- a/clang/lib/Sema/SemaOpenMP.cpp
+++ b/clang/lib/Sema/SemaOpenMP.cpp
@@ -2831,7 +2831,7 @@ static void checkReductionClauses(Sema &S, DSAStackTy *Stack,
S.Diag(InscanLoc, diag::note_omp_previous_inscan_reduction);
continue;
}
- for (Expr *Ref : RC->varlists()) {
+ for (Expr *Ref : RC->varlist()) {
assert(Ref && "NULL expr in OpenMP nontemporal clause.");
SourceLocation ELoc;
SourceRange ERange;
@@ -2871,7 +2871,7 @@ void SemaOpenMP::EndOpenMPDSABlock(Stmt *CurDirective) {
for (OMPClause *C : D->clauses()) {
if (auto *Clause = dyn_cast<OMPLastprivateClause>(C)) {
SmallVector<Expr *, 8> PrivateCopies;
- for (Expr *DE : Clause->varlists()) {
+ for (Expr *DE : Clause->varlist()) {
if (DE->isValueDependent() || DE->isTypeDependent()) {
PrivateCopies.push_back(nullptr);
continue;
@@ -2909,7 +2909,7 @@ void SemaOpenMP::EndOpenMPDSABlock(Stmt *CurDirective) {
// Finalize nontemporal clause by handling private copies, if any.
if (auto *Clause = dyn_cast<OMPNontemporalClause>(C)) {
SmallVector<Expr *, 8> PrivateRefs;
- for (Expr *RefExpr : Clause->varlists()) {
+ for (Expr *RefExpr : Clause->varlist()) {
assert(RefExpr && "NULL expr in OpenMP nontemporal clause.");
SourceLocation ELoc;
SourceRange ERange;
@@ -3752,7 +3752,7 @@ class DSAAttrChecker final : public StmtVisitor<DSAAttrChecker, void> {
!isOpenMPTaskLoopDirective(S->getDirectiveKind())) {
for (OMPClause *C : S->clauses())
if (auto *FC = dyn_cast<OMPFirstprivateClause>(C)) {
- for (Expr *Ref : FC->varlists())
+ for (Expr *Ref : FC->varlist())
Visit(Ref);
}
}
@@ -4729,7 +4729,7 @@ StmtResult SemaOpenMP::ActOnOpenMPRegionEnd(StmtResult S,
SemaRef.MarkDeclarationsReferencedInExpr(E);
}
if (auto *AC = dyn_cast<OMPAlignedClause>(C)) {
- for (Expr *E : AC->varlists())
+ for (Expr *E : AC->varlist())
SemaRef.MarkDeclarationsReferencedInExpr(E);
}
}
@@ -5311,7 +5311,7 @@ static void checkAllocateClauses(Sema &S, DSAStackTy *Stack,
diag::warn_omp_allocate_thread_on_task_target_directive)
<< getOpenMPDirectiveName(Stack->getCurrentDirective());
}
- for (Expr *E : AC->varlists()) {
+ for (Expr *E : AC->varlist()) {
SourceLocation ELoc;
SourceRange ERange;
Expr *SimpleRefExpr = E;
@@ -6135,7 +6135,7 @@ StmtResult SemaOpenMP::ActOnOpenMPExecutableDirective(
SmallVector<Expr *, 4> ImplicitExprs;
for (OMPClause *C : Clauses) {
if (auto *RC = dyn_cast<OMPReductionClause>(C))
- for (Expr *E : RC->varlists())
+ for (Expr *E : RC->varlist())
if (!isa<DeclRefExpr>(E->IgnoreParenImpCasts()))
ImplicitExprs.emplace_back(E);
}
@@ -10445,7 +10445,7 @@ static bool checkGenericLoopLastprivate(Sema &S, ArrayRef<OMPClause *> Clauses,
bool ErrorFound = false;
for (OMPClause *C : Clauses) {
if (auto *LPC = dyn_cast<OMPLastprivateClause>(C)) {
- for (Expr *RefExpr : LPC->varlists()) {
+ for (Expr *RefExpr : LPC->varlist()) {
SourceLocation ELoc;
SourceRange ERange;
Expr *SimpleRefExpr = RefExpr;
@@ -19123,7 +19123,7 @@ static bool FinishOpenMPLinearClause(OMPLinearClause &Clause, DeclRefExpr *IV,
auto CurInit = Clause.inits().begin();
auto CurPrivate = Clause.privates().begin();
OpenMPLinearClauseKind LinKind = Clause.getModifier();
- for (Expr *RefExpr : Clause.varlists()) {
+ for (Expr *RefExpr : Clause.varlist()) {
SourceLocation ELoc;
SourceRange ERange;
Expr *SimpleRefExpr = RefExpr;
diff --git a/clang/lib/Sema/SemaTemplateInstantiateDecl.cpp b/clang/lib/Sema/SemaTemplateInstantiateDecl.cpp
index a12d2eff1d2c8..f93cd113988ae 100644
--- a/clang/lib/Sema/SemaTemplateInstantiateDecl.cpp
+++ b/clang/lib/Sema/SemaTemplateInstantiateDecl.cpp
@@ -330,7 +330,7 @@ instantiateDependentModeAttr(Sema &S,
static void instantiateOMPDeclareSimdDeclAttr(
Sema &S, const MultiLevelTemplateArgumentList &TemplateArgs,
const OMPDeclareSimdDeclAttr &Attr, Decl *New) {
- // Allow 'this' in clauses with varlists.
+ // Allow 'this' in clauses with varlist.
if (auto *FTD = dyn_cast<FunctionTemplateDecl>(New))
New = FTD->getTemplatedDecl();
auto *FD = cast<FunctionDecl>(New);
@@ -413,7 +413,7 @@ static void instantiateOMPDeclareSimdDeclAttr(
static void instantiateOMPDeclareVariantAttr(
Sema &S, const MultiLevelTemplateArgumentList &TemplateArgs,
const OMPDeclareVariantAttr &Attr, Decl *New) {
- // Allow 'this' in clauses with varlists.
+ // Allow 'this' in clauses with varlist.
if (auto *FTD = dyn_cast<FunctionTemplateDecl>(New))
New = FTD->getTemplatedDecl();
auto *FD = cast<FunctionDecl>(New);
@@ -3588,7 +3588,7 @@ Decl *TemplateDeclInstantiator::VisitUsingPackDecl(UsingPackDecl *D) {
Decl *TemplateDeclInstantiator::VisitOMPThreadPrivateDecl(
OMPThreadPrivateDecl *D) {
SmallVector<Expr *, 5> Vars;
- for (auto *I : D->varlists()) {
+ for (auto *I : D->varlist()) {
Expr *Var = SemaRef.SubstExpr(I, TemplateArgs).get();
assert(isa<DeclRefExpr>(Var) && "threadprivate arg is not a DeclRefExpr");
Vars.push_back(Var);
@@ -3605,7 +3605,7 @@ Decl *TemplateDeclInstantiator::VisitOMPThreadPrivateDecl(
Decl *TemplateDeclInstantiator::VisitOMPAllocateDecl(OMPAllocateDecl *D) {
SmallVector<Expr *, 5> Vars;
- for (auto *I : D->varlists()) {
+ for (auto *I : D->varlist()) {
Expr *Var = SemaRef.SubstExpr(I, TemplateArgs).get();
assert(isa<DeclRefExpr>(Var) && "allocate arg is not a DeclRefExpr");
Vars.push_back(Var);
@@ -3782,7 +3782,7 @@ TemplateDeclInstantiator::VisitOMPDeclareMapperDecl(OMPDeclareMapperDecl *D) {
for (OMPClause *C : D->clauselists()) {
auto *OldC = cast<OMPMapClause>(C);
SmallVector<Expr *, 4> NewVars;
- for (Expr *OE : OldC->varlists()) {
+ for (Expr *OE : OldC->varlist()) {
Expr *NE = SemaRef.SubstExpr(OE, TemplateArgs).get();
if (!NE) {
IsCorrect = false;
diff --git a/clang/lib/Sema/TreeTransform.h b/clang/lib/Sema/TreeTransform.h
index 4d68ebf0cc452..8d3e1edf7a45d 100644
--- a/clang/lib/Sema/TreeTransform.h
+++ b/clang/lib/Sema/TreeTransform.h
@@ -10309,7 +10309,7 @@ OMPClause *TreeTransform<Derived>::TransformOMPInitClause(OMPInitClause *C) {
OMPInteropInfo InteropInfo(C->getIsTarget(), C->getIsTargetSync());
InteropInfo.PreferTypes.reserve(C->varlist_size() - 1);
- for (Expr *E : llvm::drop_begin(C->varlists())) {
+ for (Expr *E : llvm::drop_begin(C->varlist())) {
ExprResult ER = getDerived().TransformExpr(cast<Expr>(E));
if (ER.isInvalid())
return nullptr;
@@ -10447,7 +10447,7 @@ OMPClause *
TreeTransform<Derived>::TransformOMPPrivateClause(OMPPrivateClause *C) {
llvm::SmallVector<Expr *, 16> Vars;
Vars.reserve(C->varlist_size());
- for (auto *VE : C->varlists()) {
+ for (auto *VE : C->varlist()) {
ExprResult EVar = getDerived().TransformExpr(cast<Expr>(VE));
if (EVar.isInvalid())
return nullptr;
@@ -10462,7 +10462,7 @@ OMPClause *TreeTransform<Derived>::TransformOMPFirstprivateClause(
OMPFirstprivateClause *C) {
llvm::SmallVector<Expr *, 16> Vars;
Vars.reserve(C->varlist_size());
- for (auto *VE : C->varlists()) {
+ for (auto *VE : C->varlist()) {
ExprResult EVar = getDerived().TransformExpr(cast<Expr>(VE));
if (EVar.isInvalid())
return nullptr;
@@ -10477,7 +10477,7 @@ OMPClause *
TreeTransform<Derived>::TransformOMPLastprivateClause(OMPLastprivateClause *C) {
llvm::SmallVector<Expr *, 16> Vars;
Vars.reserve(C->varlist_size());
- for (auto *VE : C->varlists()) {
+ for (auto *VE : C->varlist()) {
ExprResult EVar = getDerived().TransformExpr(cast<Expr>(VE));
if (EVar.isInvalid())
return nullptr;
@@ -10493,7 +10493,7 @@ OMPClause *
TreeTransform<Derived>::TransformOMPSharedClause(OMPSharedClause *C) {
llvm::SmallVector<Expr *, 16> Vars;
Vars.reserve(C->varlist_size());
- for (auto *VE : C->varlists()) {
+ for (auto *VE : C->varlist()) {
ExprResult EVar = getDerived().TransformExpr(cast<Expr>(VE));
if (EVar.isInvalid())
return nullptr;
@@ -10508,7 +10508,7 @@ OMPClause *
TreeTransform<Derived>::TransformOMPReductionClause(OMPReductionClause *C) {
llvm::SmallVector<Expr *, 16> Vars;
Vars.reserve(C->varlist_size());
- for (auto *VE : C->varlists()) {
+ for (auto *VE : C->varlist()) {
ExprResult EVar = getDerived().TransformExpr(cast<Expr>(VE));
if (EVar.isInvalid())
return nullptr;
@@ -10555,7 +10555,7 @@ OMPClause *TreeTransform<Derived>::TransformOMPTaskReductionClause(
OMPTaskReductionClause *C) {
llvm::SmallVector<Expr *, 16> Vars;
Vars.reserve(C->varlist_size());
- for (auto *VE : C->varlists()) {
+ for (auto *VE : C->varlist()) {
ExprResult EVar = getDerived().TransformExpr(cast<Expr>(VE));
if (EVar.isInvalid())
return nullptr;
@@ -10601,7 +10601,7 @@ OMPClause *
TreeTransform<Derived>::TransformOMPInReductionClause(OMPInReductionClause *C) {
llvm::SmallVector<Expr *, 16> Vars;
Vars.reserve(C->varlist_size());
- for (auto *VE : C->varlists()) {
+ for (auto *VE : C->varlist()) {
ExprResult EVar = getDerived().TransformExpr(cast<Expr>(VE));
if (EVar.isInvalid())
return nullptr;
@@ -10647,7 +10647,7 @@ OMPClause *
TreeTransform<Derived>::TransformOMPLinearClause(OMPLinearClause *C) {
llvm::SmallVector<Expr *, 16> Vars;
Vars.reserve(C->varlist_size());
- for (auto *VE : C->varlists()) {
+ for (auto *VE : C->varlist()) {
ExprResult EVar = getDerived().TransformExpr(cast<Expr>(VE));
if (EVar.isInvalid())
return nullptr;
@@ -10667,7 +10667,7 @@ OMPClause *
TreeTransform<Derived>::TransformOMPAlignedClause(OMPAlignedClause *C) {
llvm::SmallVector<Expr *, 16> Vars;
Vars.reserve(C->varlist_size());
- for (auto *VE : C->varlists()) {
+ for (auto *VE : C->varlist()) {
ExprResult EVar = getDerived().TransformExpr(cast<Expr>(VE));
if (EVar.isInvalid())
return nullptr;
@@ -10686,7 +10686,7 @@ OMPClause *
TreeTransform<Derived>::TransformOMPCopyinClause(OMPCopyinClause *C) {
llvm::SmallVector<Expr *, 16> Vars;
Vars.reserve(C->varlist_size());
- for (auto *VE : C->varlists()) {
+ for (auto *VE : C->varlist()) {
ExprResult EVar = getDerived().TransformExpr(cast<Expr>(VE));
if (EVar.isInvalid())
return nullptr;
@@ -10701,7 +10701,7 @@ OMPClause *
TreeTransform<Derived>::TransformOMPCopyprivateClause(OMPCopyprivateClause *C) {
llvm::SmallVector<Expr *, 16> Vars;
Vars.reserve(C->varlist_size());
- for (auto *VE : C->varlists()) {
+ for (auto *VE : C->varlist()) {
ExprResult EVar = getDerived().TransformExpr(cast<Expr>(VE));
if (EVar.isInvalid())
return nullptr;
@@ -10715,7 +10715,7 @@ template <typename Derived>
OMPClause *TreeTransform<Derived>::TransformOMPFlushClause(OMPFlushClause *C) {
llvm::SmallVector<Expr *, 16> Vars;
Vars.reserve(C->varlist_size());
- for (auto *VE : C->varlists()) {
+ for (auto *VE : C->varlist()) {
ExprResult EVar = getDerived().TransformExpr(cast<Expr>(VE));
if (EVar.isInvalid())
return nullptr;
@@ -10747,7 +10747,7 @@ TreeTransform<Derived>::TransformOMPDependClause(OMPDependClause *C) {
DepModifier = DepModRes.get();
}
Vars.reserve(C->varlist_size());
- for (auto *VE : C->varlists()) {
+ for (auto *VE : C->varlist()) {
ExprResult EVar = getDerived().TransformExpr(cast<Expr>(VE));
if (EVar.isInvalid())
return nullptr;
@@ -10778,7 +10778,7 @@ bool transformOMPMappableExprListClause(
llvm::SmallVectorImpl<Expr *> &UnresolvedMappers) {
// Transform expressions in the list.
Vars.reserve(C->varlist_size());
- for (auto *VE : C->varlists()) {
+ for (auto *VE : C->varlist()) {
ExprResult EVar = TT.getDerived().TransformExpr(cast<Expr>(VE));
if (EVar.isInvalid())
return true;
@@ -10858,7 +10858,7 @@ TreeTransform<Derived>::TransformOMPAllocateClause(OMPAllocateClause *C) {
}
llvm::SmallVector<Expr *, 16> Vars;
Vars.reserve(C->varlist_size());
- for (auto *VE : C->varlists()) {
+ for (auto *VE : C->varlist()) {
ExprResult EVar = getDerived().TransformExpr(cast<Expr>(VE));
if (EVar.isInvalid())
return nullptr;
@@ -10990,7 +10990,7 @@ OMPClause *TreeTransform<Derived>::TransformOMPUseDevicePtrClause(
OMPUseDevicePtrClause *C) {
llvm::SmallVector<Expr *, 16> Vars;
Vars.reserve(C->varlist_size());
- for (auto *VE : C->varlists()) {
+ for (auto *VE : C->varlist()) {
ExprResult EVar = getDerived().TransformExpr(cast<Expr>(VE));
if (EVar.isInvalid())
return nullptr;
@@ -11005,7 +11005,7 @@ OMPClause *TreeTransform<Derived>::TransformOMPUseDeviceAddrClause(
OMPUseDeviceAddrClause *C) {
llvm::SmallVector<Expr *, 16> Vars;
Vars.reserve(C->varlist_size());
- for (auto *VE : C->varlists()) {
+ for (auto *VE : C->varlist()) {
ExprResult EVar = getDerived().TransformExpr(cast<Expr>(VE));
if (EVar.isInvalid())
return nullptr;
@@ -11020,7 +11020,7 @@ OMPClause *
TreeTransform<Derived>::TransformOMPIsDevicePtrClause(OMPIsDevicePtrClause *C) {
llvm::SmallVector<Expr *, 16> Vars;
Vars.reserve(C->varlist_size());
- for (auto *VE : C->varlists()) {
+ for (auto *VE : C->varlist()) {
ExprResult EVar = getDerived().TransformExpr(cast<Expr>(VE));
if (EVar.isInvalid())
return nullptr;
@@ -11035,7 +11035,7 @@ OMPClause *TreeTransform<Derived>::TransformOMPHasDeviceAddrClause(
OMPHasDeviceAddrClause *C) {
llvm::SmallVector<Expr *, 16> Vars;
Vars.reserve(C->varlist_size());
- for (auto *VE : C->varlists()) {
+ for (auto *VE : C->varlist()) {
ExprResult EVar = getDerived().TransformExpr(cast<Expr>(VE));
if (EVar.isInvalid())
return nullptr;
@@ -11050,7 +11050,7 @@ OMPClause *
TreeTransform<Derived>::TransformOMPNontemporalClause(OMPNontemporalClause *C) {
llvm::SmallVector<Expr *, 16> Vars;
Vars.reserve(C->varlist_size());
- for (auto *VE : C->varlists()) {
+ for (auto *VE : C->varlist()) {
ExprResult EVar = getDerived().TransformExpr(cast<Expr>(VE));
if (EVar.isInvalid())
return nullptr;
@@ -11065,7 +11065,7 @@ OMPClause *
TreeTransform<Derived>::TransformOMPInclusiveClause(OMPInclusiveClause *C) {
llvm::SmallVector<Expr *, 16> Vars;
Vars.reserve(C->varlist_size());
- for (auto *VE : C->varlists()) {
+ for (auto *VE : C->varlist()) {
ExprResult EVar = getDerived().TransformExpr(cast<Expr>(VE));
if (EVar.isInvalid())
return nullptr;
@@ -11080,7 +11080,7 @@ OMPClause *
TreeTransform<Derived>::TransformOMPExclusiveClause(OMPExclusiveClause *C) {
llvm::SmallVector<Expr *, 16> Vars;
Vars.reserve(C->varlist_size());
- for (auto *VE : C->varlists()) {
+ for (auto *VE : C->varlist()) {
ExprResult EVar = getDerived().TransformExpr(cast<Expr>(VE));
if (EVar.isInvalid())
return nullptr;
@@ -11127,7 +11127,7 @@ TreeTransform<Derived>::TransformOMPAffinityClause(OMPAffinityClause *C) {
if (ModifierRes.isInvalid())
return nullptr;
}
- for (Expr *E : C->varlists()) {
+ for (Expr *E : C->varlist()) {
ExprResult Locator = getDerived().TransformExpr(E);
if (Locator.isInvalid())
continue;
@@ -11167,7 +11167,7 @@ OMPClause *
TreeTransform<Derived>::TransformOMPDoacrossClause(OMPDoacrossClause *C) {
llvm::SmallVector<Expr *, 16> Vars;
Vars.reserve(C->varlist_size());
- for (auto *VE : C->varlists()) {
+ for (auto *VE : C->varlist()) {
ExprResult EVar = getDerived().TransformExpr(cast<Expr>(VE));
if (EVar.isInvalid())
return nullptr;
diff --git a/clang/lib/Serialization/ASTWriter.cpp b/clang/lib/Serialization/ASTWriter.cpp
index c78d8943d6d92..f0f9d397f1717 100644
--- a/clang/lib/Serialization/ASTWriter.cpp
+++ b/clang/lib/Serialization/ASTWriter.cpp
@@ -7220,7 +7220,7 @@ void OMPClauseWriter::VisitOMPNogroupClause(OMPNogroupClause *) {}
void OMPClauseWriter::VisitOMPInitClause(OMPInitClause *C) {
Record.push_back(C->varlist_size());
- for (Expr *VE : C->varlists())
+ for (Expr *VE : C->varlist())
Record.AddStmt(VE);
Record.writeBool(C->getIsTarget());
Record.writeBool(C->getIsTargetSync());
@@ -7266,7 +7266,7 @@ void OMPClauseWriter::VisitOMPAlignClause(OMPAlignClause *C) {
void OMPClauseWriter::VisitOMPPrivateClause(OMPPrivateClause *C) {
Record.push_back(C->varlist_size());
Record.AddSourceLocation(C->getLParenLoc());
- for (auto *VE : C->varlists()) {
+ for (auto *VE : C->varlist()) {
Record.AddStmt(VE);
}
for (auto *VE : C->private_copies()) {
@@ -7278,7 +7278,7 @@ void OMPClauseWriter::VisitOMPFirstprivateClause(OMPFirstprivateClause *C) {
Record.push_back(C->varlist_size());
VisitOMPClauseWithPreInit(C);
Record.AddSourceLocation(C->getLParenLoc());
- for (auto *VE : C->varlists()) {
+ for (auto *VE : C->varlist()) {
Record.AddStmt(VE);
}
for (auto *VE : C->private_copies()) {
@@ -7296,7 +7296,7 @@ void OMPClauseWriter::VisitOMPLastprivateClause(OMPLastprivateClause *C) {
Record.writeEnum(C->getKind());
Record.AddSourceLocation(C->getKindLoc());
Record.AddSourceLocation(C->getColonLoc());
- for (auto *VE : C->varlists())
+ for (auto *VE : C->varlist())
Record.AddStmt(VE);
for (auto *E : C->private_copies())
Record.AddStmt(E);
@@ -7311,7 +7311,7 @@ void OMPClauseWriter::VisitOMPLastprivateClause(OMPLastprivateClause *C) {
void OMPClauseWriter::VisitOMPSharedClause(OMPSharedClause *C) {
Record.push_back(C->varlist_size());
Record.AddSourceLocation(C->getLParenLoc());
- for (auto *VE : C->varlists())
+ for (auto *VE : C->varlist())
Record.AddStmt(VE);
}
@@ -7324,7 +7324,7 @@ void OMPClauseWriter::VisitOMPReductionClause(OMPReductionClause *C) {
Record.AddSourceLocation(C->getColonLoc());
Record.AddNestedNameSpecifierLoc(C->getQualifierLoc());
Record.AddDeclarationNameInfo(C->getNameInfo());
- for (auto *VE : C->varlists())
+ for (auto *VE : C->varlist())
Record.AddStmt(VE);
for (auto *VE : C->privates())
Record.AddStmt(VE);
@@ -7351,7 +7351,7 @@ void OMPClauseWriter::VisitOMPTaskReductionClause(OMPTaskReductionClause *C) {
Record.AddSourceLocation(C->getColonLoc());
Record.AddNestedNameSpecifierLoc(C->getQualifierLoc());
Record.AddDeclarationNameInfo(C->getNameInfo());
- for (auto *VE : C->varlists())
+ for (auto *VE : C->varlist())
Record.AddStmt(VE);
for (auto *VE : C->privates())
Record.AddStmt(VE);
@@ -7370,7 +7370,7 @@ void OMPClauseWriter::VisitOMPInReductionClause(OMPInReductionClause *C) {
Record.AddSourceLocation(C->getColonLoc());
Record.AddNestedNameSpecifierLoc(C->getQualifierLoc());
Record.AddDeclarationNameInfo(C->getNameInfo());
- for (auto *VE : C->varlists())
+ for (auto *VE : C->varlist())
Record.AddStmt(VE);
for (auto *VE : C->privates())
Record.AddStmt(VE);
@@ -7391,7 +7391,7 @@ void OMPClauseWriter::VisitOMPLinearClause(OMPLinearClause *C) {
Record.AddSourceLocation(C->getColonLoc());
Record.push_back(C->getModifier());
Record.AddSourceLocation(C->getModifierLoc());
- for (auto *VE : C->varlists()) {
+ for (auto *VE : C->varlist()) {
Record.AddStmt(VE);
}
for (auto *VE : C->privates()) {
@@ -7416,7 +7416,7 @@ void OMPClauseWriter::VisitOMPAlignedClause(OMPAlignedClause *C) {
Record.push_back(C->varlist_size());
Record.AddSourceLocation(C->getLParenLoc());
Record.AddSourceLocation(C->getColonLoc());
- for (auto *VE : C->varlists())
+ for (auto *VE : C->varlist())
Record.AddStmt(VE);
Record.AddStmt(C->getAlignment());
}
@@ -7424,7 +7424,7 @@ void OMPClauseWriter::VisitOMPAlignedClause(OMPAlignedClause *C) {
void OMPClauseWriter::VisitOMPCopyinClause(OMPCopyinClause *C) {
Record.push_back(C->varlist_size());
Record.AddSourceLocation(C->getLParenLoc());
- for (auto *VE : C->varlists())
+ for (auto *VE : C->varlist())
Record.AddStmt(VE);
for (auto *E : C->source_exprs())
Record.AddStmt(E);
@@ -7437,7 +7437,7 @@ void OMPClauseWriter::VisitOMPCopyinClause(OMPCopyinClause *C) {
void OMPClauseWriter::VisitOMPCopyprivateClause(OMPCopyprivateClause *C) {
Record.push_back(C->varlist_size());
Record.AddSourceLocation(C->getLParenLoc());
- for (auto *VE : C->varlists())
+ for (auto *VE : C->varlist())
Record.AddStmt(VE);
for (auto *E : C->source_exprs())
Record.AddStmt(E);
@@ -7450,7 +7450,7 @@ void OMPClauseWriter::VisitOMPCopyprivateClause(OMPCopyprivateClause *C) {
void OMPClauseWriter::VisitOMPFlushClause(OMPFlushClause *C) {
Record.push_back(C->varlist_size());
Record.AddSourceLocation(C->getLParenLoc());
- for (auto *VE : C->varlists())
+ for (auto *VE : C->varlist())
Record.AddStmt(VE);
}
@@ -7468,7 +7468,7 @@ void OMPClauseWriter::VisitOMPDependClause(OMPDependClause *C) {
Record.AddSourceLocation(C->getDependencyLoc());
Record.AddSourceLocation(C->getColonLoc());
Record.AddSourceLocation(C->getOmpAllMemoryLoc());
- for (auto *VE : C->varlists())
+ for (auto *VE : C->varlist())
Record.AddStmt(VE);
for (unsigned I = 0, E = C->getNumLoops(); I < E; ++I)
Record.AddStmt(C->getLoopData(I));
@@ -7500,7 +7500,7 @@ void OMPClauseWriter::VisitOMPMapClause(OMPMapClause *C) {
Record.push_back(C->getMapType());
Record.AddSourceLocation(C->getMapLoc());
Record.AddSourceLocation(C->getColonLoc());
- for (auto *E : C->varlists())
+ for (auto *E : C->varlist())
Record.AddStmt(E);
for (auto *E : C->mapperlists())
Record.AddStmt(E);
@@ -7523,7 +7523,7 @@ void OMPClauseWriter::VisitOMPAllocateClause(OMPAllocateClause *C) {
Record.AddSourceLocation(C->getLParenLoc());
Record.AddSourceLocation(C->getColonLoc());
Record.AddStmt(C->getAllocator());
- for (auto *VE : C->varlists())
+ for (auto *VE : C->varlist())
Record.AddStmt(VE);
}
@@ -7596,7 +7596,7 @@ void OMPClauseWriter::VisitOMPToClause(OMPToClause *C) {
Record.AddNestedNameSpecifierLoc(C->getMapperQualifierLoc());
Record.AddDeclarationNameInfo(C->getMapperIdInfo());
Record.AddSourceLocation(C->getColonLoc());
- for (auto *E : C->varlists())
+ for (auto *E : C->varlist())
Record.AddStmt(E);
for (auto *E : C->mapperlists())
Record.AddStmt(E);
@@ -7626,7 +7626,7 @@ void OMPClauseWriter::VisitOMPFromClause(OMPFromClause *C) {
Record.AddNestedNameSpecifierLoc(C->getMapperQualifierLoc());
Record.AddDeclarationNameInfo(C->getMapperIdInfo());
Record.AddSourceLocation(C->getColonLoc());
- for (auto *E : C->varlists())
+ for (auto *E : C->varlist())
Record.AddStmt(E);
for (auto *E : C->mapperlists())
Record.AddStmt(E);
@@ -7649,7 +7649,7 @@ void OMPClauseWriter::VisitOMPUseDevicePtrClause(OMPUseDevicePtrClause *C) {
Record.push_back(C->getTotalComponentListNum());
Record.push_back(C->getTotalComponentsNum());
Record.AddSourceLocation(C->getLParenLoc());
- for (auto *E : C->varlists())
+ for (auto *E : C->varlist())
Record.AddStmt(E);
for (auto *VE : C->private_copies())
Record.AddStmt(VE);
@@ -7673,7 +7673,7 @@ void OMPClauseWriter::VisitOMPUseDeviceAddrClause(OMPUseDeviceAddrClause *C) {
Record.push_back(C->getTotalComponentListNum());
Record.push_back(C->getTotalComponentsNum());
Record.AddSourceLocation(C->getLParenLoc());
- for (auto *E : C->varlists())
+ for (auto *E : C->varlist())
Record.AddStmt(E);
for (auto *D : C->all_decls())
Record.AddDeclRef(D);
@@ -7693,7 +7693,7 @@ void OMPClauseWriter::VisitOMPIsDevicePtrClause(OMPIsDevicePtrClause *C) {
Record.push_back(C->getTotalComponentListNum());
Record.push_back(C->getTotalComponentsNum());
Record.AddSourceLocation(C->getLParenLoc());
- for (auto *E : C->varlists())
+ for (auto *E : C->varlist())
Record.AddStmt(E);
for (auto *D : C->all_decls())
Record.AddDeclRef(D);
@@ -7713,7 +7713,7 @@ void OMPClauseWriter::VisitOMPHasDeviceAddrClause(OMPHasDeviceAddrClause *C) {
Record.push_back(C->getTotalComponentListNum());
Record.push_back(C->getTotalComponentsNum());
Record.AddSourceLocation(C->getLParenLoc());
- for (auto *E : C->varlists())
+ for (auto *E : C->varlist())
Record.AddStmt(E);
for (auto *D : C->all_decls())
Record.AddDeclRef(D);
@@ -7765,7 +7765,7 @@ void OMPClauseWriter::VisitOMPMessageClause(OMPMessageClause *C) {
void OMPClauseWriter::VisitOMPNontemporalClause(OMPNontemporalClause *C) {
Record.push_back(C->varlist_size());
Record.AddSourceLocation(C->getLParenLoc());
- for (auto *VE : C->varlists())
+ for (auto *VE : C->varlist())
Record.AddStmt(VE);
for (auto *E : C->private_refs())
Record.AddStmt(E);
@@ -7774,14 +7774,14 @@ void OMPClauseWriter::VisitOMPNontemporalClause(OMPNontemporalClause *C) {
void OMPClauseWriter::VisitOMPInclusiveClause(OMPInclusiveClause *C) {
Record.push_back(C->varlist_size());
Record.AddSourceLocation(C->getLParenLoc());
- for (auto *VE : C->varlists())
+ for (auto *VE : C->varlist())
Record.AddStmt(VE);
}
void OMPClauseWriter::VisitOMPExclusiveClause(OMPExclusiveClause *C) {
Record.push_back(C->varlist_size());
Record.AddSourceLocation(C->getLParenLoc());
- for (auto *VE : C->varlists())
+ for (auto *VE : C->varlist())
Record.AddStmt(VE);
}
@@ -7810,7 +7810,7 @@ void OMPClauseWriter::VisitOMPAffinityClause(OMPAffinityClause *C) {
Record.AddSourceLocation(C->getLParenLoc());
Record.AddStmt(C->getModifier());
Record.AddSourceLocation(C->getColonLoc());
- for (Expr *E : C->varlists())
+ for (Expr *E : C->varlist())
Record.AddStmt(E);
}
@@ -7833,7 +7833,7 @@ void OMPClauseWriter::VisitOMPDoacrossClause(OMPDoacrossClause *C) {
Record.push_back(C->getDependenceType());
Record.AddSourceLocation(C->getDependenceLoc());
Record.AddSourceLocation(C->getColonLoc());
- for (auto *VE : C->varlists())
+ for (auto *VE : C->varlist())
Record.AddStmt(VE);
for (unsigned I = 0, E = C->getNumLoops(); I < E; ++I)
Record.AddStmt(C->getLoopData(I));
More information about the cfe-commits
mailing list