From: Ted Kremenek Date: Wed, 2 Apr 2008 20:35:01 +0000 (+0000) Subject: Added "back()" method to PathDiagnostic to access the last piece in a path. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=725779aa8f786fc844c6db89f52de47a8b24d229;p=clang Added "back()" method to PathDiagnostic to access the last piece in a path. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49112 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/include/clang/Analysis/PathDiagnostic.h b/include/clang/Analysis/PathDiagnostic.h index 651e700bdf..2d66ba3df5 100644 --- a/include/clang/Analysis/PathDiagnostic.h +++ b/include/clang/Analysis/PathDiagnostic.h @@ -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; }