aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/Sema/SemaOpenMP.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'clang/lib/Sema/SemaOpenMP.cpp')
-rw-r--r--clang/lib/Sema/SemaOpenMP.cpp6
1 files changed, 2 insertions, 4 deletions
diff --git a/clang/lib/Sema/SemaOpenMP.cpp b/clang/lib/Sema/SemaOpenMP.cpp
index 20e75fb..b87732a 100644
--- a/clang/lib/Sema/SemaOpenMP.cpp
+++ b/clang/lib/Sema/SemaOpenMP.cpp
@@ -10178,10 +10178,8 @@ checkOpenMPLoop(OpenMPDirectiveKind DKind, Expr *CollapseLoopCountExpr,
Built.DependentInits[Cnt] = nullptr;
Built.FinalsConditions[Cnt] = nullptr;
if (IS.IsNonRectangularLB || IS.IsNonRectangularUB) {
- Built.DependentCounters[Cnt] =
- Built.Counters[NestedLoopCount - 1 - IS.LoopDependentIdx];
- Built.DependentInits[Cnt] =
- Built.Inits[NestedLoopCount - 1 - IS.LoopDependentIdx];
+ Built.DependentCounters[Cnt] = Built.Counters[IS.LoopDependentIdx - 1];
+ Built.DependentInits[Cnt] = Built.Inits[IS.LoopDependentIdx - 1];
Built.FinalsConditions[Cnt] = IS.FinalCondition;
}
}