================
@@ -2547,8 +2547,8 @@ static bool CheckConstexprFunctionBody(Sema &SemaRef,
const FunctionDecl *Dcl,
diag::ext_constexpr_function_never_constant_expr)
<< isa<CXXConstructorDecl>(Dcl) << Dcl->isConsteval()
<< Dcl->getNameInfo().getSourceRange();
- for (size_t I = 0, N = Diags.size(); I != N; ++I)
- SemaRef.Diag(Diags[I].first, Diags[I].second);
+ for (const auto &Diag : Diags)
+ SemaRef.Diag(Diag.first, Diag.second);
----------------
davidstone wrote:
I'm not opposed to that, but I think the better fix would be to fix the
underlying value_type to be a struct with proper names instead of a
`std::pair`. I don't really have the context here to know what the right name
is for all these variables.
https://github.com/llvm/llvm-project/pull/169938
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits