[PATCH] D11446: For loop style fix
Piotr Padlewski
prazek at google.com
Fri Jul 24 15:01:50 PDT 2015
Prazek marked 3 inline comments as done.
================
Comment at: lib/CodeGen/CGVTables.cpp:835
@@ -834,6 +834,3 @@
- typedef std::vector<const CXXRecordDecl *>::const_iterator const_iterator;
- for (const_iterator i = DeferredVTables.begin(),
- e = DeferredVTables.end(); i != e; ++i) {
- const CXXRecordDecl *RD = *i;
+ for (const auto &RD : DeferredVTables) {
if (shouldEmitVTableAtEndOfTranslationUnit(*this, RD))
----------------
majnemer wrote:
> It would be nicer to use `const CXXRecordDecl *RD : DeferredVTables` because the type in the collection isn't trivially obvious. Also, the braces for the `for-loop` are now superfluous.
const CXXRecordDecl *const RD.
http://reviews.llvm.org/D11446
More information about the cfe-commits
mailing list