summaryrefslogtreecommitdiffstats
path: root/clang/tools/libclang/CIndex.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'clang/tools/libclang/CIndex.cpp')
-rw-r--r--clang/tools/libclang/CIndex.cpp12
1 files changed, 4 insertions, 8 deletions
diff --git a/clang/tools/libclang/CIndex.cpp b/clang/tools/libclang/CIndex.cpp
index 1c24e6b7b27..52a792927ef 100644
--- a/clang/tools/libclang/CIndex.cpp
+++ b/clang/tools/libclang/CIndex.cpp
@@ -916,10 +916,8 @@ bool CursorVisitor::VisitObjCMethodDecl(ObjCMethodDecl *ND) {
if (Visit(TSInfo->getTypeLoc()))
return true;
- for (ObjCMethodDecl::param_iterator P = ND->param_begin(),
- PEnd = ND->param_end();
- P != PEnd; ++P) {
- if (Visit(MakeCXCursor(*P, TU, RegionOfInterest)))
+ for (const auto *P : ND->params()) {
+ if (Visit(MakeCXCursor(P, TU, RegionOfInterest)))
return true;
}
@@ -5361,10 +5359,8 @@ AnnotateTokensWorker::Visit(CXCursor cursor, CXCursor parent) {
if (Method->getObjCDeclQualifier())
HasContextSensitiveKeywords = true;
else {
- for (ObjCMethodDecl::param_const_iterator P = Method->param_begin(),
- PEnd = Method->param_end();
- P != PEnd; ++P) {
- if ((*P)->getObjCDeclQualifier()) {
+ for (const auto *P : Method->params()) {
+ if (P->getObjCDeclQualifier()) {
HasContextSensitiveKeywords = true;
break;
}
OpenPOWER on IntegriCloud