summaryrefslogtreecommitdiff
path: root/lib/Serialization/ASTWriterDecl.cpp
diff options
context:
space:
mode:
authorAaron Ballman <aaron@aaronballman.com>2014-03-13 20:29:09 +0000
committerAaron Ballman <aaron@aaronballman.com>2014-03-13 20:29:09 +0000
commit460fea20dc792a17cbbadfa097140551b5c28e9e (patch)
tree3e8d79d702a20b46dd1a5aa7a5c470f552a5aad9 /lib/Serialization/ASTWriterDecl.cpp
parentccd9de1bcab5e34983d7911c05df42e254abee94 (diff)
downloadclang-460fea20dc792a17cbbadfa097140551b5c28e9e.tar.gz
clang-460fea20dc792a17cbbadfa097140551b5c28e9e.tar.bz2
clang-460fea20dc792a17cbbadfa097140551b5c28e9e.tar.xz
[C++11] Replacing ObjCInterfaceDecl iterators protocol_begin() and protocol_end() with iterator_range protocols(). Updating all of the usages of the iterators with range-based for loops.
Drive-by fixing some incorrect types where a for loop would be improperly using ObjCInterfaceDecl::protocol_iterator. No functional changes in these cases. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@203842 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Serialization/ASTWriterDecl.cpp')
-rw-r--r--lib/Serialization/ASTWriterDecl.cpp6
1 files changed, 2 insertions, 4 deletions
diff --git a/lib/Serialization/ASTWriterDecl.cpp b/lib/Serialization/ASTWriterDecl.cpp
index 18a196cf3a..96cf0e1dc1 100644
--- a/lib/Serialization/ASTWriterDecl.cpp
+++ b/lib/Serialization/ASTWriterDecl.cpp
@@ -491,10 +491,8 @@ void ASTDeclWriter::VisitObjCInterfaceDecl(ObjCInterfaceDecl *D) {
// Write out the protocols that are directly referenced by the @interface.
Record.push_back(Data.ReferencedProtocols.size());
- for (ObjCInterfaceDecl::protocol_iterator P = D->protocol_begin(),
- PEnd = D->protocol_end();
- P != PEnd; ++P)
- Writer.AddDeclRef(*P, Record);
+ for (const auto *P : D->protocols())
+ Writer.AddDeclRef(P, Record);
for (ObjCInterfaceDecl::protocol_loc_iterator PL = D->protocol_loc_begin(),
PLEnd = D->protocol_loc_end();
PL != PLEnd; ++PL)