[PATCH] D66384: [clang-format] Fix a bug that joins template closer and =

Arthur O'Dwyer via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Sun Aug 18 07:21:08 PDT 2019


Quuxplusone added a comment.

LGTM too, although I would still question whether `Style.SpaceBeforeAssignmentOperators` is providing anyone any benefit at all.



================
Comment at: clang/unittests/Format/FormatTest.cpp:6631
+  verifyFormat("a<int> = 1;", Style);
+  verifyFormat("a<int> >>= 1;", Style);
 
----------------
Actually, could you add a test case specifically for the troublesome `enable_if_t` pattern? Just in case any future option treats default-template-arguments any differently from assignment-statements, whitespace-wise.

    verifyformat("template<enable_if_t<Foo, int> = 0>");



Repository:
  rC Clang

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D66384/new/

https://reviews.llvm.org/D66384





More information about the cfe-commits mailing list