summaryrefslogtreecommitdiffstats
path: root/clang/lib/StaticAnalyzer/Checkers/NSErrorChecker.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'clang/lib/StaticAnalyzer/Checkers/NSErrorChecker.cpp')
-rw-r--r--clang/lib/StaticAnalyzer/Checkers/NSErrorChecker.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/clang/lib/StaticAnalyzer/Checkers/NSErrorChecker.cpp b/clang/lib/StaticAnalyzer/Checkers/NSErrorChecker.cpp
index 97109b7afd7..5a505fcef84 100644
--- a/clang/lib/StaticAnalyzer/Checkers/NSErrorChecker.cpp
+++ b/clang/lib/StaticAnalyzer/Checkers/NSErrorChecker.cpp
@@ -61,9 +61,8 @@ void NSErrorMethodChecker::checkASTDecl(const ObjCMethodDecl *D,
II = &D->getASTContext().Idents.get("NSError");
bool hasNSError = false;
- for (ObjCMethodDecl::param_const_iterator
- I = D->param_begin(), E = D->param_end(); I != E; ++I) {
- if (IsNSError((*I)->getType(), II)) {
+ for (const auto *I : D->params()) {
+ if (IsNSError(I->getType(), II)) {
hasNSError = true;
break;
}
OpenPOWER on IntegriCloud