[PATCH] D153798: [clang-format] Correctly annotate operator free function call

2023-06-27 Thread Yilong Guo via Phabricator via cfe-commits
Nuu accepted this revision. Nuu added a comment. This revision is now accepted and ready to land. Thanks, LGTM! Comment at: clang/lib/Format/TokenAnnotator.cpp:316 + // line can't be a declaration. bool OperatorCalledAsMemberFunction = +

[PATCH] D114394: Compile-time computation of string attribute hashes

2021-11-24 Thread Yilong Guo via Phabricator via cfe-commits
Nuu added inline comments. Comment at: llvm/include/llvm/IR/Attributes.h:54 +size_(HashedS.size()) { +assert(hash_ == hasher(s.data(), s.size()) && "consistent hashing"); + } CHANGES SINCE LAST ACTION https://reviews.llvm.org/D114394/new/

[PATCH] D114082: [WIP] Normalize String Attributes

2021-11-22 Thread Yilong Guo via Phabricator via cfe-commits
Nuu added a comment. Thanks for this. I planned something similar to turn string literal typo errors into compile errors as well. The typos are really hard to identify :-P Some suggestions on using tablegen. Comment at: llvm/include/llvm/IR/Attributes.h:977-1133

[PATCH] D103678: [Format] Fix incorrect pointer/reference detection

2021-06-17 Thread Yilong Guo via Phabricator via cfe-commits
Nuu added a comment. In D103678#2811302 , @HazardyKnusperkeks wrote: > Do you need some one to commit this? If yes please state name and email, some > one will chime in to commit it. Yes, please someone help commit this. Name: Yilong Guo Email:

[PATCH] D103678: [Format] Fix incorrect pointer/reference detection

2021-06-08 Thread Yilong Guo via Phabricator via cfe-commits
Nuu added inline comments. Comment at: clang/lib/Format/TokenAnnotator.cpp:236 +Prev = Prev->Previous; +assert(Prev); + } MyDeveloperDay wrote: > curdeius wrote: > > MyDeveloperDay wrote: > > > Do we need to worry about `Prev` ever being

[PATCH] D103678: [Format] Fix incorrect pointer/reference detection

2021-06-08 Thread Yilong Guo via Phabricator via cfe-commits
Nuu updated this revision to Diff 350756. Nuu added a comment. Minor updates. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D103678/new/ https://reviews.llvm.org/D103678 Files: clang/lib/Format/TokenAnnotator.cpp clang/unittests/Format/FormatTest.cpp Index:

[PATCH] D103678: [Format] Fix incorrect pointer/reference detection

2021-06-08 Thread Yilong Guo via Phabricator via cfe-commits
Nuu added a comment. Pre-check failure: the github server is currently down. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D103678/new/ https://reviews.llvm.org/D103678 ___ cfe-commits mailing list

[PATCH] D103678: [Format] Fix incorrect pointer/reference detection

2021-06-08 Thread Yilong Guo via Phabricator via cfe-commits
Nuu marked an inline comment as done. Nuu added inline comments. Comment at: clang/lib/Format/TokenAnnotator.cpp:243 + bool OperatorCalledAsMemberFunction = + Prev->Previous && Prev->Previous->isOneOf(tok::period, tok::arrow); +

[PATCH] D103678: [Format] Fix incorrect pointer/reference detection

2021-06-08 Thread Yilong Guo via Phabricator via cfe-commits
Nuu updated this revision to Diff 350519. Nuu added a comment. Add more tests. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D103678/new/ https://reviews.llvm.org/D103678 Files: clang/lib/Format/TokenAnnotator.cpp

[PATCH] D103678: [Format] Fix incorrect pointer/reference detection

2021-06-04 Thread Yilong Guo via Phabricator via cfe-commits
Nuu created this revision. Nuu added reviewers: djasper, HazardyKnusperkeks, curdeius, MyDeveloperDay. Nuu added a project: clang-format. Nuu requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. https://llvm.org/PR50568 When an

[PATCH] D103589: [Format] Fix incorrect pointer detection

2021-06-03 Thread Yilong Guo via Phabricator via cfe-commits
Nuu added a comment. In D103589#2796032 , @curdeius wrote: > LGTM. Thanks for fixing this! > Do you have commit rights or you need somebody to land it for you? I don't have commit access. I'd appreciate it if you or someone else could land this

[PATCH] D103589: [Format] Fix incorrect pointer detection

2021-06-02 Thread Yilong Guo via Phabricator via cfe-commits
Nuu added a comment. In D103589#2795447 , @curdeius wrote: > Thanks for looking into this, but please add a test case that demonstrates > the bug to `FormatTests.cpp` > Also, is there, by any chance, an associated bugzilla ticket? Thanks for the

[PATCH] D103589: [Format] Fix incorrect pointer detection

2021-06-02 Thread Yilong Guo via Phabricator via cfe-commits
Nuu updated this revision to Diff 349455. Nuu edited the summary of this revision. Nuu added a comment. Add test. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D103589/new/ https://reviews.llvm.org/D103589 Files:

[PATCH] D103589: [Format] Fix incorrect pointer detection

2021-06-02 Thread Yilong Guo via Phabricator via cfe-commits
Nuu created this revision. Nuu added a project: clang-format. Nuu requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Before: void foo() { bar(float(1), a *b); } After: void foo() { bar(float(1), a * b); } Signed-off-by: