[cfe-commits] r55236 - /cfe/trunk/lib/Lex/Preprocessor.cpp
Argiris Kirtzidis
akyrtzi at gmail.com
Sat Aug 23 05:12:06 PDT 2008
Author: akirtzidis
Date: Sat Aug 23 07:12:06 2008
New Revision: 55236
URL: http://llvm.org/viewvc/llvm-project?rev=55236&view=rev
Log:
Add a safety check.
Make sure there's no "dangling" backtrack position when Preprocessor is destroyed.
Modified:
cfe/trunk/lib/Lex/Preprocessor.cpp
Modified: cfe/trunk/lib/Lex/Preprocessor.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Lex/Preprocessor.cpp?rev=55236&r1=55235&r2=55236&view=diff
==============================================================================
--- cfe/trunk/lib/Lex/Preprocessor.cpp (original)
+++ cfe/trunk/lib/Lex/Preprocessor.cpp Sat Aug 23 07:12:06 2008
@@ -84,6 +84,8 @@
}
Preprocessor::~Preprocessor() {
+ assert(BacktrackPositions.empty() && "EnableBacktrack/Backtrack imbalance!");
+
// Free any active lexers.
delete CurLexer;
More information about the cfe-commits
mailing list