majnemer added inline comments. ================ 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)) ---------------- 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.
================ Comment at: lib/CodeGen/ItaniumCXXABI.cpp:1026 @@ -1025,4 +1025,3 @@ // Now walk all possible inheritance paths. - for (CXXBasePaths::paths_iterator I = Paths.begin(), E = Paths.end(); I != E; - ++I) { - if (I->Access != AS_public) // Ignore non-public inheritance. + for (auto &Path : Paths) { + if (Path.Access != AS_public) // Ignore non-public inheritance. ---------------- I'd change the `auto` to `CXXBasePath` because the type isn't clear. ================ Comment at: lib/CodeGen/ItaniumCXXABI.cpp:1032 @@ -1032,3 +1031,3 @@ - for (CXXBasePath::iterator J = I->begin(), JE = I->end(); J != JE; ++J) { + for (auto &PathElement : Path) { // If the path contains a virtual base class we can't give any hint. ---------------- Likewise, I'd change this `auto` to `CXXBasePathElement`. http://reviews.llvm.org/D11446 _______________________________________________ cfe-commits mailing list cfe-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits