diff options
Diffstat (limited to 'include/clang/Lex/Preprocessor.h')
-rw-r--r-- | include/clang/Lex/Preprocessor.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/include/clang/Lex/Preprocessor.h b/include/clang/Lex/Preprocessor.h index 2184acf0e3..5b9959c32a 100644 --- a/include/clang/Lex/Preprocessor.h +++ b/include/clang/Lex/Preprocessor.h @@ -241,7 +241,8 @@ public: /// it. PPCallbacks *getPPCallbacks() const { return Callbacks; } void setPPCallbacks(PPCallbacks *C) { - delete Callbacks; + if (Callbacks) + C = new PPChainedCallbacks(C, Callbacks); Callbacks = C; } |