forked from OSchip/llvm-project
Refactor pieces of PathDiagnostic into its own data structure. No functionality change.
llvm-svn: 150053
This commit is contained in:
parent
c03bdd9c80
commit
3116c4e5cd
|
|
@ -44,6 +44,12 @@ class ExplodedNode;
|
||||||
//===----------------------------------------------------------------------===//
|
//===----------------------------------------------------------------------===//
|
||||||
|
|
||||||
class PathDiagnostic;
|
class PathDiagnostic;
|
||||||
|
class PathDiagnosticPiece;
|
||||||
|
|
||||||
|
class PathPieces : public std::deque<PathDiagnosticPiece *> {
|
||||||
|
public:
|
||||||
|
~PathPieces();
|
||||||
|
};
|
||||||
|
|
||||||
class PathDiagnosticConsumer {
|
class PathDiagnosticConsumer {
|
||||||
virtual void anchor();
|
virtual void anchor();
|
||||||
|
|
@ -475,7 +481,7 @@ public:
|
||||||
/// diagnostic. It represents an ordered-collection of PathDiagnosticPieces,
|
/// diagnostic. It represents an ordered-collection of PathDiagnosticPieces,
|
||||||
/// each which represent the pieces of the path.
|
/// each which represent the pieces of the path.
|
||||||
class PathDiagnostic : public llvm::FoldingSetNode {
|
class PathDiagnostic : public llvm::FoldingSetNode {
|
||||||
std::deque<PathDiagnosticPiece*> path;
|
PathPieces path;
|
||||||
unsigned Size;
|
unsigned Size;
|
||||||
std::string BugType;
|
std::string BugType;
|
||||||
std::string Desc;
|
std::string Desc;
|
||||||
|
|
|
||||||
|
|
@ -62,10 +62,12 @@ PathDiagnosticMacroPiece::~PathDiagnosticMacroPiece() {
|
||||||
|
|
||||||
PathDiagnostic::PathDiagnostic() : Size(0) {}
|
PathDiagnostic::PathDiagnostic() : Size(0) {}
|
||||||
|
|
||||||
PathDiagnostic::~PathDiagnostic() {
|
PathPieces::~PathPieces() {
|
||||||
for (iterator I = begin(), E = end(); I != E; ++I) delete &*I;
|
for (iterator I = begin(), E = end(); I != E; ++I) delete *I;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
PathDiagnostic::~PathDiagnostic() {}
|
||||||
|
|
||||||
void PathDiagnostic::resetPath(bool deletePieces) {
|
void PathDiagnostic::resetPath(bool deletePieces) {
|
||||||
Size = 0;
|
Size = 0;
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue