================
@@ -7367,8 +7367,72 @@ static void handleHLSLResourceBindingAttr(Sema &S, Decl 
*D,
     return;
   }
 
-  // FIXME: check reg type match decl. Issue
-  // https://github.com/llvm/llvm-project/issues/57886.
+  VarDecl *VD = dyn_cast<VarDecl>(D);
+  HLSLBufferDecl *BD = dyn_cast<HLSLBufferDecl>(D);
+
+  if (VD || BD) {
----------------
bogner wrote:

It's probably worth breaking this logic out into a separate 
`checkHLSLResourceRegType` function. This would improve the readability and we 
can avoid some indentation by using early returns.

https://github.com/llvm/llvm-project/pull/87578
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to