diff options
author | Ted Kremenek <kremenek@apple.com> | 2008-04-17 22:31:54 +0000 |
---|---|---|
committer | Ted Kremenek <kremenek@apple.com> | 2008-04-17 22:31:54 +0000 |
commit | 339b9c27759d7b6a53e2370f83f66e78b3254595 (patch) | |
tree | 15e66daac43c681523a05a5df269e2a6d9f19c8d /lib/Lex/Preprocessor.cpp | |
parent | 1ee8d6ffabdec9288dbc87773913fde5e2938772 (diff) |
class Preprocessor: Now owns the "predefines" char*; it deletes [] it in its dstor.
clang.cpp: InitializePreprocessor now makes a copy of the contents of PredefinesBuffer and
passes it to the preprocessor object.
clang.cpp: DriverPreprocessorFactory now calls "InitializePreprocessor" instead of this being done in main().
html::HighlightMacros() now takes a PreprocessorFactory, allowing it to conjure up a new
Preprocessor to highlight macros.
class HTMLDiagnostics now takes a PreprocessorFactory* that it can use for html::HighlightMacros().
Updated clients of HTMLDiagnostics to use this new interface.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49875 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Lex/Preprocessor.cpp')
-rw-r--r-- | lib/Lex/Preprocessor.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/Lex/Preprocessor.cpp b/lib/Lex/Preprocessor.cpp index 6d08a36fde..370244b8f6 100644 --- a/lib/Lex/Preprocessor.cpp +++ b/lib/Lex/Preprocessor.cpp @@ -112,6 +112,8 @@ Preprocessor::~Preprocessor() { delete ScratchBuf; delete Callbacks; + + delete [] Predefines; } /// Diag - Forwarding function for diagnostics. This emits a diagnostic at |