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

Damyan Pepper via cfe-commits cfe-commits at lists.llvm.org
Mon Jul 8 15:43:43 PDT 2024


================
@@ -29,6 +29,25 @@ using namespace clang;
 
 SemaHLSL::SemaHLSL(Sema &S) : SemaBase(S) {}
 
+HLSLResourceAttr *SemaHLSL::mergeHLSLResourceAttr(bool CBuffer) {
----------------
damyanp wrote:

This function confuses me a bit.  The "merge" part seems to suggest that it is going to be combining some things, but it seems that it unconditionally creates a new HLSLResourceAttr.  The "HLSLResourceAttr" seems to suggest that it is going to generically operate on HLSLResourceAttr's, but it actually only applies to cbuffer or tbuffers.

I wonder if this would be clearer if it were just inlined in ActOnStartBuffer?

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


More information about the cfe-commits mailing list