aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/Sema/SemaInit.cpp
diff options
context:
space:
mode:
authorErich Keane <ekeane@nvidia.com>2024-04-25 10:22:03 -0700
committerGitHub <noreply@github.com>2024-04-25 10:22:03 -0700
commit39adc8f423297c5741bb731bb8b1e545d558502c (patch)
tree4112878bc2fa3ed08d5644644e72e867b7505e86 /clang/lib/Sema/SemaInit.cpp
parent8dc7db7a24633f55ef28f2ab4b379386a34505f8 (diff)
downloadllvm-39adc8f423297c5741bb731bb8b1e545d558502c.zip
llvm-39adc8f423297c5741bb731bb8b1e545d558502c.tar.gz
llvm-39adc8f423297c5741bb731bb8b1e545d558502c.tar.bz2
[NFC] Generalize ArraySections to work for OpenACC in the future (#89639)
OpenACC is going to need an array sections implementation that is a simpler version/more restrictive version of the OpenMP version. This patch moves `OMPArraySectionExpr` to `Expr.h` and renames it `ArraySectionExpr`, then adds an enum to choose between the two. This also fixes a couple of 'drive-by' issues that I discovered on the way, but leaves the OpenACC Sema parts reasonably unimplemented (no semantic analysis implementation), as that will be a followup patch.
Diffstat (limited to 'clang/lib/Sema/SemaInit.cpp')
-rw-r--r--clang/lib/Sema/SemaInit.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/clang/lib/Sema/SemaInit.cpp b/clang/lib/Sema/SemaInit.cpp
index 793e16d..003a157 100644
--- a/clang/lib/Sema/SemaInit.cpp
+++ b/clang/lib/Sema/SemaInit.cpp
@@ -7753,9 +7753,9 @@ static void visitLocalsRetainedByReferenceBinding(IndirectLocalPath &Path,
break;
}
- case Stmt::OMPArraySectionExprClass: {
+ case Stmt::ArraySectionExprClass: {
visitLocalsRetainedByInitializer(Path,
- cast<OMPArraySectionExpr>(Init)->getBase(),
+ cast<ArraySectionExpr>(Init)->getBase(),
Visit, true, EnableLifetimeWarnings);
break;
}