[PATCH] D97324: [NFC] Make TrailingObjects non-copyable/non-movable

Erich Keane via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Feb 23 16:36:59 PST 2021


erichkeane added a comment.

In D97324#2583286 <https://reviews.llvm.org/D97324#2583286>, @jyknight wrote:

> I can imagine there being some cases where these could theoretically be useful.
>
> But if you've tested this change and it doesn't cause build failures with any existing uses of TrailingObjects in llvm-project, then LGTM.

Thanks!  I ran into the problem because I had a function that returned by reference, and stored a copy, which worked silently.  Then, during runtime, I obviously got nonsense.

Hopefully these are sufficient to prevent that from being a problem for others in the future.  I'd built ahead of time (and done check-all), so I'm quite confident that this won't cause issues.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D97324



More information about the cfe-commits mailing list