From 2a6b03af69cb25b15fc9488ff593e427d3214217 Mon Sep 17 00:00:00 2001 From: Ted Kremenek Date: Tue, 19 Oct 2010 21:30:11 +0000 Subject: Simplify loop. No functionality change. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116861 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Lex/Preprocessor.cpp | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'lib/Lex/Preprocessor.cpp') diff --git a/lib/Lex/Preprocessor.cpp b/lib/Lex/Preprocessor.cpp index 9a695004c9..a0782aa868 100644 --- a/lib/Lex/Preprocessor.cpp +++ b/lib/Lex/Preprocessor.cpp @@ -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) -- cgit v1.2.3