diff options
author | Benjamin Kramer <benny.kra@googlemail.com> | 2015-06-12 15:31:50 +0000 |
---|---|---|
committer | Benjamin Kramer <benny.kra@googlemail.com> | 2015-06-12 15:31:50 +0000 |
commit | ffa220b1a7c6370c0802958723b80942c8403090 (patch) | |
tree | dedc7703d435ba38997368327b501951f41ba89f /include/clang/Lex/Preprocessor.h | |
parent | 3508c35e852d033669ce5a778aef9a4fc75bfa09 (diff) |
push_back() loop -> append() for random access iterators.
append will resize the vector to the optimal size. No functional change
intended.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@239607 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/clang/Lex/Preprocessor.h')
-rw-r--r-- | include/clang/Lex/Preprocessor.h | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/include/clang/Lex/Preprocessor.h b/include/clang/Lex/Preprocessor.h index f6e61c0e7a..2f4714bb1e 100644 --- a/include/clang/Lex/Preprocessor.h +++ b/include/clang/Lex/Preprocessor.h @@ -455,8 +455,9 @@ class Preprocessor : public RefCountedBase<Preprocessor> { void overrideActiveModuleMacros(Preprocessor &PP, IdentifierInfo *II) { if (auto *Info = getModuleInfo(PP, II)) { - for (auto *Active : Info->ActiveModuleMacros) - Info->OverriddenMacros.push_back(Active); + Info->OverriddenMacros.insert(Info->OverriddenMacros.end(), + Info->ActiveModuleMacros.begin(), + Info->ActiveModuleMacros.end()); Info->ActiveModuleMacros.clear(); Info->IsAmbiguous = false; } |