diff options
author | Craig Topper <craig.topper@gmail.com> | 2014-08-25 04:15:02 +0000 |
---|---|---|
committer | Craig Topper <craig.topper@gmail.com> | 2014-08-25 04:15:02 +0000 |
commit | c6914d068f317f3c8bc9734b6bbeb090975b50b1 (patch) | |
tree | 1d9a504d220e673b2fa44e117abd1b1ee03fc9a6 /clang/lib/AST/ASTContext.cpp | |
parent | 88126a25ebae096fa45b83b2998657c0c9030449 (diff) | |
download | bcm5719-llvm-c6914d068f317f3c8bc9734b6bbeb090975b50b1.tar.gz bcm5719-llvm-c6914d068f317f3c8bc9734b6bbeb090975b50b1.zip |
Use range based for loops to avoid needing to re-mention SmallPtrSet size.
llvm-svn: 216370
Diffstat (limited to 'clang/lib/AST/ASTContext.cpp')
-rw-r--r-- | clang/lib/AST/ASTContext.cpp | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/clang/lib/AST/ASTContext.cpp b/clang/lib/AST/ASTContext.cpp index 3a150968155..718719a904f 100644 --- a/clang/lib/AST/ASTContext.cpp +++ b/clang/lib/AST/ASTContext.cpp @@ -6673,11 +6673,9 @@ void getIntersectionOfProtocols(ASTContext &Context, llvm::SmallPtrSet<ObjCProtocolDecl *, 8> RHSInheritedProtocols; Context.CollectInheritedProtocols(RHS->getInterface(), RHSInheritedProtocols); - for (llvm::SmallPtrSet<ObjCProtocolDecl*,8>::iterator I = - RHSInheritedProtocols.begin(), - E = RHSInheritedProtocols.end(); I != E; ++I) - if (InheritedProtocolSet.count((*I))) - IntersectionOfProtocols.push_back((*I)); + for (ObjCProtocolDecl *ProtDecl : RHSInheritedProtocols) + if (InheritedProtocolSet.count(ProtDecl)) + IntersectionOfProtocols.push_back(ProtDecl); } } |