aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTed Kremenek <kremenek@apple.com>2008-04-02 07:03:43 +0000
committerTed Kremenek <kremenek@apple.com>2008-04-02 07:03:43 +0000
commit845ddbcd7f0eacbf59ea85e5dcccbe18eaae35eb (patch)
tree0dc73db83ccf5ee6c011ea4b2f0007f01579c918
parentd805bec0fbb98aa10abbb41bfdcb2e2fab1bac96 (diff)
Added "description" field to PathDiagnostic.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49083 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--include/clang/Analysis/PathDiagnostic.h9
1 files changed, 8 insertions, 1 deletions
diff --git a/include/clang/Analysis/PathDiagnostic.h b/include/clang/Analysis/PathDiagnostic.h
index bf855054bd..651e700bdf 100644
--- a/include/clang/Analysis/PathDiagnostic.h
+++ b/include/clang/Analysis/PathDiagnostic.h
@@ -33,6 +33,9 @@ public:
PathDiagnosticPiece(FullSourceLoc pos, const std::string& s)
: Pos(pos), str(s) {}
+ PathDiagnosticPiece(FullSourceLoc pos, const char* s)
+ : Pos(pos), str(s) {}
+
const std::string& getString() const { return str; }
void addRange(SourceRange R) {
@@ -61,13 +64,17 @@ public:
class PathDiagnostic {
std::list<PathDiagnosticPiece*> path;
unsigned Size;
-
+ std::string Desc;
public:
PathDiagnostic() : Size(0) {}
+ PathDiagnostic(const char* desc) : Desc(desc) {}
+ PathDiagnostic(const std::string& desc) : Desc(desc) {}
~PathDiagnostic();
+ const std::string& getDescription() const { return Desc; }
+
void push_front(PathDiagnosticPiece* piece) {
path.push_front(piece);
++Size;