[PATCH] D65381: [analyzer][NFC] Refactoring BugReporter.cpp P3.: std::shared_pointer<PathDiagnosticPiece> -> PathDiagnosticPieceRef
Gábor Horváth via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Mon Jul 29 20:43:29 PDT 2019
xazax.hun added a comment.
Just wondering, did you check if we actually need shared ownership for this type? If not, do not waste your time checking for now :)
================
Comment at: clang/include/clang/StaticAnalyzer/Core/BugReporter/BugReporterVisitors.h:244
+ const ExplodedNode *N,
+ const CFGBlock *srcBlk,
+ const CFGBlock *dstBlk, BugReport &R,
----------------
If you already touch these parts maybe you could capitalize some variable names.
================
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>;
+
----------------
NoQ wrote:
> Mmm, why do we need to define this twice?
I agree, I would love to not to see it twice.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D65381/new/
https://reviews.llvm.org/D65381
More information about the cfe-commits
mailing list