//===----------------------------------------------------------------------===//
class PathDiagnostic;
+class PathDiagnosticPiece;
+
+class PathPieces : public std::deque<PathDiagnosticPiece *> {
+public:
+ ~PathPieces();
+};
class PathDiagnosticConsumer {
virtual void anchor();
/// diagnostic. It represents an ordered-collection of PathDiagnosticPieces,
/// each which represent the pieces of the path.
class PathDiagnostic : public llvm::FoldingSetNode {
- std::deque<PathDiagnosticPiece*> path;
+ PathPieces path;
unsigned Size;
std::string BugType;
std::string Desc;
PathDiagnostic::PathDiagnostic() : Size(0) {}
-PathDiagnostic::~PathDiagnostic() {
- for (iterator I = begin(), E = end(); I != E; ++I) delete &*I;
+PathPieces::~PathPieces() {
+ for (iterator I = begin(), E = end(); I != E; ++I) delete *I;
}
+PathDiagnostic::~PathDiagnostic() {}
+
void PathDiagnostic::resetPath(bool deletePieces) {
Size = 0;