[clang] [llvm] [HLSL] Add `Increment`/`DecrementCounter` methods to structured buffers (PR #114148)

Tex Riddell via cfe-commits cfe-commits at lists.llvm.org
Thu Nov 7 15:47:41 PST 2024


================
@@ -343,27 +336,224 @@ struct TemplateParameterListBuilder {
     Params.clear();
 
     QualType T = Builder.Template->getInjectedClassNameSpecialization();
-    T = S.Context.getInjectedClassNameType(Builder.Record, T);
+    T = AST.getInjectedClassNameType(Builder.Record, T);
 
     return Builder;
   }
 };
+
+// Builder for methods of builtin types. Allows adding methods to builtin types
+// using the builder pattern like this:
+//
+//   BuiltinTypeMethodBuilder(Sema, RecordBuilder, "MethodName", ReturnType)
+//       .addParam("param_name", Type, InOutModifier)
----------------
tex3d wrote:

I don't see anything adding or using parameters here.  I also don't know how you'd use a parameter you added this way in the builtin call params you pass in (how do you reference it to create the DeclRefExpr?).

Since this part is unused, should we really be adding it at this time?  Could we add it when it's used to make sure it's working as intended?

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


More information about the cfe-commits mailing list