diff options
author | Ted Kremenek <kremenek@apple.com> | 2008-07-23 21:51:42 +0000 |
---|---|---|
committer | Ted Kremenek <kremenek@apple.com> | 2008-07-23 21:51:42 +0000 |
commit | a32980435ab2e3a5e037b2ebe936682e1ffe80e1 (patch) | |
tree | a2288b5056eb08047332932098a867724664f0d8 | |
parent | 2cfac226b028e5a2165af077268f70cd2ab4b1a8 (diff) |
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
-rw-r--r-- | include/clang/Analysis/PathDiagnostic.h | 6 |
1 files changed, 4 insertions, 2 deletions
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(); } |