================
@@ -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))
----------------
Icohedron wrote:

Testing this PR locally, my LLM found that with this PR Clang is unable to 
export functions defined inside of cbuffers.

With this example: https://godbolt.org/z/d43hn54eG

- DXC emits both `exported_inside` and `exported_outside` 
- This PR compiles the shader without error, but emits only `exported_outside`.

https://github.com/llvm/llvm-project/pull/239481
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to