summaryrefslogtreecommitdiffstats
path: root/clang/lib/StaticAnalyzer/Core/HTMLDiagnostics.cpp
diff options
context:
space:
mode:
authorTed Kremenek <kremenek@apple.com>2012-08-16 17:45:29 +0000
committerTed Kremenek <kremenek@apple.com>2012-08-16 17:45:29 +0000
commit1e60273eedfe740c197c00ecc7d8e2b86425317c (patch)
tree310d5b803b6b3de9d922faded3abc1c05d46007f /clang/lib/StaticAnalyzer/Core/HTMLDiagnostics.cpp
parent9bf9af92a44b66f808679807ff67a02d0a67bcfc (diff)
downloadbcm5719-llvm-1e60273eedfe740c197c00ecc7d8e2b86425317c.tar.gz
bcm5719-llvm-1e60273eedfe740c197c00ecc7d8e2b86425317c.zip
Remove "range_iterator" from PathDiagnosticPiece and just use ArrayRef<SourceRange> 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
Diffstat (limited to 'clang/lib/StaticAnalyzer/Core/HTMLDiagnostics.cpp')
-rw-r--r--clang/lib/StaticAnalyzer/Core/HTMLDiagnostics.cpp6
1 files changed, 4 insertions, 2 deletions
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<SourceRange> Ranges = P.getRanges();
+ for (ArrayRef<SourceRange>::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.
OpenPOWER on IntegriCloud