[clang] [HLSL] Collect explicit resource binding information (PR #111203)

Helena Kotas via cfe-commits cfe-commits at lists.llvm.org
Wed Oct 9 17:04:01 PDT 2024


================
@@ -1135,21 +1147,19 @@ static void ValidateMultipleRegisterAnnotations(Sema &S, Decl *TheDecl,
 
       RegisterType otherRegType = getRegisterType(attr->getSlot());
       if (RegisterTypesDetected[static_cast<int>(otherRegType)]) {
-        if (PreviousConflicts[TheDecl].count(otherRegType))
----------------
hekota wrote:

I have removed the unused variable. and the ResourceField is gone as well. I think the duplicate errors are reduced by simply not creating invalid binding attributes, but please let me know if you think otherwise. We should not be emitting duplicate errors for the same binding, but if there are multiple bindings with the same issue we should report them all.

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


More information about the cfe-commits mailing list