Quuxplusone added a comment.

In D66332#1633749 <https://reviews.llvm.org/D66332#1633749>, @owenpan wrote:

> Do you have `SpaceBeforeAssignmentOperators` off?


Yes; I mean, that's what I tested in order to produce the buggy behavior. I 
don't believe anyone should be using that option in production, though, and 
would totally support a patch to remove it completely because it can't possibly 
be doing anyone any good.  It feels like someone meant to implement 
`SpacesAroundAssignmentOperators` but then got the name wrong, and then someone 
fixed the behavior to match the name, and at this point it's just completely 
broken. :)

> The documentation 
> <https://clang.llvm.org/docs/ClangFormatStyleOptions.html#configurable-format-style-options>
>  should be fixed.

Also agreed.

Are there any other clang-format options that might lead to a lack-of-space 
before `>`, `>=`, `==`, or `=`? I brought up `enable_if_t<Foo, int>=0` because 
that specifically is a construction I've run into in my own code, even though 
I've never tried to clang-format it, let alone have it formatted incorrectly.

(Clang-format probably does not promise to preserve the AST of pathological 
input like `i++ ++;` or C++03-specific input such as `A<B<int> >` or `A< ::B>`.)


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D66332



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to