]> granicus.if.org Git - clang/commitdiff
Added "back()" method to PathDiagnostic to access the last piece in a path.
authorTed Kremenek <kremenek@apple.com>
Wed, 2 Apr 2008 20:35:01 +0000 (20:35 +0000)
committerTed Kremenek <kremenek@apple.com>
Wed, 2 Apr 2008 20:35:01 +0000 (20:35 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49112 91177308-0d34-0410-b5e6-96231b3b80d8

include/clang/Analysis/PathDiagnostic.h

index 651e700bdf0b8cfd69895c720248c72dbf0b6a41..2d66ba3df53dfb2055b682c41a70d1a3ad9516c9 100644 (file)
@@ -85,6 +85,14 @@ public:
     ++Size;
   }
   
+  PathDiagnosticPiece* back() {
+    return path.back();
+  }
+  
+  const PathDiagnosticPiece* back() const {
+    return path.back();
+  }
+  
   unsigned size() const { return Size; }
   bool empty() const { return Size == 0; }