[clang] [clang][SME] Emit error for OpenMP captured regions in SME functions (PR #124590)
Benjamin Maxwell via cfe-commits
cfe-commits at lists.llvm.org
Mon Jan 27 12:37:59 PST 2025
================
@@ -4568,9 +4568,28 @@ buildCapturedStmtCaptureList(Sema &S, CapturedRegionScopeInfo *RSI,
return false;
}
+static std::optional<int>
+isOpenMPCapturedRegionInArmSMEFunction(Sema const &S, CapturedRegionKind Kind) {
+ if (!S.getLangOpts().OpenMP || Kind != CR_OpenMP)
+ return false;
+ FunctionDecl *FD = S.getCurFunctionDecl(/*AllowLambda=*/true);
+ if (!FD)
+ return false;
----------------
MacDue wrote:
```suggestion
if (!S.getLangOpts().OpenMP || Kind != CR_OpenMP)
return {};
FunctionDecl *FD = S.getCurFunctionDecl(/*AllowLambda=*/true);
if (!FD)
return {};
```
https://github.com/llvm/llvm-project/pull/124590
More information about the cfe-commits
mailing list