================
@@ -1145,13 +1145,15 @@ void DeclPrinter::VisitLinkageSpecDecl(LinkageSpecDecl 
*D) {
     l = "C++";
   }
 
+  bool HasMoreThanOneDecl =
+      *D->decls_begin() && D->decls_begin()->getNextDeclInContext();
----------------
erichkeane wrote:

It just seems a bit more readable to me.  We're checking if the length of the 
decls is > 1, so it seemed more clear?

Though, as this isn't performance critical code, perhaps: 
`bool HasMoreThanOneDecl = std::distance(D->decls_begin(), D->decls_end()) > 1` 
is much more readable.

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

Reply via email to