diff options
author | Argyrios Kyrtzidis <akyrtzi@gmail.com> | 2008-08-23 12:12:06 +0000 |
---|---|---|
committer | Argyrios Kyrtzidis <akyrtzi@gmail.com> | 2008-08-23 12:12:06 +0000 |
commit | 5d240d07f240a04c480341eba2d4ac8a177682be (patch) | |
tree | 1585a9ae410f0c31239bb85a25189a050847bfd3 /clang/lib/Lex/Preprocessor.cpp | |
parent | bd024c7fdbc921af3a16c263f1ac0d8a8149edb0 (diff) | |
download | bcm5719-llvm-5d240d07f240a04c480341eba2d4ac8a177682be.tar.gz bcm5719-llvm-5d240d07f240a04c480341eba2d4ac8a177682be.zip |
Add a safety check.
Make sure there's no "dangling" backtrack position when Preprocessor is destroyed.
llvm-svn: 55236
Diffstat (limited to 'clang/lib/Lex/Preprocessor.cpp')
-rw-r--r-- | clang/lib/Lex/Preprocessor.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/clang/lib/Lex/Preprocessor.cpp b/clang/lib/Lex/Preprocessor.cpp index a4ff8bb7348..18b106ad841 100644 --- a/clang/lib/Lex/Preprocessor.cpp +++ b/clang/lib/Lex/Preprocessor.cpp @@ -84,6 +84,8 @@ Preprocessor::Preprocessor(Diagnostic &diags, const LangOptions &opts, } Preprocessor::~Preprocessor() { + assert(BacktrackPositions.empty() && "EnableBacktrack/Backtrack imbalance!"); + // Free any active lexers. delete CurLexer; |