[PATCH] D18294: clang-format: [JS] no space in union and intersection types.
Daniel Jasper via cfe-commits
cfe-commits at lists.llvm.org
Mon Mar 21 06:39:32 PDT 2016
djasper added inline comments.
================
Comment at: lib/Format/TokenAnnotator.cpp:526
@@ +525,3 @@
+ case tok::amp:
+ if (Style.Language == FormatStyle::LK_JavaScript &&
+ !Contexts.back().IsExpression) {
----------------
Don't use braces and possibly pull the comment out of the if itself.
================
Comment at: lib/Format/TokenAnnotator.cpp:2154
@@ -2141,1 +2153,3 @@
return Style.SpacesInAngles;
+ if (Style.Language == FormatStyle::LK_JavaScript &&
+ (Left.is(TT_JsTypeOperator) || Right.is(TT_JsTypeOperator)))
----------------
Can we put this into the JavaScript specific section above?
http://reviews.llvm.org/D18294
More information about the cfe-commits
mailing list