This is an archive of the discontinued LLVM Phabricator instance.

clang-format: [JS] no space in union and intersection types.
ClosedPublic

Authored by mprobst on Mar 19 2016, 6:09 AM.

Details

Reviewers
djasper
Summary
and & in types, as opposed to the bitwise operators, should not have

whitespace around them (e.g. Foo<Bar|Baz>).

Diff Detail

Event Timeline

mprobst updated this revision to Diff 51112.Mar 19 2016, 6:09 AM
mprobst retitled this revision from to clang-format: [JS] no space in union and intersection types..
mprobst updated this object.
mprobst added a reviewer: djasper.
mprobst added a subscriber: cfe-commits.
djasper added inline comments.Mar 21 2016, 6:39 AM
lib/Format/TokenAnnotator.cpp
526

Don't use braces and possibly pull the comment out of the if itself.

2155

Can we put this into the JavaScript specific section above?

mprobst updated this revision to Diff 51159.Mar 21 2016, 7:00 AM
mprobst marked 2 inline comments as done.
  • Address review comments.
djasper edited edge metadata.Mar 21 2016, 8:23 AM

Looks good.

djasper accepted this revision.Mar 21 2016, 8:23 AM
djasper edited edge metadata.
This revision is now accepted and ready to land.Mar 21 2016, 8:23 AM
mprobst added inline comments.Mar 21 2016, 8:28 AM
lib/Format/TokenAnnotator.cpp
2155

Done, wasn't sure if this should go next to binary operators, or next to JS stuff...

djasper closed this revision.Mar 21 2016, 11:03 AM

Submitted as r263961.