This is an archive of the discontinued LLVM Phabricator instance.

Clang-format: Fix for #pragma option formatting
ClosedPublic

Authored by razmser on Mar 6 2015, 1:08 PM.

Details

Reviewers
djasper
Summary

Fix for code breaking formatting of #pragma option
pragma option documentation

Diff Detail

Event Timeline

razmser updated this revision to Diff 21387.Mar 6 2015, 1:08 PM
razmser retitled this revision from to Clang-format: Fix for #pragma option formatting.
razmser updated this object.
razmser edited the test plan for this revision. (Show Details)
razmser added a reviewer: djasper.
razmser added a subscriber: Unknown Object (MLST).
djasper edited edge metadata.Apr 16 2015, 1:42 AM

Just a few nitpicks. Sorry for the delay.

lib/Format/TokenAnnotator.cpp
592

Generally, we should use the new Keywords object here and above. But I can fix that as a follow-up.

593

Just use CurrentToken->Previous?

597

We don't use braces around single-statement ifs in LLVM/Clang.

razmser updated this revision to Diff 24197.Apr 21 2015, 10:36 PM
razmser edited edge metadata.

Fixed nitpicks.
If I understand right, in order to use Keywords object I must create new annotations for #pragma mark and #pragma option. I can do it, but I think that should be done in separate commit.

Modified and submitted as r235492. Thank you.

djasper accepted this revision.Apr 22 2015, 2:49 AM
djasper edited edge metadata.
This revision is now accepted and ready to land.Apr 22 2015, 2:49 AM
djasper closed this revision.Apr 22 2015, 2:49 AM