]> granicus.if.org Git - clang/commitdiff
Serialization: use range based for loop (NFC)
authorSaleem Abdulrasool <compnerd@compnerd.org>
Mon, 30 Jan 2017 22:25:28 +0000 (22:25 +0000)
committerSaleem Abdulrasool <compnerd@compnerd.org>
Mon, 30 Jan 2017 22:25:28 +0000 (22:25 +0000)
Just a small clean up noticed when doing post-commit review of Duncan's
previous change for ModuleFile memory ownership semantics.  NFC.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@293556 91177308-0d34-0410-b5e6-96231b3b80d8

include/clang/Serialization/ASTReader.h

index d638ecb2e50d97d792ba1ff36256984e12a71a57..acdcaaf60054b8bd0aa7538388b956814b6c1528 100644 (file)
@@ -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;
   }