[clang] Implement resource binding type prefix mismatch flag setting logic (PR #97103)

Chris B via cfe-commits cfe-commits at lists.llvm.org
Mon Jul 8 18:05:06 PDT 2024


================
@@ -437,7 +453,409 @@ void SemaHLSL::handleShaderAttr(Decl *D, const ParsedAttr &AL) {
     D->addAttr(NewAttr);
 }
 
+struct RegisterBindingFlags {
+  bool Resource = false;
+  bool Udt = false;
+  bool Other = false;
+  bool Basic = false;
+
+  bool Srv = false;
+  bool Uav = false;
+  bool Cbv = false;
+  bool Sampler = false;
+
+  bool ContainsNumeric = false;
+  bool DefaultGlobals = false;
+};
+
+bool isDeclaredWithinCOrTBuffer(const Decl *decl) {
----------------
llvm-beanz wrote:

Take a pass over the parameter names and local variables you’re adding. They should match the style guide:

https://llvm.org/docs/CodingStandards.html#name-types-functions-variables-and-enumerators-properly

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


More information about the cfe-commits mailing list