owenpan added a comment.

> 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.

Any token that starts with `>`, e.g., `>`, `>>`, `>=`, and `>>=`, are already 
taken care of by this patch. For tokens starting with `=`, only the assignment 
operator `=` has a problem and it only occurs when 
`SpaceBeforeAssignmentOperators` is set to true.

I can insert a space between a template closer `>` and an assignment operator 
`=` despite the value of `SpaceBeforeAssignmentOperators`, but the formatted 
code may be inconsistent...


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