Currently the initial value of Tok is dependent an the stack contents and could cause the Parser to crash on the first ConsumeToken().
Signed-off-by: Bas van den Berg <[email protected]> --- lib/Parse/Parser.cpp | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/lib/Parse/Parser.cpp b/lib/Parse/Parser.cpp index 99c3636..5f57a83 100644 --- a/lib/Parse/Parser.cpp +++ b/lib/Parse/Parser.cpp @@ -52,6 +52,7 @@ Parser::Parser(Preprocessor &pp, Sema &actions, bool SkipFunctionBodies) GreaterThanIsOperator(true), ColonIsSacred(false), InMessageExpression(false), TemplateParameterDepth(0), ParsingInObjCContainer(false), SkipFunctionBodies(SkipFunctionBodies) { + Tok.startToken(); Tok.setKind(tok::eof); Actions.CurScope = 0; NumCachedScopes = 0; -- 1.7.0.4 _______________________________________________ cfe-commits mailing list [email protected] http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
