[PATCH] D65381: [analyzer][NFC] Refactoring BugReporter.cpp P3.: std::shared_pointer<PathDiagnosticPiece> -> PathDiagnosticPieceRef

Kristóf Umann via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Aug 1 07:16:54 PDT 2019


Szelethus added inline comments.


================
Comment at: clang/include/clang/StaticAnalyzer/Core/BugReporter/BugReporterVisitors.h:244
+                                         const ExplodedNode *N,
+                                         const CFGBlock *srcBlk,
+                                         const CFGBlock *dstBlk, BugReport &R,
----------------
xazax.hun wrote:
> If you already touch these parts maybe you could capitalize some variable names.
Hmm, okay, so, what is our stance on this? Apparently, LLVM changed the coding guideline, what would be the best direction moving forward?


================
Comment at: clang/include/clang/StaticAnalyzer/Core/BugReporter/PathDiagnostic.h:449
 
-class PathPieces : public std::list<std::shared_ptr<PathDiagnosticPiece>> {
+using PathDiagnosticPieceRef = std::shared_ptr<PathDiagnosticPiece>;
+
----------------
xazax.hun wrote:
> NoQ wrote:
> > Mmm, why do we need to define this twice?
> I agree, I would love to not to see it twice.
This file only forward declares classes from `PathDiagnostic.h`, so we do need this here.


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

https://reviews.llvm.org/D65381





More information about the cfe-commits mailing list