diff options
| author | Craig Topper <craig.topper@gmail.com> | 2013-07-04 03:08:24 +0000 |
|---|---|---|
| committer | Craig Topper <craig.topper@gmail.com> | 2013-07-04 03:08:24 +0000 |
| commit | 09d19efaa147762f84aed55efa7930bb3616a4e5 (patch) | |
| tree | aa7bb1fb61edc7c5f685118ca9e842e37da1f3ad /lib/Sema/SemaInit.cpp | |
| parent | 8b625a3f7764959d0a2ac3cd860ce1e168e0fc9b (diff) | |
| download | clang-09d19efaa147762f84aed55efa7930bb3616a4e5.tar.gz clang-09d19efaa147762f84aed55efa7930bb3616a4e5.tar.bz2 clang-09d19efaa147762f84aed55efa7930bb3616a4e5.tar.xz | |
Use SmallVectorImpl instead of SmallVector for iterators and references to avoid specifying the vector size unnecessarily.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@185610 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/SemaInit.cpp')
| -rw-r--r-- | lib/Sema/SemaInit.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/Sema/SemaInit.cpp b/lib/Sema/SemaInit.cpp index 18328553d3..96291923bd 100644 --- a/lib/Sema/SemaInit.cpp +++ b/lib/Sema/SemaInit.cpp @@ -3383,7 +3383,7 @@ static OverloadingResult TryRefInitWithConversionFunction(Sema &S, // be changed while iterating (e.g. because of deserialization). // To be safe we copy the lookup results to a new container. SmallVector<NamedDecl*, 16> Ctors(R.begin(), R.end()); - for (SmallVector<NamedDecl*, 16>::iterator + for (SmallVectorImpl<NamedDecl *>::iterator CI = Ctors.begin(), CE = Ctors.end(); CI != CE; ++CI) { NamedDecl *D = *CI; DeclAccessPair FoundDecl = DeclAccessPair::make(D, D->getAccess()); @@ -4009,7 +4009,7 @@ static void TryUserDefinedConversion(Sema &S, // be changed while iterating. To be safe we copy the lookup results // to a new container. SmallVector<NamedDecl*, 8> CopyOfCon(R.begin(), R.end()); - for (SmallVector<NamedDecl*, 8>::iterator + for (SmallVectorImpl<NamedDecl *>::iterator Con = CopyOfCon.begin(), ConEnd = CopyOfCon.end(); Con != ConEnd; ++Con) { NamedDecl *D = *Con; @@ -4716,7 +4716,7 @@ static void LookupCopyAndMoveConstructors(Sema &S, // be changed while iterating (e.g. because of deserialization). // To be safe we copy the lookup results to a new container. SmallVector<NamedDecl*, 16> Ctors(R.begin(), R.end()); - for (SmallVector<NamedDecl*, 16>::iterator + for (SmallVectorImpl<NamedDecl *>::iterator CI = Ctors.begin(), CE = Ctors.end(); CI != CE; ++CI) { NamedDecl *D = *CI; CXXConstructorDecl *Constructor = 0; |
