[flang-commits] [flang] [flang][cuda] Record implicit managed attribution in module files (PR #224601)

Kareem Ergawy via flang-commits flang-commits at lists.llvm.org
Mon Sep 21 00:09:45 PDT 2026


================
@@ -764,7 +764,15 @@ TYPE_PARSER(construct<AttrSpec>(accessSpec) ||
     construct<AttrSpec>(construct<Value>("VALUE"_tok)) ||
     construct<AttrSpec>(construct<Volatile>("VOLATILE"_tok)) ||
     extension<LanguageFeature::CUDA>(
-        construct<AttrSpec>(Parser<common::CUDADataAttr>{})))
+        construct<AttrSpec>(Parser<CUDADataAttrSpec>{})))
+
+// CUDA-data-attr-spec -> CUDA-data-attr [( IMPLICIT )]
+// The parenthesized qualifier marks a compiler-applied attribute; it is
+// emitted into module files so the distinction survives, and is not meant to
+// be written in user code.
+TYPE_PARSER(construct<CUDADataAttrSpec>(Parser<common::CUDADataAttr>{},
+    maybe(parenthesized(
+        construct<CUDADataAttrSpec::Implicit>("IMPLICIT" >> ok)))))
----------------
ergawy wrote:

Right. Updated the PR to reject the extension in user code.

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


More information about the flang-commits mailing list