[clang] [clang][SME] Emit error for OpemMP captured regions in streaming functions (PR #124590)

Sander de Smalen via cfe-commits cfe-commits at lists.llvm.org
Mon Jan 27 09:08:08 PST 2025


================
@@ -4568,9 +4568,23 @@ buildCapturedStmtCaptureList(Sema &S, CapturedRegionScopeInfo *RSI,
   return false;
 }
 
+static bool
+isOpenMPCapturedRegionInArmStreamingFunction(Sema const &S,
+                                             CapturedRegionKind Kind) {
+  if (!S.getLangOpts().OpenMP || Kind != CR_OpenMP)
+    return false;
+  FunctionDecl *FD = S.getCurFunctionDecl(/*AllowLambda=*/true);
+  if (!FD)
+    return false;
+  return IsArmStreamingFunction(FD, /*IncludeLocallyStreaming=*/true);
----------------
sdesmalen-arm wrote:

Don't we also need a check whether the region uses ZA/ZT0?

https://github.com/llvm/llvm-project/pull/124590


More information about the cfe-commits mailing list