[PATCH] D93779: ADT: Fix reference invalidation in SmallVector::push_back and single-element insert

David Blaikie via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jan 13 19:10:57 PST 2021


dblaikie added a comment.

In D93779#2497099 <https://reviews.llvm.org/D93779#2497099>, @dexonsmith wrote:

> Reverted in 56d1ffb927d03958a7a31442596df749264a7792 <https://reviews.llvm.org/rG56d1ffb927d03958a7a31442596df749264a7792> due to an error on Windows:
> http://lab.llvm.org:8011/#/builders/127/builds/4489/steps/7/logs/stdio
> if it's obvious I'll recommit in a minute, but if anyone has ideas I'd welcome them.

Guess maybe something in the `std::is_same<std::remove_const_t<std::remove_reference_t<ArgType>>, T>::value` isn't working quite right on MSVC? (could test that with godbolt, maybe) - is it needed? Since it's on both insert_one_maybe_copy and there's an implementation detail/doesn't need to protect from violations of that constraint (admittedly I'm proposing removing it because maybe MSVC is violating it... )? And instead SFINAE/enable_if only on the TakesParamByValue part?


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D93779/new/

https://reviews.llvm.org/D93779



More information about the llvm-commits mailing list