diff options
author | Chris Lattner <sabre@nondot.org> | 2012-10-27 19:49:20 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2012-10-27 19:49:20 +0000 |
commit | 2b970e9d70768802984f2cf1885e73643c17e0c2 (patch) | |
tree | 0773d001967984bd166c4a6c689183eec1e3304a /lib/Parse/Parser.cpp | |
parent | a92afb611c015196541edd53347aa23dba1949ac (diff) |
Currently the initial value of Tok is dependent an the stack contents
and could cause the Parser to crash on the first ConsumeToken().
Patcy by Bas van den Berg!
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166891 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Parse/Parser.cpp')
-rw-r--r-- | 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 fef903b2fc..dccdc7ba8e 100644 --- a/lib/Parse/Parser.cpp +++ b/lib/Parse/Parser.cpp @@ -53,6 +53,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; |