[clang] [HLSL] Enable declarations inside cbuffer/tbuffer per spec (PR #239481)

Helena Kotas via cfe-commits cfe-commits at lists.llvm.org
Thu Nov 19 16:15:08 PST 2026


================
@@ -31,17 +31,11 @@ static bool validateDeclsInsideHLSLBuffer(Parser::DeclGroupPtrTy DG,
   // Only allow function, variable, record, and empty decls inside HLSLBuffer.
   for (DeclGroupRef::iterator I = Decls.begin(), E = Decls.end(); I != E; ++I) {
     Decl *D = *I;
-    if (isa<CXXRecordDecl, RecordDecl, FunctionDecl, VarDecl, EmptyDecl>(D))
+    if (isa<CXXRecordDecl, RecordDecl, FunctionDecl, VarDecl, EmptyDecl,
+            EnumDecl, UsingDecl, UsingDirectiveDecl, TypeAliasDecl,
+            TemplateDecl, TypedefDecl, ExportDecl, StaticAssertDecl>(D))
----------------
hekota wrote:

I filed an issue for that: https://github.com/llvm/llvm-project/issues/244460

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


More information about the cfe-commits mailing list