Simplify loop. No functionality change.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116861 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Lex/Preprocessor.cpp b/lib/Lex/Preprocessor.cpp
index 9a69500..a0782aa 100644
--- a/lib/Lex/Preprocessor.cpp
+++ b/lib/Lex/Preprocessor.cpp
@@ -106,11 +106,8 @@
}
// Free any macro definitions.
- for (MacroInfoChain *I = MIChainHead ; I ; ) {
- MacroInfoChain *Next = I->Next;
+ for (MacroInfoChain *I = MIChainHead ; I ; I = I->Next)
I->MI.Destroy();
- I = Next;
- }
// Free any cached macro expanders.
for (unsigned i = 0, e = NumCachedTokenLexers; i != e; ++i)