[PATCH] D130055: Clang extensions yolo, woot & kaboom

Aaron Ballman via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Jul 28 04:31:16 PDT 2022


aaron.ballman added a comment.

In D130055#3683822 <https://reviews.llvm.org/D130055#3683822>, @jkorous wrote:

> In D130055#3683173 <https://reviews.llvm.org/D130055#3683173>, @aaron.ballman wrote:
>
>> Are there circumstances where we cannot "simply" infer this from the constructor itself? (After instantiation) we know the class hierarchy, we know the data members, and we know the ctor init list/in-class initializers, so it seems like we should be able to recursively mark a constructor as yolo for the user rather than making them write it themselves.
>
> The init list can be in a different translation unit (TU) which means we can't compute all properties just from the code in current TU. (Unless we decide to pessimistically consider such unanalyzable constructors as non-initializing.)

I was imagining that this analysis is most powerful when done as a cross-TU static analysis pass. However, having markings for when there's less context is definitely a benefit, so that's a great point.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D130055



More information about the cfe-commits mailing list