================
@@ -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))
----------------
bob80905 wrote:

PreviousConflicts is no longer in use as a variable. You could remove it. But 
it seems unnecessary that you also handle duplicate RBAs in a separate part of 
the code. Wouldn't it be possible to check here if the decl is a UDT, and load 
in the relevant data into RBA (the resource field decl) if it is a UDT? 
If not, it might be useful to add a comment above the function stating: "This 
function validates multiple RBAs for non-udt resource decls, UDT resource decls 
are validated for duplicate RBAs in `ContainsResourceForRegisterType`"


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

Reply via email to