[clang] Improve stack usage to increase recursive initialization depth (PR #88546)
Vitaly Buka via cfe-commits
cfe-commits at lists.llvm.org
Tue Apr 16 17:30:31 PDT 2024
================
@@ -1163,12 +1136,7 @@ class Sema;
ConversionSequenceList
allocateConversionSequences(unsigned NumConversions) {
ImplicitConversionSequence *Conversions =
- slabAllocate<ImplicitConversionSequence>(NumConversions);
-
- // Construct the new objects.
- for (unsigned I = 0; I != NumConversions; ++I)
- new (&Conversions[I]) ImplicitConversionSequence();
-
+ new ImplicitConversionSequence[NumConversions];
----------------
vitalybuka wrote:
Seems unusual to keep ownership in ArrayRef.
Could we make ConversionSequenceList just a std::vector if it owns the memory?
https://github.com/llvm/llvm-project/pull/88546
More information about the cfe-commits
mailing list