diff options
author | Ted Kremenek <kremenek@apple.com> | 2008-04-02 07:03:43 +0000 |
---|---|---|
committer | Ted Kremenek <kremenek@apple.com> | 2008-04-02 07:03:43 +0000 |
commit | 845ddbcd7f0eacbf59ea85e5dcccbe18eaae35eb (patch) | |
tree | 0dc73db83ccf5ee6c011ea4b2f0007f01579c918 | |
parent | d805bec0fbb98aa10abbb41bfdcb2e2fab1bac96 (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.h | 9 |
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; |