From 1e60273eedfe740c197c00ecc7d8e2b86425317c Mon Sep 17 00:00:00 2001 From: Ted Kremenek Date: Thu, 16 Aug 2012 17:45:29 +0000 Subject: Remove "range_iterator" from PathDiagnosticPiece and just use ArrayRef for ranges. This removes conceptual clutter, and can allow us to easy migrate to C++11 style for-range loops if we ever move to using C++11 in Clang. llvm-svn: 162029 --- clang/lib/StaticAnalyzer/Core/HTMLDiagnostics.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'clang/lib/StaticAnalyzer/Core/HTMLDiagnostics.cpp') diff --git a/clang/lib/StaticAnalyzer/Core/HTMLDiagnostics.cpp b/clang/lib/StaticAnalyzer/Core/HTMLDiagnostics.cpp index 995135f260c..c09bdf2b5e5 100644 --- a/clang/lib/StaticAnalyzer/Core/HTMLDiagnostics.cpp +++ b/clang/lib/StaticAnalyzer/Core/HTMLDiagnostics.cpp @@ -482,9 +482,11 @@ void HTMLDiagnostics::HandlePiece(Rewriter& R, FileID BugFileID, R.InsertTextBefore(Loc, os.str()); // Now highlight the ranges. - for (const SourceRange *I = P.ranges_begin(), *E = P.ranges_end(); - I != E; ++I) + ArrayRef Ranges = P.getRanges(); + for (ArrayRef::iterator I = Ranges.begin(), + E = Ranges.end(); I != E; ++I) { HighlightRange(R, LPosInfo.first, *I); + } #if 0 // If there is a code insertion hint, insert that code. -- cgit v1.2.3