[clang] [HLSL] add loop unroll (PR #93879)

Justin Bogner via cfe-commits cfe-commits at lists.llvm.org
Mon Jun 3 12:10:40 PDT 2024


================
@@ -114,18 +114,21 @@ Parser::ParseStatementOrDeclaration(StmtVector &Stmts,
   // here because we don't want to allow arbitrary orderings.
   ParsedAttributes CXX11Attrs(AttrFactory);
   MaybeParseCXX11Attributes(CXX11Attrs, /*MightBeObjCMessageSend*/ true);
-  ParsedAttributes GNUAttrs(AttrFactory);
+  ParsedAttributes DeclSpecAttrs(AttrFactory);
   if (getLangOpts().OpenCL)
-    MaybeParseGNUAttributes(GNUAttrs);
+    MaybeParseGNUAttributes(DeclSpecAttrs);
+
+  if (getLangOpts().HLSL)
+    MaybeParseMicrosoftAttributes(DeclSpecAttrs);
----------------
bogner wrote:

`DeclSpecAttrs` is an objectively bad name here - the opencl attributes are gnu-style and the HLSL attributes are single square bracket microsoft style - these attributes are *never* `__declspec`.

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


More information about the cfe-commits mailing list