This is an archive of the discontinued LLVM Phabricator instance.

[Parser] Fix look ahead after EOF while parsing objc message and lambdas
ClosedPublic

Authored by bruno on May 19 2016, 3:39 PM.

Details

Summary

If a closing ')' isn't found for a macro instantiation inside a '[',
the next token is EOF, this leads to crashes if we try to look ahead of
that. This could be triggered whenever trying to parse lambdas or objs
message expressions.

Diff Detail

Event Timeline

bruno updated this revision to Diff 57868.May 19 2016, 3:39 PM
bruno retitled this revision from to [Parser] Fix look ahead after EOF while parsing objc message and lambdas.
bruno updated this object.
bruno added reviewers: doug.gregor, rsmith.
bruno added a subscriber: cfe-commits.
doug.gregor accepted this revision.May 27 2016, 8:46 PM
doug.gregor edited edge metadata.

LGTM, sorry for the delay!

This revision is now accepted and ready to land.May 27 2016, 8:46 PM
bruno closed this revision.May 31 2016, 11:54 AM

Thanks Doug!

Committed r271314