aboutsummaryrefslogtreecommitdiff
path: root/lib/Lex/Preprocessor.cpp
diff options
context:
space:
mode:
authorArgyrios Kyrtzidis <akyrtzi@gmail.com>2008-08-23 12:12:06 +0000
committerArgyrios Kyrtzidis <akyrtzi@gmail.com>2008-08-23 12:12:06 +0000
commit2174a4ff834b72c0a0e3f24e4b62123f30f4cce6 (patch)
tree2484898d996c3a65eb5b882a4e3a60a70cc43cd8 /lib/Lex/Preprocessor.cpp
parentbff73f7f2d0c9d566c08d1a50eed1fc04d97fa2f (diff)
Add a safety check.
Make sure there's no "dangling" backtrack position when Preprocessor is destroyed. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55236 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Lex/Preprocessor.cpp')
-rw-r--r--lib/Lex/Preprocessor.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/Lex/Preprocessor.cpp b/lib/Lex/Preprocessor.cpp
index a4ff8bb734..18b106ad84 100644
--- a/lib/Lex/Preprocessor.cpp
+++ b/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;