This is an archive of the discontinued LLVM Phabricator instance.

Fixed a bug in AnnotatedLine::startsWith when there are comments in the line.
ClosedPublic

Authored by ioeric on Apr 14 2016, 4:23 AM.

Diff Detail

Repository
rL LLVM

Event Timeline

ioeric updated this revision to Diff 53689.Apr 14 2016, 4:23 AM
ioeric retitled this revision from to Fixed a bug in AnnotatedLine::startsWith when there are comments in the line..
ioeric updated this object.
ioeric added reviewers: djasper, mprobst.
ioeric added a subscriber: cfe-commits.
djasper edited edge metadata.Apr 14 2016, 4:30 AM

Can you add a test?

lib/Format/TokenAnnotator.h
143 ↗(On Diff #53689)

It's a bit subtle that this works even if Tok is nullptr at this point. Maybe change to

return Tok && startsWithInternal( ...

to make this more clear.

ioeric updated this revision to Diff 53691.Apr 14 2016, 4:52 AM
ioeric edited edge metadata.
  • Addressed reviewer comment.
djasper accepted this revision.Apr 19 2016, 11:42 AM
djasper edited edge metadata.

Looks good.

lib/Format/TokenAnnotator.h
128 ↗(On Diff #53691)

s/outter/outer/

This revision is now accepted and ready to land.Apr 19 2016, 11:42 AM
ioeric updated this revision to Diff 54240.Apr 19 2016, 12:21 PM
ioeric marked an inline comment as done.
ioeric edited edge metadata.
  • nit fixed
This revision was automatically updated to reflect the committed changes.