Author: compnerd Date: Mon Jan 30 16:25:28 2017 New Revision: 293556 URL: http://llvm.org/viewvc/llvm-project?rev=293556&view=rev Log: Serialization: use range based for loop (NFC)
Just a small clean up noticed when doing post-commit review of Duncan's previous change for ModuleFile memory ownership semantics. NFC. Modified: cfe/trunk/include/clang/Serialization/ASTReader.h Modified: cfe/trunk/include/clang/Serialization/ASTReader.h URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Serialization/ASTReader.h?rev=293556&r1=293555&r2=293556&view=diff ============================================================================== --- cfe/trunk/include/clang/Serialization/ASTReader.h (original) +++ cfe/trunk/include/clang/Serialization/ASTReader.h Mon Jan 30 16:25:28 2017 @@ -1635,11 +1635,8 @@ public: /// reader. unsigned getTotalNumPreprocessedEntities() const { unsigned Result = 0; - for (ModuleConstIterator I = ModuleMgr.begin(), - E = ModuleMgr.end(); I != E; ++I) { - Result += I->NumPreprocessedEntities; - } - + for (const auto &M : ModuleMgr) + Result += M.NumPreprocessedEntities; return Result; } _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits