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 | d5705d1b1cc231e2dd121af8b1828980c4ab2d61 (patch) | |
tree | 7efda52294d1c7623f0938ba0e4908cf273ec7f2 /clang/lib/Parse/Parser.cpp | |
parent | 57143f7e7880d2359decf51486713ae9f5bd4283 (diff) | |
download | bcm5719-llvm-d5705d1b1cc231e2dd121af8b1828980c4ab2d61.tar.gz bcm5719-llvm-d5705d1b1cc231e2dd121af8b1828980c4ab2d61.zip |
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!
llvm-svn: 166891
Diffstat (limited to 'clang/lib/Parse/Parser.cpp')
-rw-r--r-- | clang/lib/Parse/Parser.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/clang/lib/Parse/Parser.cpp b/clang/lib/Parse/Parser.cpp index fef903b2fc7..dccdc7ba8e7 100644 --- a/clang/lib/Parse/Parser.cpp +++ b/clang/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; |