This is an archive of the discontinued LLVM Phabricator instance.

clang-format: [JS] support cast syntax and type arguments.
ClosedPublic

Authored by mprobst on Mar 13 2015, 2:51 PM.

Details

Reviewers
djasper
Summary

Casts in TS syntax (foo = <type>bar;) should not be followed by whitespace.

Diff Detail

Event Timeline

mprobst updated this revision to Diff 21961.Mar 13 2015, 2:51 PM
mprobst retitled this revision from to clang-format: [JS] support cast syntax and type arguments..
mprobst updated this object.
mprobst edited the test plan for this revision. (Show Details)
mprobst added a reviewer: djasper.
mprobst added subscribers: Unknown Object (MLST), klimek.
djasper edited edge metadata.Mar 15 2015, 6:53 AM

Please upload patch with full context in the future. Phabricator can't/doesn't access the existing repository to get the context.

lib/Format/TokenAnnotator.cpp
1760

So, there is a of spaceRequiredBefore and spaceRequiredBetween. It is entirely historic, not logical, essentially those two are just in sequence. However, I'd prefer to move this to spaceRequiredBefore, which has a JavaScript-specific section at the top.

djasper accepted this revision.Mar 15 2015, 7:02 AM
djasper edited edge metadata.

Made the suggested change and submitted as r232321.

This revision is now accepted and ready to land.Mar 15 2015, 7:02 AM
djasper closed this revision.Mar 15 2015, 7:02 AM