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

Owen Pan via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Sun Aug 18 11:49:49 PDT 2019


owenpan marked an inline comment as done.
owenpan added inline comments.


================
Comment at: clang/unittests/Format/FormatTest.cpp:6631
+  verifyFormat("a<int> = 1;", Style);
+  verifyFormat("a<int> >>= 1;", Style);
 
----------------
Quuxplusone wrote:
> 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>");
> 
I think it duplicates `a<int> = 1;` on Line 6630 because they both test the insertion of a space between a template closer `>` and an assignment operator `=` that follows.


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