aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/TextAPI/TextStub.cpp
diff options
context:
space:
mode:
authorKazu Hirata <kazu@google.com>2021-09-16 08:46:26 -0700
committerKazu Hirata <kazu@google.com>2021-09-16 08:46:26 -0700
commitcfc74024195e3be44d023a505d80b7e19f4041fc (patch)
treecb50d7311939e6493372ded80ac939b560b4a570 /llvm/lib/TextAPI/TextStub.cpp
parentffa5c3a555a8d5d9931d1ae6d6c9e873ff8c5510 (diff)
downloadllvm-cfc74024195e3be44d023a505d80b7e19f4041fc.zip
llvm-cfc74024195e3be44d023a505d80b7e19f4041fc.tar.gz
llvm-cfc74024195e3be44d023a505d80b7e19f4041fc.tar.bz2
[llvm] Use drop_begin (NFC)
Diffstat (limited to 'llvm/lib/TextAPI/TextStub.cpp')
-rw-r--r--llvm/lib/TextAPI/TextStub.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/TextAPI/TextStub.cpp b/llvm/lib/TextAPI/TextStub.cpp
index 5d85342..b64f19a 100644
--- a/llvm/lib/TextAPI/TextStub.cpp
+++ b/llvm/lib/TextAPI/TextStub.cpp
@@ -1121,9 +1121,9 @@ TextAPIReader::get(MemoryBufferRef InputBuffer) {
auto File = std::unique_ptr<InterfaceFile>(
const_cast<InterfaceFile *>(Files.front()));
- for (auto Iter = std::next(Files.begin()); Iter != Files.end(); ++Iter)
+ for (const InterfaceFile *FI : llvm::drop_begin(Files))
File->addDocument(
- std::shared_ptr<InterfaceFile>(const_cast<InterfaceFile *>(*Iter)));
+ std::shared_ptr<InterfaceFile>(const_cast<InterfaceFile *>(FI)));
if (YAMLIn.error())
return make_error<StringError>(Ctx.ErrorMessage, YAMLIn.error());