diff options
author | erichkeane <ekeane@nvidia.com> | 2025-05-19 07:09:50 -0700 |
---|---|---|
committer | erichkeane <ekeane@nvidia.com> | 2025-05-19 09:57:22 -0700 |
commit | e3950a049a8f098b8d28a9c89fe3f21f5c0b1682 (patch) | |
tree | 90f0292d457a0381b51c4bd82a91a3742c9a34cb /clang/lib | |
parent | b24c33a9d745bd2a3009f1d52f31247772e954e5 (diff) | |
download | llvm-e3950a049a8f098b8d28a9c89fe3f21f5c0b1682.zip llvm-e3950a049a8f098b8d28a9c89fe3f21f5c0b1682.tar.gz llvm-e3950a049a8f098b8d28a9c89fe3f21f5c0b1682.tar.bz2 |
[OpenACC] Fix 'vector' checking when inside combined construct
For some reason when implementing 'vector' I didn't include switch
entries for the combined constructs. I audited the rest of the uses of
this pattern, and got it right everywhere else, so I'm not sure why I
missed it here.
Fixes: #140339
Diffstat (limited to 'clang/lib')
-rw-r--r-- | clang/lib/Sema/SemaOpenACCClause.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/clang/lib/Sema/SemaOpenACCClause.cpp b/clang/lib/Sema/SemaOpenACCClause.cpp index 88bd963..7249602 100644 --- a/clang/lib/Sema/SemaOpenACCClause.cpp +++ b/clang/lib/Sema/SemaOpenACCClause.cpp @@ -1271,9 +1271,11 @@ OpenACCClause *SemaOpenACCClauseVisitor::VisitVectorClause( switch (SemaRef.getActiveComputeConstructInfo().Kind) { case OpenACCDirectiveKind::Invalid: case OpenACCDirectiveKind::Parallel: + case OpenACCDirectiveKind::ParallelLoop: // No restriction on when 'parallel' can contain an argument. break; case OpenACCDirectiveKind::Serial: + case OpenACCDirectiveKind::SerialLoop: // GCC disallows this, and there is no real good reason for us to permit // it, so disallow until we come up with a use case that makes sense. DiagIntArgInvalid(SemaRef, IntExpr, "length", OpenACCClauseKind::Vector, @@ -1281,7 +1283,8 @@ OpenACCClause *SemaOpenACCClauseVisitor::VisitVectorClause( SemaRef.getActiveComputeConstructInfo().Kind); IntExpr = nullptr; break; - case OpenACCDirectiveKind::Kernels: { + case OpenACCDirectiveKind::Kernels: + case OpenACCDirectiveKind::KernelsLoop: { const auto *Itr = llvm::find_if(SemaRef.getActiveComputeConstructInfo().Clauses, llvm::IsaPred<OpenACCVectorLengthClause>); |