[clang] [HLSL] Add Append/ConsumeStructuredBuffer definitions to HLSLExternalSemaSource (PR #113643)

Greg Roth via cfe-commits cfe-commits at lists.llvm.org
Thu Nov 7 13:20:42 PST 2024


================
@@ -530,6 +530,28 @@ void HLSLExternalSemaSource::defineHLSLTypesWithForwardDeclarations() {
         .addArraySubscriptOperators()
         .completeDefinition();
   });
+
+  Decl =
+      BuiltinTypeDeclBuilder(*SemaPtr, HLSLNamespace, "AppendStructuredBuffer")
+          .addSimpleTemplateParams(*SemaPtr, {"element_type"})
+          .Record;
+  onCompletion(Decl, [this](CXXRecordDecl *Decl) {
+    setupBufferType(Decl, *SemaPtr, ResourceClass::UAV,
+                    ResourceKind::TypedBuffer, /*IsROV=*/false,
----------------
pow2clk wrote:

I see this in the structured buffer above as well, but structured buffers are not typedbuffers. There is a `ResourceKind::StructuredBuffer` enum.

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


More information about the cfe-commits mailing list