[PATCH] D78118: [analyzer] StdLibraryFunctionsChecker: Add option to display loaded summaries

Gabor Marton via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Apr 28 08:34:21 PDT 2020


martong added a comment.

In D78118#1981592 <https://reviews.llvm.org/D78118#1981592>, @Szelethus wrote:

> This is a great idea, but the tests just seem to, well, test the new functionality?
>
> On a different issue, take a look at how certain help related frontend flags (not `-analyzer-config` ones!) skip the analysis, like `-analyzer-checker-help`, or `-analyzer-list-enabled-checkers`. If I were to set `DisplayLoadedSummaries` to true, most probably I'd only be interested in the capabilities of the checker, not the analysis itself. Though, I don't have an out-of-the-box solution that could work here, unless we outright emit an error in the checker registry function. That wouldn't be very nice, would it? :^) So, for the time being, regard this as me thinking aloud.


This new config option will simply list the (found) functions that have a summary based check enabled. This can be different for each TU. If a function cannot be looked up in a TU then we will never use its summary.
On the other hand, yes, it would be a good idea to have an option to list all the configured summaries. This list would be the same for each TU. Do you mind if I'd do that rather in another patch?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D78118





More information about the cfe-commits mailing list