[PATCH] D53810: [analyzer][NFC] Refactor PlistDiagnostics to use a class instead of passing 9 parameters around

Gábor Horváth via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Oct 29 08:20:15 PDT 2018


xazax.hun added inline comments.


================
Comment at: lib/StaticAnalyzer/Core/PlistDiagnostics.cpp:82
 
-static void EmitRanges(raw_ostream &o,
-                       const ArrayRef<SourceRange> Ranges,
-                       const FIDMap& FM,
-                       const Preprocessor &PP,
-                       unsigned indent) {
+  void ReportDiag(raw_ostream &o, const PathDiagnosticPiece& P) {
+    ReportPiece(o, P, /*indent*/ 4, /*depth*/ 0, /*includeControlFlow*/ true);
----------------
The `raw_ostream` seems to be a common argument. MAybe it would be worth to make that a member too?


https://reviews.llvm.org/D53810





More information about the cfe-commits mailing list