From: Ted Kremenek Date: Wed, 23 Jul 2008 21:51:42 +0000 (+0000) Subject: Use typedef range_iterator instead of SourceRange* in PathDiagnosticPiece. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=a32980435ab2e3a5e037b2ebe936682e1ffe80e1;p=clang Use typedef range_iterator instead of SourceRange* in PathDiagnosticPiece. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53962 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/include/clang/Analysis/PathDiagnostic.h b/include/clang/Analysis/PathDiagnostic.h index 89ca18c61e..bb31ee391f 100644 --- a/include/clang/Analysis/PathDiagnostic.h +++ b/include/clang/Analysis/PathDiagnostic.h @@ -56,11 +56,13 @@ public: ranges.push_back(SourceRange(B,E)); } - const SourceRange* ranges_begin() const { + typedef const SourceRange* range_iterator; + + range_iterator ranges_begin() const { return ranges.empty() ? NULL : &ranges[0]; } - const SourceRange* ranges_end() const { + range_iterator ranges_end() const { return ranges_begin() + ranges.size(); }