[PATCH] D66332: [clang-format] Fix the bug that joins template closer and > or >>
Owen Pan via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Fri Aug 16 22:48:37 PDT 2019
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
More information about the cfe-commits
mailing list