]> granicus.if.org Git - clang/commit
Simplify lifetime management of MacroInfo objects in Preprocessor by having the Prepr...
authorTed Kremenek <kremenek@apple.com>
Tue, 19 Oct 2010 18:16:54 +0000 (18:16 +0000)
committerTed Kremenek <kremenek@apple.com>
Tue, 19 Oct 2010 18:16:54 +0000 (18:16 +0000)
commitaf8fa25c0d4e0540952a50bbd06dc1558954ccd9
tree6d07abeb5be980fc9b4bd795528cbc365cf087fb
parent0d7d39939a96b42bc6aa05b31fc1095cbe246021
Simplify lifetime management of MacroInfo objects in Preprocessor by having the Preprocessor maintain them in a linked
list of allocated MacroInfos.  This requires only 1 extra pointer per MacroInfo object, and allows us to blow them
away in one place.  This fixes an elusive memory leak with MacroInfos (whose exact location I couldn't still figure
out despite substantial digging).

Fixes <rdar://problem/8361834>.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116842 91177308-0d34-0410-b5e6-96231b3b80d8
include/clang/Lex/Preprocessor.h
lib/Lex/PPDirectives.cpp
lib/Lex/Preprocessor.cpp