summaryrefslogtreecommitdiffstats
path: root/clang/lib/Serialization/ASTWriterDecl.cpp
diff options
context:
space:
mode:
authorAaron Ballman <aaron@aaronballman.com>2014-03-14 12:38:50 +0000
committerAaron Ballman <aaron@aaronballman.com>2014-03-14 12:38:50 +0000
commita964ec1f14948468e5670e0affd90240bf3b64b0 (patch)
treeb2d709d58fd532be4bc58b1e5b8e37a2d5748444 /clang/lib/Serialization/ASTWriterDecl.cpp
parenta74c7914adbb4031beda337a0126d244f256824b (diff)
downloadbcm5719-llvm-a964ec1f14948468e5670e0affd90240bf3b64b0.tar.gz
bcm5719-llvm-a964ec1f14948468e5670e0affd90240bf3b64b0.zip
[C++11] Replacing ObjCProtocolDecl iterators protocol_loc_begin() and protocol_loc_end() with iterator_range protocol_locs(). Updating all of the usages of the iterators with range-based for loops.
llvm-svn: 203919
Diffstat (limited to 'clang/lib/Serialization/ASTWriterDecl.cpp')
-rw-r--r--clang/lib/Serialization/ASTWriterDecl.cpp6
1 files changed, 2 insertions, 4 deletions
diff --git a/clang/lib/Serialization/ASTWriterDecl.cpp b/clang/lib/Serialization/ASTWriterDecl.cpp
index 66155b71530..a667a178572 100644
--- a/clang/lib/Serialization/ASTWriterDecl.cpp
+++ b/clang/lib/Serialization/ASTWriterDecl.cpp
@@ -547,10 +547,8 @@ void ASTDeclWriter::VisitObjCProtocolDecl(ObjCProtocolDecl *D) {
Record.push_back(D->protocol_size());
for (const auto *I : D->protocols())
Writer.AddDeclRef(I, Record);
- for (ObjCProtocolDecl::protocol_loc_iterator PL = D->protocol_loc_begin(),
- PLEnd = D->protocol_loc_end();
- PL != PLEnd; ++PL)
- Writer.AddSourceLocation(*PL, Record);
+ for (const auto &PL : D->protocol_locs())
+ Writer.AddSourceLocation(PL, Record);
}
Code = serialization::DECL_OBJC_PROTOCOL;
OpenPOWER on IntegriCloud