[clang] [NFC] Factor out common parts of ArraySections into its own class (PR #89639)
Erich Keane via cfe-commits
cfe-commits at lists.llvm.org
Wed Apr 24 08:04:30 PDT 2024
================
@@ -11762,20 +11770,25 @@ TreeTransform<Derived>::TransformOMPArraySectionExpr(OMPArraySectionExpr *E) {
}
ExprResult Stride;
- if (Expr *Str = E->getStride()) {
- Stride = getDerived().TransformExpr(Str);
- if (Stride.isInvalid())
- return ExprError();
+ if (E->isOMPArraySection()) {
+ if (Expr *Str = E->getStride()) {
+ Stride = getDerived().TransformExpr(Str);
+ if (Stride.isInvalid())
+ return ExprError();
+ }
}
if (!getDerived().AlwaysRebuild() && Base.get() == E->getBase() &&
- LowerBound.get() == E->getLowerBound() && Length.get() == E->getLength())
+ LowerBound.get() == E->getLowerBound() &&
+ Length.get() == E->getLength() &&
+ (E->isOpenACCArraySection() || Stride.get() == E->getStride()))
----------------
erichkeane wrote:
This is another bug fix, we previously weren't checking this correctly here.
https://github.com/llvm/llvm-project/pull/89639
More information about the cfe-commits
mailing list