aboutsummaryrefslogtreecommitdiff
path: root/lib/Lex/Preprocessor.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Lex/Preprocessor.cpp')
-rw-r--r--lib/Lex/Preprocessor.cpp5
1 files changed, 1 insertions, 4 deletions
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)