[PATCH] D53692: [analyzer] Evaluate all non-checker config options before analysis

Umann Kristóf via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Nov 2 01:05:33 PDT 2018


Szelethus added a comment.

In https://reviews.llvm.org/D53692#1285091, @NoQ wrote:

> I guess i'm running out of steam for today :)
>
> > `Opts.shouldDoThat()` -> `Opts.ShouldDoThat.getValue()`
>
> Is this really unavoidable? Like, what makes them optional when they're always non-optional? Maybe just somehow prevent un-eagerly-initialized AnalyzerConfig from appearing anywhere in the program?


Thats a fair point, the reason why I kept `Optional<T>` is the extra safety -- it took a good couple hours to make this patch, and it didn't took days thanks to the `hasValue()` assert, since, well, how macros get expanded is always a surprise. But sure, ideally it shouldn't be there.


https://reviews.llvm.org/D53692





More information about the cfe-commits mailing list