From 2ec4fd7a4fc6de0e0b9fc4dd9960806594faf33a Mon Sep 17 00:00:00 2001 From: Dave Pagan Date: Thu, 14 Dec 2023 10:24:28 -0600 Subject: Fix formatting issues found by code formatting check in build. --- clang/lib/CodeGen/CGOpenMPRuntime.cpp | 6 +++--- clang/lib/CodeGen/CGStmtOpenMP.cpp | 3 +-- clang/lib/Sema/SemaOpenMP.cpp | 11 ++++++----- 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/clang/lib/CodeGen/CGOpenMPRuntime.cpp b/clang/lib/CodeGen/CGOpenMPRuntime.cpp index ac971cd..442662d 100644 --- a/clang/lib/CodeGen/CGOpenMPRuntime.cpp +++ b/clang/lib/CodeGen/CGOpenMPRuntime.cpp @@ -2658,9 +2658,9 @@ void CGOpenMPRuntime::emitForStaticFinish(CodeGenFunction &CGF, isOpenMPDistributeDirective(DKind) || (DKind == OMPD_target_teams_loop) ? OMP_IDENT_WORK_DISTRIBUTE - : isOpenMPLoopDirective(DKind) - ? OMP_IDENT_WORK_LOOP - : OMP_IDENT_WORK_SECTIONS), + : isOpenMPLoopDirective(DKind) + ? OMP_IDENT_WORK_LOOP + : OMP_IDENT_WORK_SECTIONS), getThreadID(CGF, Loc)}; auto DL = ApplyDebugLocation::CreateDefaultArtificial(CGF, Loc); if (isOpenMPDistributeDirective(DKind) && diff --git a/clang/lib/CodeGen/CGStmtOpenMP.cpp b/clang/lib/CodeGen/CGStmtOpenMP.cpp index f4bf2e1..1a8a14b 100644 --- a/clang/lib/CodeGen/CGStmtOpenMP.cpp +++ b/clang/lib/CodeGen/CGStmtOpenMP.cpp @@ -1437,8 +1437,7 @@ void CodeGenFunction::EmitOMPReductionClauseFinal( TeamsLoopCanBeParallel = TTLD->canBeParallelFor(); bool WithNowait = D.getSingleClause() || isOpenMPParallelDirective(D.getDirectiveKind()) || - TeamsLoopCanBeParallel || - ReductionKind == OMPD_simd; + TeamsLoopCanBeParallel || ReductionKind == OMPD_simd; bool SimpleReduction = ReductionKind == OMPD_simd; // Emit nowait reduction if nowait clause is present or directive is a // parallel directive (it always has implicit barrier). diff --git a/clang/lib/Sema/SemaOpenMP.cpp b/clang/lib/Sema/SemaOpenMP.cpp index e6ec3e8..2d92ae3 100644 --- a/clang/lib/Sema/SemaOpenMP.cpp +++ b/clang/lib/Sema/SemaOpenMP.cpp @@ -6140,9 +6140,9 @@ processImplicitMapsWithDefaultMappers(Sema &S, DSAStackTy *Stack, namespace { /// A 'teams loop' with a nested 'loop bind(parallel)' or generic function /// call in the associated loop-nest cannot be a 'parallel for'. -class TeamsLoopChecker final - : public ConstStmtVisitor { +class TeamsLoopChecker final : public ConstStmtVisitor { Sema &SemaRef; + public: bool teamsLoopCanBeParallelFor() const { return TeamsLoopCanBeParallelFor; } @@ -6198,15 +6198,16 @@ public: } explicit TeamsLoopChecker(Sema &SemaRef) : SemaRef(SemaRef), TeamsLoopCanBeParallelFor(true) {} + private: bool TeamsLoopCanBeParallelFor; }; } // namespace bool Sema::teamsLoopCanBeParallelFor(Stmt *AStmt) { - TeamsLoopChecker Checker(*this); - Checker.Visit(AStmt); - return Checker.teamsLoopCanBeParallelFor(); + TeamsLoopChecker Checker(*this); + Checker.Visit(AStmt); + return Checker.teamsLoopCanBeParallelFor(); } bool Sema::mapLoopConstruct(llvm::SmallVector &ClausesWithoutBind, -- cgit v1.1