[PATCH] D66332: [clang-format] Fix the bug that joins template closer and > or >>

2020-03-22 Thread Owen Pan via Phabricator via cfe-commits
owenpan added a comment. The culprit is `AnnotatingParser::parseAngle()` in clang/lib/Format/TokenAnnotator.cpp. This commit merely uncovered it. :) Upon reading a `<` token, `parseAngle()` tries to scan the rest of the line to find a matching `>`. If found, it's given the type `TT_TemplateClos

[PATCH] D66332: [clang-format] Fix the bug that joins template closer and > or >>

2020-03-18 Thread Hans Wennborg via Phabricator via cfe-commits
hans added a comment. This seems to have caused https://bugs.llvm.org/show_bug.cgi?id=45218 Please take a look. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D66332/new/ https://reviews.llvm.org/D66332

[PATCH] D66332: [clang-format] Fix the bug that joins template closer and > or >>

2019-08-16 Thread Owen Pan via Phabricator via cfe-commits
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=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, le

[PATCH] D66332: [clang-format] Fix the bug that joins template closer and > or >>

2019-08-16 Thread Arthur O'Dwyer via Phabricator via cfe-commits
Quuxplusone added a comment. In 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 producti

[PATCH] D66332: [clang-format] Fix the bug that joins template closer and > or >>

2019-08-16 Thread Owen Pan via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGac67414618df: [clang-format] Fix the bug that joins template closer and > or >> (authored by owenpan). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D66332/ne

[PATCH] D66332: [clang-format] Fix the bug that joins template closer and > or >>

2019-08-16 Thread Owen Pan via Phabricator via cfe-commits
owenpan added a comment. In D66332#1633448 , @Quuxplusone wrote: > Drive-by observation: My experiments with > https://zed0.co.uk/clang-format-configurator/ show that there is a similar > bug where clang-format accidentally produces `>=` via reformatting

[PATCH] D66332: [clang-format] Fix the bug that joins template closer and > or >>

2019-08-16 Thread Arthur O'Dwyer via Phabricator via cfe-commits
Quuxplusone added a comment. Drive-by observation: My experiments with https://zed0.co.uk/clang-format-configurator/ show that there is a similar bug where clang-format accidentally produces `>=` via reformatting of `template` `=0>`, `pi` `=3;`, and so on. Is it possible to fix that bug as par

[PATCH] D66332: [clang-format] Fix the bug that joins template closer and > or >>

2019-08-16 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay accepted this revision. MyDeveloperDay added a comment. This revision is now accepted and ready to land. LGTM Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D66332/new/ https://reviews.llvm.org/D66332 __

[PATCH] D66332: [clang-format] Fix the bug that joins template closer and > or >>

2019-08-15 Thread Owen Pan via Phabricator via cfe-commits
owenpan created this revision. owenpan added reviewers: sammccall, MyDeveloperDay, klimek, djasper. Herald added a project: clang. Herald added a subscriber: cfe-commits. Also fixes a buggy test case. See PR42404 Repository: rC Clang https://reviews.llvm.org/D66332 Files: clang/lib/Format