[PATCH] D78879: [clang-format] [PR45357] Fix issue found with operator spacing

2020-04-30 Thread MyDeveloperDay via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGb01dca500857: [clang-format] [PR45357] Fix issue found with operator spacing (authored by MyDeveloperDay). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D78879: [clang-format] [PR45357] Fix issue found with operator spacing

2020-04-28 Thread Andi via Phabricator via cfe-commits
Abpostelnicu added a comment. Just to clarify something here, for me the patch looks good but until I will accept the revision I want to test it on the mozilla codebase. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D78879/new/ https://reviews.llvm.org/D78879

[PATCH] D78879: [clang-format] [PR45357] Fix issue found with operator spacing

2020-04-28 Thread Andi via Phabricator via cfe-commits
Abpostelnicu added a comment. In D78879#2004856 , @MyDeveloperDay wrote: > @sylvestre.ledru , @Abpostelnicu > > I believe to fix your original request you need a combination of D76850: > clang-format: Fix pointer alignment for overloaded operators

[PATCH] D78879: [clang-format] [PR45357] Fix issue found with operator spacing

2020-04-27 Thread Hans Wennborg via Phabricator via cfe-commits
hans added a subscriber: tstellar. hans added a comment. In D78879#2004751 , @MyDeveloperDay wrote: > So for the Mozilla case mentioned in the bug report we either need to ask > @hans if D76850: clang-format: Fix pointer alignment for overloaded >

[PATCH] D78879: [clang-format] [PR45357] Fix issue found with operator spacing

2020-04-27 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay updated this revision to Diff 260266. MyDeveloperDay added a comment. Need to skip over the template or we won't see this as needing to break on the return type CHANGES SINCE LAST ACTION https://reviews.llvm.org/D78879/new/ https://reviews.llvm.org/D78879 Files:

[PATCH] D78879: [clang-format] [PR45357] Fix issue found with operator spacing

2020-04-27 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay updated this revision to Diff 260261. MyDeveloperDay added a comment. @sylvestre.ledru , @Abpostelnicu I believe to fix your original request you need a combination of D76850: clang-format: Fix pointer alignment for overloaded operators (PR45107)

[PATCH] D78879: [clang-format] [PR45357] Fix issue found with operator spacing

2020-04-27 Thread Andi via Phabricator via cfe-commits
Abpostelnicu added a comment. I've cherry-picked D76850 to 10.x and see if this fixes the issue. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D78879/new/ https://reviews.llvm.org/D78879 ___ cfe-commits

[PATCH] D78879: [clang-format] [PR45357] Fix issue found with operator spacing

2020-04-27 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay added a subscriber: hans. MyDeveloperDay added a comment. So for the Mozilla case mentioned in the bug report we either need to ask @hans if D76850: clang-format: Fix pointer alignment for overloaded operators (PR45107) can go into the v10

[PATCH] D78879: [clang-format] [PR45357] Fix issue found with operator spacing

2020-04-27 Thread Andi via Phabricator via cfe-commits
Abpostelnicu added a comment. In D78879#2004724 , @MyDeveloperDay wrote: > @sylvestre.ledru > > I'm taking a quick look at formatting the original bug in gecko and whilst > the last windows snapshot (Feb 2020) shows the bug > > $ clang-format

[PATCH] D78879: [clang-format] [PR45357] Fix issue found with operator spacing

2020-04-27 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay added a comment. @sylvestre.ledru I'm taking a quick look at formatting the original bug in gecko and whilst the last windows snapshot (Feb 2020) shows the bug $ clang-format --version clang-format version 11.0.0 nsTArray.h:939:29: warning: code should be

[PATCH] D78879: [clang-format] [PR45357] Fix issue found with operator spacing

2020-04-27 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay marked an inline comment as done. MyDeveloperDay added inline comments. Comment at: clang/lib/Format/TokenAnnotator.cpp:2820 + if (Right.is(tok::star) && Left.is(TT_TemplateCloser)) +return false; if (Right.isOneOf(tok::star, tok::amp, tok::ampamp)) {

[PATCH] D78879: [clang-format] [PR45357] Fix issue found with operator spacing

2020-04-27 Thread Andi via Phabricator via cfe-commits
Abpostelnicu added a comment. I think we are on the right track with this but what if we are dealing with `tok::amp` in a context similar to `operator const FallibleTArray&();` I can speculate that the outcome will be `operator const FallibleTArray &();` which is wrong. CHANGES SINCE LAST

[PATCH] D78879: [clang-format] [PR45357] Fix issue found with operator spacing

2020-04-26 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay updated this revision to Diff 260171. MyDeveloperDay added a comment. More test cases CHANGES SINCE LAST ACTION https://reviews.llvm.org/D78879/new/ https://reviews.llvm.org/D78879 Files: clang/lib/Format/TokenAnnotator.cpp clang/unittests/Format/FormatTest.cpp Index:

[PATCH] D78879: [clang-format] [PR45357] Fix issue found with operator spacing

2020-04-26 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay created this revision. MyDeveloperDay added reviewers: sylvestre.ledru, mitchell-stellar, sammccall. MyDeveloperDay added projects: clang, clang-format. Herald added a subscriber: cfe-commits. MyDeveloperDay updated this revision to Diff 260171. MyDeveloperDay added a comment.