[clang] Make getAttr, getSpecificAttr, hasAttr, and hasSpecificAttr variadic (PR #78518)

Erich Keane via cfe-commits cfe-commits at lists.llvm.org
Wed Jan 17 15:07:58 PST 2024


================
@@ -1478,11 +1478,10 @@ static bool IsOverloadOrOverrideImpl(Sema &SemaRef, FunctionDecl *New,
     return true;
 
   // enable_if attributes are an order-sensitive part of the signature.
-  for (specific_attr_iterator<EnableIfAttr>
-         NewI = New->specific_attr_begin<EnableIfAttr>(),
-         NewE = New->specific_attr_end<EnableIfAttr>(),
-         OldI = Old->specific_attr_begin<EnableIfAttr>(),
-         OldE = Old->specific_attr_end<EnableIfAttr>();
+  for (auto NewI = New->specific_attr_begin<EnableIfAttr>(),
----------------
erichkeane wrote:

A conversion operator makes this unnecessary, but it is only used 1x, so I wasn't sure of its value.  

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


More information about the cfe-commits mailing list