[clang] Implement resource binding type prefix mismatch diagnostic infrastructure (PR #97103)

Joshua Batista via cfe-commits cfe-commits at lists.llvm.org
Thu Aug 15 13:29:47 PDT 2024


================
@@ -492,14 +999,21 @@ void SemaHLSL::handleResourceBindingAttr(Decl *D, const ParsedAttr &AL) {
   // Validate.
   if (!Slot.empty()) {
     switch (Slot[0]) {
----------------
bob80905 wrote:

I've cleaned up a bit, and realized I no longer needed to pass `Slot`, when I could just pass registerType instead. 
`getRegisterTypeIndex` is still needed for `ValidateMultipleRegisterAnnotations`, but all other calls to `getRegisterTypeIndex` have been removed, and I baked in the logic `getRegisterTypeIndex` has into the initial case statement in `handleResourceBindingAttr`.

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


More information about the cfe-commits mailing list