summaryrefslogtreecommitdiffstats
path: root/clang/lib/StaticAnalyzer/Core/BugReporter.cpp
diff options
context:
space:
mode:
authorJordan Rose <jordan_rose@apple.com>2013-10-07 17:16:59 +0000
committerJordan Rose <jordan_rose@apple.com>2013-10-07 17:16:59 +0000
commit42b4248f05a40b4761738292592dc69609644a10 (patch)
treea0c34376e6e970c8a27f43f14c969b9cb36cc381 /clang/lib/StaticAnalyzer/Core/BugReporter.cpp
parent7741132f47fae4bb482a5ae88255333565f42c7d (diff)
downloadbcm5719-llvm-42b4248f05a40b4761738292592dc69609644a10.tar.gz
bcm5719-llvm-42b4248f05a40b4761738292592dc69609644a10.zip
[analyzer] ArrayRef-ize BugReporter::EmitBasicReport.
No functionality change. llvm-svn: 192114
Diffstat (limited to 'clang/lib/StaticAnalyzer/Core/BugReporter.cpp')
-rw-r--r--clang/lib/StaticAnalyzer/Core/BugReporter.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/clang/lib/StaticAnalyzer/Core/BugReporter.cpp b/clang/lib/StaticAnalyzer/Core/BugReporter.cpp
index b30bab62733..523b700667b 100644
--- a/clang/lib/StaticAnalyzer/Core/BugReporter.cpp
+++ b/clang/lib/StaticAnalyzer/Core/BugReporter.cpp
@@ -3428,13 +3428,15 @@ void BugReporter::EmitBasicReport(const Decl *DeclWithIssue,
StringRef name,
StringRef category,
StringRef str, PathDiagnosticLocation Loc,
- SourceRange* RBeg, unsigned NumRanges) {
+ ArrayRef<SourceRange> Ranges) {
// 'BT' is owned by BugReporter.
BugType *BT = getBugTypeForName(name, category);
BugReport *R = new BugReport(*BT, str, Loc);
R->setDeclWithIssue(DeclWithIssue);
- for ( ; NumRanges > 0 ; --NumRanges, ++RBeg) R->addRange(*RBeg);
+ for (ArrayRef<SourceRange>::iterator I = Ranges.begin(), E = Ranges.end();
+ I != E; ++I)
+ R->addRange(*I);
emitReport(R);
}
OpenPOWER on IntegriCloud