[PATCH] D36139: clang-format: [JS] prefer wrapping chains over empty literals.
Daniel Jasper via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Tue Aug 1 09:04:46 PDT 2017
djasper added inline comments.
================
Comment at: lib/Format/TokenAnnotator.cpp:2009
+ // Prefer breaking call chains (".foo") over empty "{}", "[]" or "()".
+ if ((Left.is(tok::l_brace) && Right.is(tok::r_brace)) ||
+ (Left.is(tok::l_square) && Right.is(tok::r_square)) ||
----------------
Or just Left.opensScope() && Right.closesScope()?
Technically, that's probably not the same thing, but otherwise you have unmatched brackets and that's bad no matter what, no?
https://reviews.llvm.org/D36139
More information about the cfe-commits
mailing list