Use SmallVectorImpl::const_iterator instead of SmallVector to avoid specifying the vector size.