]> granicus.if.org Git - clang/commitdiff
Simplify loop. No functionality change.
authorTed Kremenek <kremenek@apple.com>
Tue, 19 Oct 2010 21:30:11 +0000 (21:30 +0000)
committerTed Kremenek <kremenek@apple.com>
Tue, 19 Oct 2010 21:30:11 +0000 (21:30 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116861 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Lex/Preprocessor.cpp

index 9a695004c9298e85e9eb606c997ecf120a0387e3..a0782aa86818f8f289950fee30a68a1080b2b882 100644 (file)
@@ -106,11 +106,8 @@ Preprocessor::~Preprocessor() {
   }
 
   // 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)