[cfe-commits] r49083 - /cfe/trunk/include/clang/Analysis/PathDiagnostic.h

Ted Kremenek kremenek at apple.com
Wed Apr 2 00:03:44 PDT 2008


Author: kremenek
Date: Wed Apr  2 02:03:43 2008
New Revision: 49083

URL: http://llvm.org/viewvc/llvm-project?rev=49083&view=rev
Log:
Added "description" field to PathDiagnostic.

Modified:
    cfe/trunk/include/clang/Analysis/PathDiagnostic.h

Modified: cfe/trunk/include/clang/Analysis/PathDiagnostic.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Analysis/PathDiagnostic.h?rev=49083&r1=49082&r2=49083&view=diff

==============================================================================
--- cfe/trunk/include/clang/Analysis/PathDiagnostic.h (original)
+++ cfe/trunk/include/clang/Analysis/PathDiagnostic.h Wed Apr  2 02:03:43 2008
@@ -33,6 +33,9 @@
   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 @@
 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;





More information about the cfe-commits mailing list