Szelethus added inline comments.

================
Comment at: clang/include/clang/StaticAnalyzer/Core/CheckerRegistryData.h:216
+  /// This output is not intended to be machine-parseable.
+  void printCheckerWithDescList(const AnalyzerOptions &AnOpts, raw_ostream 
&Out,
+                                size_t MaxNameChars = 30) const;
----------------
baloghadamsoftware wrote:
> Why not store `AnOpts` in `CheckerRegistryData`? It would save the need to 
> pass it to every function separately.
This is definitely a point where I chose a well defined interface over 
convenience. These print functions only have a single user, `CompilerInstance`, 
which must juggle all sorts of analyzer managers anyways, so it wouldn't have 
made the code any more readable in my opinion.

The idea was to constrain all data this class has to be strictly about what was 
processed by `CheckerRegistry`. While mildly inconvenient, the only way to 
retrieve this object would be from `CheckerManager`, that also has a getter to 
`AnalyzerOptions`, so in case someone were to use this for debug purposes or 
something, they certainly can.


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

https://reviews.llvm.org/D82585



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to