r283541 - Revert "[analyzer] Re-apply r283092, attempt no.3, in small chunks this time."
Artem Dergachev via cfe-commits
cfe-commits at lists.llvm.org
Fri Oct 7 04:29:33 PDT 2016
Author: dergachev
Date: Fri Oct 7 06:29:32 2016
New Revision: 283541
URL: http://llvm.org/viewvc/llvm-project?rev=283541&view=rev
Log:
Revert "[analyzer] Re-apply r283092, attempt no.3, in small chunks this time."
Modified:
cfe/trunk/include/clang/StaticAnalyzer/Core/BugReporter/BugReporter.h
Modified: cfe/trunk/include/clang/StaticAnalyzer/Core/BugReporter/BugReporter.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/StaticAnalyzer/Core/BugReporter/BugReporter.h?rev=283541&r1=283540&r2=283541&view=diff
==============================================================================
--- cfe/trunk/include/clang/StaticAnalyzer/Core/BugReporter/BugReporter.h (original)
+++ cfe/trunk/include/clang/StaticAnalyzer/Core/BugReporter/BugReporter.h Fri Oct 7 06:29:32 2016
@@ -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.
More information about the cfe-commits
mailing list