summaryrefslogtreecommitdiffstats
path: root/clang/lib/Lex/Preprocessor.cpp
diff options
context:
space:
mode:
authorTed Kremenek <kremenek@apple.com>2008-04-17 22:31:54 +0000
committerTed Kremenek <kremenek@apple.com>2008-04-17 22:31:54 +0000
commitf42f3fb47d48429fb83198fbed07b8df9241e105 (patch)
treec96abd649a19c84ae16a9cf2863ca79d27c87049 /clang/lib/Lex/Preprocessor.cpp
parent7c7e9b3bbe74065f3a6e2c2e238c0b83442b5744 (diff)
downloadbcm5719-llvm-f42f3fb47d48429fb83198fbed07b8df9241e105.tar.gz
bcm5719-llvm-f42f3fb47d48429fb83198fbed07b8df9241e105.zip
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. llvm-svn: 49875
Diffstat (limited to 'clang/lib/Lex/Preprocessor.cpp')
-rw-r--r--clang/lib/Lex/Preprocessor.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/clang/lib/Lex/Preprocessor.cpp b/clang/lib/Lex/Preprocessor.cpp
index 6d08a36fdef..370244b8f6b 100644
--- a/clang/lib/Lex/Preprocessor.cpp
+++ b/clang/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
OpenPOWER on IntegriCloud