On Oct 25, 2012, at 10:52 PM, Bas van den Berg <[email protected]> 
wrote:

> Currently the initial value of Tok is dependent an the stack contents
> and could cause the Parser to crash on the first ConsumeToken().

LGTM, committed in r166891, thanks!

-Chris

> 
> 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

_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits

Reply via email to