This is an archive of the discontinued LLVM Phabricator instance.

Ignore Lexing errors in macro body definitions
ClosedPublic

Authored by niravd on May 23 2016, 12:30 PM.

Details

Summary

Do not issue lexing errors found during the parsing of macro body
definitions and parseIdentifier function in AsmParser. This changes the
Parser to not issue a lexing error when we reach an error, but rather
when it is consumed allowing us time to examine and recover from an
error.

As a result, of this, we stop issuing a both lexing error and a parsing
error in floating-literals test. Minor tweak to parseDirectiveRealValue
to favor more meaningful lexing error over less helpful parse error.

Diff Detail

Event Timeline

niravd updated this revision to Diff 58132.May 23 2016, 12:30 PM
niravd retitled this revision from to Ignore Lexing errors in macro body definitions.
niravd added reviewers: rnk, majnemer.
niravd updated this object.
niravd added a subscriber: llvm-commits.
niravd updated this revision to Diff 58133.May 23 2016, 12:38 PM

Add missing test case for macro parsing

rnk accepted this revision.May 31 2016, 11:54 AM
rnk edited edge metadata.

lgtm I spent a fair amount of time thinking about how to do this better, but let's go with the solution we have now.

This revision is now accepted and ready to land.May 31 2016, 11:54 AM
niravd updated this revision to Diff 59370.Jun 2 2016, 6:27 AM
niravd edited edge metadata.

Merge in follow up fix minor error cleanup to make work with tip

niravd updated this object.Jun 2 2016, 6:27 AM
niravd added a comment.Jun 2 2016, 6:33 AM

Merged in subsequent error cleanup patch as accepted patch breaks in tip. Can I get another LGTM?

In D20535#444732, @rnk wrote:

lgtm I spent a fair amount of time thinking about how to do this better, but let's go with the solution we have now.

rnk added a comment.Jun 2 2016, 8:51 AM

Still looks good. In general, you don't need explicit approval for things like fixing the build, merging patches, fixing broken tests, etc.

This revision was automatically updated to reflect the committed changes.