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

Ted Kremenek kremenek at apple.com
Wed Apr 2 13:35:02 PDT 2008


Author: kremenek
Date: Wed Apr  2 15:35:01 2008
New Revision: 49112

URL: http://llvm.org/viewvc/llvm-project?rev=49112&view=rev
Log:
Added "back()" method to PathDiagnostic to access the last piece in a path.

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=49112&r1=49111&r2=49112&view=diff

==============================================================================
--- cfe/trunk/include/clang/Analysis/PathDiagnostic.h (original)
+++ cfe/trunk/include/clang/Analysis/PathDiagnostic.h Wed Apr  2 15:35:01 2008
@@ -85,6 +85,14 @@
     ++Size;
   }
   
+  PathDiagnosticPiece* back() {
+    return path.back();
+  }
+  
+  const PathDiagnosticPiece* back() const {
+    return path.back();
+  }
+  
   unsigned size() const { return Size; }
   bool empty() const { return Size == 0; }
   





More information about the cfe-commits mailing list