aboutsummaryrefslogtreecommitdiffstats
path: root/include/clang/StaticAnalyzer/Core/BugReporter/BugReporter.h
diff options
context:
space:
mode:
authorDimitry Andric <dim@FreeBSD.org>2017-01-06 20:13:35 +0000
committerDimitry Andric <dim@FreeBSD.org>2017-01-06 20:13:35 +0000
commit6694ed095d6b27a2c92ec4fd63664fcd88a05749 (patch)
tree0633c29bd8350e306f3a24a30f3f6045efd35420 /include/clang/StaticAnalyzer/Core/BugReporter/BugReporter.h
parentd5dc75c5cf109efe52b1da32ec44a667389a0f0a (diff)
downloadsrc-6694ed095d6b27a2c92ec4fd63664fcd88a05749.tar.gz
src-6694ed095d6b27a2c92ec4fd63664fcd88a05749.zip
Vendor import of clang trunk r291274:vendor/clang/clang-trunk-r291274
Notes
Notes: svn path=/vendor/clang/dist/; revision=311534 svn path=/vendor/clang/clang-trunk-r291274/; revision=311535; tag=vendor/clang/clang-trunk-r291274
Diffstat (limited to 'include/clang/StaticAnalyzer/Core/BugReporter/BugReporter.h')
-rw-r--r--include/clang/StaticAnalyzer/Core/BugReporter/BugReporter.h7
1 files changed, 3 insertions, 4 deletions
diff --git a/include/clang/StaticAnalyzer/Core/BugReporter/BugReporter.h b/include/clang/StaticAnalyzer/Core/BugReporter/BugReporter.h
index 73f4dd5a3e91..0f1eb096c495 100644
--- a/include/clang/StaticAnalyzer/Core/BugReporter/BugReporter.h
+++ b/include/clang/StaticAnalyzer/Core/BugReporter/BugReporter.h
@@ -66,8 +66,7 @@ public:
typedef SmallVector<std::unique_ptr<BugReporterVisitor>, 8> VisitorList;
typedef VisitorList::iterator visitor_iterator;
typedef SmallVector<StringRef, 2> ExtraTextList;
- typedef SmallVector<llvm::IntrusiveRefCntPtr<PathDiagnosticNotePiece>, 4>
- NoteList;
+ typedef SmallVector<std::shared_ptr<PathDiagnosticNotePiece>, 4> NoteList;
protected:
friend class BugReporter;
@@ -268,12 +267,12 @@ public:
/// the extra note should appear.
void addNote(StringRef Msg, const PathDiagnosticLocation &Pos,
ArrayRef<SourceRange> Ranges) {
- PathDiagnosticNotePiece *P = new PathDiagnosticNotePiece(Pos, Msg);
+ auto P = std::make_shared<PathDiagnosticNotePiece>(Pos, Msg);
for (const auto &R : Ranges)
P->addRange(R);
- Notes.push_back(P);
+ Notes.push_back(std::move(P));
}
// FIXME: Instead of making an override, we could have default-initialized