[PATCH] D43312: [clang-format] fix handling of consecutive unary operators

Krasimir Georgiev via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Feb 15 05:16:44 PST 2018


krasimir added inline comments.


================
Comment at: lib/Format/TokenAnnotator.cpp:1497
+        !(PrevToken->is(tok::exclaim) &&
+          Style.Language == FormatStyle::LK_JavaScript))
       // There aren't any trailing unary operators except for TypeScript's
----------------
I think that TypeScript has both `if (!cond)` and `x!`. I'd expect that `if (!+i) {\n}` is also handled in the TypeScript case. Could you add a test for this for TypeScript please.


Repository:
  rC Clang

https://reviews.llvm.org/D43312





More information about the cfe-commits mailing list