[clang] [Clang] Reapply CWG2369 "Ordering between constraints and substitution" (PR #122423)
Erich Keane via cfe-commits
cfe-commits at lists.llvm.org
Tue May 27 07:34:07 PDT 2025
================
@@ -8054,8 +8056,9 @@ bool Sema::CheckNonDependentConversions(
bool HasThisConversion = Method && !isa<CXXConstructorDecl>(Method);
unsigned ThisConversions = HasThisConversion ? 1 : 0;
- Conversions =
- CandidateSet.allocateConversionSequences(ThisConversions + Args.size());
+ Conversions = Conversions.empty() ? CandidateSet.allocateConversionSequences(
----------------
erichkeane wrote:
Rather than Ternary, I think this should just be;
`if (Conversions.empty()) Conversions = CandidateSet....`
https://github.com/llvm/llvm-project/pull/122423
More information about the cfe-commits
mailing list