aboutsummaryrefslogtreecommitdiff
path: root/include/clang/StaticAnalyzer/Core/BugReporter/BugReporter.h
diff options
context:
space:
mode:
authorArtem Dergachev <artem.dergachev@gmail.com>2016-10-07 11:29:32 +0000
committerArtem Dergachev <artem.dergachev@gmail.com>2016-10-07 11:29:32 +0000
commit6cfbf8b212d7ed38852b6a1a058c9cb2a19b5a16 (patch)
tree40011ddc853b92e0def85b005d1dc9174a17b413 /include/clang/StaticAnalyzer/Core/BugReporter/BugReporter.h
parentd6eb4dd4d158538d3612c0f034a67d9828188ba8 (diff)
Revert "[analyzer] Re-apply r283092, attempt no.3, in small chunks this time."
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@283541 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/clang/StaticAnalyzer/Core/BugReporter/BugReporter.h')
-rw-r--r--include/clang/StaticAnalyzer/Core/BugReporter/BugReporter.h37
1 files changed, 2 insertions, 35 deletions
diff --git a/include/clang/StaticAnalyzer/Core/BugReporter/BugReporter.h b/include/clang/StaticAnalyzer/Core/BugReporter/BugReporter.h
index ebfe0c62a1..0ab8b29c3e 100644
--- a/include/clang/StaticAnalyzer/Core/BugReporter/BugReporter.h
+++ b/include/clang/StaticAnalyzer/Core/BugReporter/BugReporter.h
@@ -66,7 +66,6 @@ public:
typedef SmallVector<std::unique_ptr<BugReporterVisitor>, 8> VisitorList;
typedef VisitorList::iterator visitor_iterator;
typedef SmallVector<StringRef, 2> ExtraTextList;
- typedef SmallVector<const PathDiagnosticNotePiece *, 4> NoteList;
protected:
friend class BugReporter;
@@ -83,8 +82,7 @@ protected:
const ExplodedNode *ErrorNode;
SmallVector<SourceRange, 4> Ranges;
ExtraTextList ExtraText;
- NoteList Notes;
-
+
typedef llvm::DenseSet<SymbolRef> Symbols;
typedef llvm::DenseSet<const MemRegion *> Regions;
@@ -179,18 +177,6 @@ public:
const BugType& getBugType() const { return BT; }
BugType& getBugType() { return BT; }
- /// \brief True when the report has an execution path associated with it.
- ///
- /// A report is said to be path-sensitive if it was thrown against a
- /// particular exploded node in the path-sensitive analysis graph.
- /// Path-sensitive reports have their intermediate path diagnostics
- /// auto-generated, perhaps with the help of checker-defined visitors,
- /// and may contain extra notes.
- /// Path-insensitive reports consist only of a single warning message
- /// in a specific location, and perhaps extra notes.
- /// Path-sensitive checkers are allowed to throw path-insensitive reports.
- bool isPathSensitive() const { return ErrorNode != nullptr; }
-
const ExplodedNode *getErrorNode() const { return ErrorNode; }
StringRef getDescription() const { return Description; }
@@ -259,26 +245,7 @@ public:
void setDeclWithIssue(const Decl *declWithIssue) {
DeclWithIssue = declWithIssue;
}
-
- /// Add new item to the list of additional notes that need to be attached to
- /// this path-insensitive report. If you want to add extra notes to a
- /// path-sensitive report, you need to use a BugReporterVisitor because it
- /// allows you to specify where exactly in the auto-generated path diagnostic
- /// the extra note should appear.
- void addNote(StringRef Msg, const PathDiagnosticLocation &Pos,
- ArrayRef<SourceRange> Ranges = {}) {
- auto *P = new PathDiagnosticNotePiece(Pos, Msg);
-
- for (const auto &R : Ranges)
- P->addRange(R);
-
- Notes.push_back(P);
- }
-
- virtual const NoteList &getNotes() {
- return Notes;
- }
-
+
/// \brief This allows for addition of meta data to the diagnostic.
///
/// Currently, only the HTMLDiagnosticClient knows how to display it.