[PATCH] D138300: [clangd] Support type hints for `decltype(expr)`

2022-12-19 Thread Vincent Hong via Phabricator via cfe-commits
v1nh1shungry added a comment. @nridge Thank you for reviewing! If this patch is ready to land, could you please help me commit it? Thanks again! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D138300/new/ https://reviews.llvm.org/D138300 _

[PATCH] D139705: [clang] fix zero-initialization fix-it for variable template

2022-12-19 Thread Vincent Hong via Phabricator via cfe-commits
v1nh1shungry added a comment. Ping? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D139705/new/ https://reviews.llvm.org/D139705 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.o

[PATCH] D137817: [clangd] Improve action `RemoveUsingNamespace` for user-defined literals

2022-12-19 Thread Vincent Hong via Phabricator via cfe-commits
v1nh1shungry updated this revision to Diff 484170. v1nh1shungry added a comment. Insert the using-declarations in the outermost `CompoundStmt` instead of the innermost one. Can reduce some potential rebundancy. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.ll

[PATCH] D137817: [clangd] Improve action `RemoveUsingNamespace` for user-defined literals

2022-12-21 Thread Vincent Hong via Phabricator via cfe-commits
v1nh1shungry abandoned this revision. v1nh1shungry added a comment. Abandon because of the terrible implementation. - The cost seems to be higher than the value. - The place to insert isn't good enough. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org

[PATCH] D140814: [clangd] show underlying type in type hint for `decltype(expr)`

2022-12-31 Thread Vincent Hong via Phabricator via cfe-commits
v1nh1shungry created this revision. v1nh1shungry added a reviewer: nridge. Herald added subscribers: kadircet, arphaman. Herald added a project: All. v1nh1shungry requested review of this revision. Herald added subscribers: cfe-commits, MaskRay, ilya-biryukov. Herald added a project: clang-tools-ex

[PATCH] D140838: [clang] fix crash on generic lambda with lambda in decltype

2023-01-01 Thread Vincent Hong via Phabricator via cfe-commits
v1nh1shungry created this revision. v1nh1shungry added reviewers: aaron.ballman, shafik. Herald added a project: All. v1nh1shungry requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Relevant issue: https://github.com/llvm/llvm-project/issues/5

[PATCH] D140814: [clangd] show underlying type in type hint for `decltype(expr)`

2023-01-02 Thread Vincent Hong via Phabricator via cfe-commits
v1nh1shungry updated this revision to Diff 485854. v1nh1shungry added a comment. apply comment's suggestions Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D140814/new/ https://reviews.llvm.org/D140814 Files: clang-tools-extra/clangd/InlayHints.cp

[PATCH] D140814: [clangd] show underlying type in type hint for `decltype(expr)`

2023-01-02 Thread Vincent Hong via Phabricator via cfe-commits
v1nh1shungry marked an inline comment as done. v1nh1shungry added a comment. Thanks for reviewing and giving suggestions! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D140814/new/ https://reviews.llvm.org/D140814 __

[PATCH] D140814: [clangd] show underlying type in type hint for `decltype(expr)`

2023-01-02 Thread Vincent Hong via Phabricator via cfe-commits
v1nh1shungry updated this revision to Diff 485923. v1nh1shungry added a comment. move the comment Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D140814/new/ https://reviews.llvm.org/D140814 Files: clang-tools-extra/clangd/InlayHints.cpp clang-t

[PATCH] D141058: [clang-tidy] fix wrong fixup for bugprone-implicit-widening-of-multiplication-result

2023-01-05 Thread Vincent Hong via Phabricator via cfe-commits
v1nh1shungry created this revision. v1nh1shungry added reviewers: lebedev.ri, ymandel. Herald added subscribers: carlosgalvezp, xazax.hun. Herald added a reviewer: njames93. Herald added a project: All. v1nh1shungry requested review of this revision. Herald added a project: clang-tools-extra. Heral

[PATCH] D141058: [clang-tidy] fix wrong fixup for bugprone-implicit-widening-of-multiplication-result

2023-01-05 Thread Vincent Hong via Phabricator via cfe-commits
v1nh1shungry added a comment. Sorry, I don't know how to add tests for such fixes. Could anyone please give me some hints? Thanks! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D141058/new/ https://reviews.llvm.org/D141058

[PATCH] D141058: [clang-tidy] fix wrong fixup for bugprone-implicit-widening-of-multiplication-result

2023-01-05 Thread Vincent Hong via Phabricator via cfe-commits
v1nh1shungry updated this revision to Diff 486729. v1nh1shungry added a comment. don't use `auto` Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D141058/new/ https://reviews.llvm.org/D141058 Files: clang-tools-extra/clang-tidy/bugprone/ImplicitWi

[PATCH] D141058: [clang-tidy] fix wrong fixup for bugprone-implicit-widening-of-multiplication-result

2023-01-05 Thread Vincent Hong via Phabricator via cfe-commits
v1nh1shungry marked 2 inline comments as done. v1nh1shungry added a comment. Thank you for reviewing and giving suggestions! @Eugene.Zelenko Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D141058/new/ https://reviews.llvm.org/D141058 ___

[PATCH] D141107: [clang-tidy] don't warn when returning the result for bugprone-standalone-empty

2023-01-05 Thread Vincent Hong via Phabricator via cfe-commits
v1nh1shungry created this revision. v1nh1shungry added reviewers: cjdb, hokein. Herald added subscribers: carlosgalvezp, xazax.hun. Herald added a reviewer: njames93. Herald added a project: All. v1nh1shungry requested review of this revision. Herald added a project: clang-tools-extra. Herald added

[PATCH] D141107: [clang-tidy] don't warn when returning the result for bugprone-standalone-empty

2023-01-06 Thread Vincent Hong via Phabricator via cfe-commits
v1nh1shungry updated this revision to Diff 487044. v1nh1shungry added a comment. add more tests Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D141107/new/ https://reviews.llvm.org/D141107 Files: clang-tools-extra/clang-tidy/bugprone/StandaloneEmp

[PATCH] D141107: [clang-tidy] don't warn when returning the result for bugprone-standalone-empty

2023-01-06 Thread Vincent Hong via Phabricator via cfe-commits
v1nh1shungry marked an inline comment as done. v1nh1shungry added a comment. Thank you for reviewing and giving suggestions! @cjdb Hope there are enough test cases now, and not too many tests. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D141107/ne

[PATCH] D141058: [clang-tidy] fix wrong fixup for bugprone-implicit-widening-of-multiplication-result

2023-01-07 Thread Vincent Hong via Phabricator via cfe-commits
v1nh1shungry added a comment. Thank you for reviewing and giving suggestions! @Febbe Please take a look at my reply. Sorry if I misunderstood anything! Comment at: clang-tools-extra/clang-tidy/bugprone/ImplicitWideningOfMultiplicationResultCheck.cpp:215 (Tw

[PATCH] D141226: [WIP][clangd] support expanding `decltype(expr)`

2023-01-08 Thread Vincent Hong via Phabricator via cfe-commits
v1nh1shungry created this revision. Herald added subscribers: kadircet, arphaman. Herald added a project: All. v1nh1shungry requested review of this revision. Herald added subscribers: cfe-commits, MaskRay, ilya-biryukov. Herald added a project: clang-tools-extra. Enable the existing code action `

[PATCH] D141226: [WIP][clangd] support expanding `decltype(expr)`

2023-01-08 Thread Vincent Hong via Phabricator via cfe-commits
v1nh1shungry added a comment. If this is okay to go ahead, I'm considering renaming the tweak. Does `ExpandType` or `ExpandDeducedType` sound good? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D141226/new/ https://reviews.llvm.org/D141226 ___

[PATCH] D141058: [clang-tidy] fix wrong fixup for bugprone-implicit-widening-of-multiplication-result

2023-01-09 Thread Vincent Hong via Phabricator via cfe-commits
v1nh1shungry added a comment. Thank you for taking a look at this patch! @bansan > For the first test, I still think that the auto fix should be return > static_cast(1024) * 1024 * 1024 * x; to have the good result. I'd say I'm not the author of this checker. I think this behavior change needs

[PATCH] D141058: [clang-tidy] fix wrong fixup for bugprone-implicit-widening-of-multiplication-result

2023-01-09 Thread Vincent Hong via Phabricator via cfe-commits
v1nh1shungry added a comment. > For the second test, the type is the internal type of std::vector. There are two approaches to fixing this issue. One is fixing with the **FULLY** qualified type name, in the above case that is, `std::vector>::size_type`. Another one is fixing with the desugared t

[PATCH] D141058: [clang-tidy] fix wrong fixup for bugprone-implicit-widening-of-multiplication-result

2023-01-09 Thread Vincent Hong via Phabricator via cfe-commits
v1nh1shungry added a comment. > There are two approaches to fixing this issue. One is fixing with the FULLY > qualified type name, in the above case that is, std::vector std::allocator>::size_type. Another one is fixing with the desugared > type name, that is, unsigned long. I personally don't h

[PATCH] D141058: [clang-tidy] fix wrong fixup for bugprone-implicit-widening-of-multiplication-result

2023-01-09 Thread Vincent Hong via Phabricator via cfe-commits
v1nh1shungry added a comment. > The rule does not complain. Sorry, I'm confused. Could you please explain what you expect this example should achieve and what is "the rule"? Thanks! > So I think that the "resolved" type (size_t) should be use instead of the > templated one (std::vector>::size_

[PATCH] D141058: [clang-tidy] fix wrong fixup for bugprone-implicit-widening-of-multiplication-result

2023-01-09 Thread Vincent Hong via Phabricator via cfe-commits
v1nh1shungry added a comment. > Sorry, I'm confused. Could you please explain what you expect this example > should achieve and what is "the rule"? Thanks! Ah, I think I understand it. You mean the `bugprone-implicit-widening-of-multiplication-result` check doesn't warn anything about this exa

[PATCH] D141058: [clang-tidy] fix wrong fixup for bugprone-implicit-widening-of-multiplication-result

2023-01-09 Thread Vincent Hong via Phabricator via cfe-commits
v1nh1shungry added a comment. > There is a method QualType::getSingleStepDesugaredType() which may get size_t Just did a quick test, and it doesn't work like this. So I can only get the fully desugared type for now. Sorry :( Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION ht

[PATCH] D141226: [WIP][clangd] support expanding `decltype(expr)`

2023-01-09 Thread Vincent Hong via Phabricator via cfe-commits
v1nh1shungry updated this revision to Diff 487519. v1nh1shungry added a comment. Herald added projects: clang, LLVM. Herald added a subscriber: llvm-commits. rename the tweak `ExpandAutoType` to `ExpandDeducedType` Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://review

[PATCH] D141226: [WIP][clangd] support expanding `decltype(expr)`

2023-01-09 Thread Vincent Hong via Phabricator via cfe-commits
v1nh1shungry updated this revision to Diff 487688. v1nh1shungry added a comment. - avoid expanding dependent types - avoid expanding reference to a function - avoid expanding array type and reference to an array Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.l

[PATCH] D141226: [clangd] support expanding `decltype(expr)`

2023-01-09 Thread Vincent Hong via Phabricator via cfe-commits
v1nh1shungry updated this revision to Diff 487704. v1nh1shungry added a comment. avoid expanding pointer to an array Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D141226/new/ https://reviews.llvm.org/D141226 Files: clang-tools-extra/clangd/refac

[PATCH] D141058: [clang-tidy] fix wrong fixup for bugprone-implicit-widening-of-multiplication-result

2023-01-10 Thread Vincent Hong via Phabricator via cfe-commits
v1nh1shungry added a comment. > About my template example: I wanted to say that the actual > bugprone-implicit-widening-of-multiplication-result rule looks to not analyze > template calculation problem. So I think it's better to use the desugared > type (size_t). Hmm, I don't think this two ar

[PATCH] D139705: [clang] fix zero-initialization fix-it for variable template

2023-01-10 Thread Vincent Hong via Phabricator via cfe-commits
v1nh1shungry added a comment. Thanks for reviewing, @erichkeane! And a gentle ping to @aaron.ballman Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D139705/new/ https://reviews.llvm.org/D139705 ___ cfe-com

[PATCH] D139705: [clang] fix zero-initialization fix-it for variable template

2023-01-10 Thread Vincent Hong via Phabricator via cfe-commits
v1nh1shungry added inline comments. Comment at: clang/lib/Sema/SemaInit.cpp:3863 + SourceLocation EndLoc = VD->getEndLoc(); + if (const auto *VTSD = dyn_cast(VD)) { aaron.ballman wrote: > erichkeane wrote: > > Hmm... it is strange to me that the variables 'en

[PATCH] D139705: [clang] fix zero-initialization fix-it for variable template

2023-01-10 Thread Vincent Hong via Phabricator via cfe-commits
v1nh1shungry added inline comments. Comment at: clang/lib/Sema/SemaInit.cpp:3863 + SourceLocation EndLoc = VD->getEndLoc(); + if (const auto *VTSD = dyn_cast(VD)) { aaron.ballman wrote: > erichkeane wrote: > > v1nh1shungry wrote: > > > aaron.ballman wrote: >

[PATCH] D139705: [clang] fix zero-initialization fix-it for variable template

2023-01-10 Thread Vincent Hong via Phabricator via cfe-commits
v1nh1shungry added inline comments. Comment at: clang/test/FixIt/fixit-const-var-init.cpp:24 + +template <> constexpr float d; // expected-error {{must be initialized by a constant expression}} +// CHECK: fix-it:"{{.*}}":{24:42-24:42}:" = 0.0" aaron.ballman wrot

[PATCH] D139705: [clang] fix zero-initialization fix-it for variable template

2023-01-10 Thread Vincent Hong via Phabricator via cfe-commits
v1nh1shungry updated this revision to Diff 488081. v1nh1shungry added a comment. implement `VarTemplateSpecializationDecl::getSourceRange()` Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D139705/new/ https://reviews.llvm.org/D139705 Files: clang/

[PATCH] D139705: [clang] fix zero-initialization fix-it for variable template

2023-01-10 Thread Vincent Hong via Phabricator via cfe-commits
v1nh1shungry added inline comments. Comment at: clang/test/FixIt/fixit-const-var-init.cpp:24 + +template <> constexpr float d; // expected-error {{must be initialized by a constant expression}} +// CHECK: fix-it:"{{.*}}":{24:42-24:42}:" = 0.0" aaron.ballman wrot

[PATCH] D139705: [clang] fix zero-initialization fix-it for variable template

2023-01-11 Thread Vincent Hong via Phabricator via cfe-commits
v1nh1shungry updated this revision to Diff 488138. v1nh1shungry added a comment. add `LLVM_READONLY` to `getSourceRange()` Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D139705/new/ https://reviews.llvm.org/D139705 Files: clang/include/clang/AST/

[PATCH] D139705: [clang] fix zero-initialization fix-it for variable template

2023-01-11 Thread Vincent Hong via Phabricator via cfe-commits
v1nh1shungry added a comment. Thanks for the reply! I'll raise a GitHub issue. > var will have three attributes associated with it, but the only source > location information you have access to is for the foo, bar, and baz tokens. > Each of those attributes also keeps track of what syntax was u

[PATCH] D139705: [clang] fix zero-initialization fix-it for variable template

2023-01-11 Thread Vincent Hong via Phabricator via cfe-commits
v1nh1shungry added a comment. Thank you for reviewing! I have opened an issue on GitHub: https://github.com/llvm/llvm-project/issues/59935. Hope my description is appropriate. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D139705/new/ https://revi

[PATCH] D139705: [clang] fix zero-initialization fix-it for variable template

2023-01-11 Thread Vincent Hong via Phabricator via cfe-commits
v1nh1shungry updated this revision to Diff 488189. v1nh1shungry added a comment. add a release note Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D139705/new/ https://reviews.llvm.org/D139705 Files: clang/docs/ReleaseNotes.rst clang/include/cla

[PATCH] D141226: [clangd] support expanding `decltype(expr)`

2023-01-11 Thread Vincent Hong via Phabricator via cfe-commits
v1nh1shungry added a comment. Thank you for reviewing and giving suggestions! Comment at: clang-tools-extra/clangd/refactor/tweaks/ExpandDeducedType.cpp:57 +std::string ExpandDeducedType::title() const { + return IsAutoType ? "Expand auto type" : "Expand decltype"; +}

[PATCH] D141226: [clangd] support expanding `decltype(expr)`

2023-01-11 Thread Vincent Hong via Phabricator via cfe-commits
v1nh1shungry added inline comments. Comment at: clang-tools-extra/clangd/refactor/tweaks/ExpandDeducedType.cpp:139 - // if it's a lambda expression, return an error message - if (isa(*DeducedType) && - cast(*DeducedType)->getDecl()->isLambda()) { -return error("Could

[PATCH] D141226: [clangd] support expanding `decltype(expr)`

2023-01-11 Thread Vincent Hong via Phabricator via cfe-commits
v1nh1shungry updated this revision to Diff 488265. v1nh1shungry added a comment. address the comments Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D141226/new/ https://reviews.llvm.org/D141226 Files: clang-tools-extra/clangd/refactor/tweaks/CMak

[PATCH] D141226: [clangd] support expanding `decltype(expr)`

2023-01-11 Thread Vincent Hong via Phabricator via cfe-commits
v1nh1shungry updated this revision to Diff 488297. v1nh1shungry added a comment. modify the comment Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D141226/new/ https://reviews.llvm.org/D141226 Files: clang-tools-extra/clangd/refactor/tweaks/CMakeL

[PATCH] D141226: [clangd] support expanding `decltype(expr)`

2023-01-11 Thread Vincent Hong via Phabricator via cfe-commits
v1nh1shungry marked 2 inline comments as done. v1nh1shungry added a comment. Thank you for reviewing and giving guidance! > Do you have commit access? I don't. If this patch is okay to land, could you please help me commit it? Thanks a lot! Repository: rG LLVM Github Monorepo CHANGES SINCE

[PATCH] D141107: [clang-tidy] don't warn when returning the result for bugprone-standalone-empty

2023-01-11 Thread Vincent Hong via Phabricator via cfe-commits
v1nh1shungry added a comment. Thank you for reviewing, @cjdb and @denik! If this patch is okay to land, could you please help me commit it? Thanks a lot! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D141107/new/ https://reviews.llvm.org/D141107 _

[PATCH] D142014: [clangd] fix wrong CalleeArgInfo in the hover

2023-01-25 Thread Vincent Hong via Phabricator via cfe-commits
v1nh1shungry added inline comments. Comment at: clang-tools-extra/clangd/Hover.cpp:994 HI.CalleeArgInfo.emplace(toHoverInfoParam(PVD, PP)); + PassType.PassBy = getPassMode(PVD->getType()); +} kadircet wrote: > sorry for showing up late to the part

[PATCH] D142014: [clangd] fix wrong CalleeArgInfo in the hover

2023-01-26 Thread Vincent Hong via Phabricator via cfe-commits
v1nh1shungry added a comment. I just came up with a case where the original implementation and this patch behave differently. void foobar(const float &); int main() { foobar(0); ^ } Used to `Passed by value`, now it is `Passed by const reference`. I think the former one is

[PATCH] D142014: [clangd] fix wrong CalleeArgInfo in the hover

2023-01-26 Thread Vincent Hong via Phabricator via cfe-commits
v1nh1shungry added a comment. In D142014#4084263 , @nridge wrote: > In D142014#4081922 , @v1nh1shungry > wrote: > >> I just came up with a case where the original implementation and this patch >> behave differen

[PATCH] D142014: [clangd] fix wrong CalleeArgInfo in the hover

2023-01-29 Thread Vincent Hong via Phabricator via cfe-commits
v1nh1shungry added inline comments. Comment at: clang-tools-extra/clangd/Hover.cpp:994 HI.CalleeArgInfo.emplace(toHoverInfoParam(PVD, PP)); + PassType.PassBy = getPassMode(PVD->getType()); +} kadircet wrote: > v1nh1shungry wrote: > > kadircet wrot

[PATCH] D142014: [clangd] fix wrong CalleeArgInfo in the hover

2023-01-31 Thread Vincent Hong via Phabricator via cfe-commits
v1nh1shungry added inline comments. Comment at: clang-tools-extra/clangd/Hover.cpp:994 HI.CalleeArgInfo.emplace(toHoverInfoParam(PVD, PP)); + PassType.PassBy = getPassMode(PVD->getType()); +} kadircet wrote: > v1nh1shungry wrote: > > kadircet wrot

[PATCH] D142014: [clangd] fix wrong CalleeArgInfo in the hover

2023-01-31 Thread Vincent Hong via Phabricator via cfe-commits
v1nh1shungry updated this revision to Diff 493626. v1nh1shungry added a comment. - restore code changes - add test cases Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D142014/new/ https://reviews.llvm.org/D142014 Files: clang-tools-extra/clangd/H

[PATCH] D142014: [clangd] fix wrong CalleeArgInfo in the hover

2023-02-06 Thread Vincent Hong via Phabricator via cfe-commits
v1nh1shungry added a comment. Thanks for the review! @kadircet Would you mind having a look at if there're any concerns about the current code change, @nridge, @tom-anders, and @adamcz? Thanks a lot! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D1

[PATCH] D139705: [clang] fix zero-initialization fix-it for variable template

2023-01-12 Thread Vincent Hong via Phabricator via cfe-commits
v1nh1shungry added a comment. If this patch is okay to land, could you please help me commit it? Thanks a lot! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D139705/new/ https://reviews.llvm.org/D139705 _

[PATCH] D139705: [clang] fix zero-initialization fix-it for variable template

2023-01-13 Thread Vincent Hong via Phabricator via cfe-commits
v1nh1shungry added a comment. > I'm happy to, what name and email address would you like used for patch > attribution? I'd like "v1nh1shungry" and "v1nh1shun...@outlook.com". Thank you! > Alternatively, it seems that you've had a few patches accepted in the > project, so you could apply for co

[PATCH] D140838: [clang] fix crash on generic lambda with lambda in decltype

2023-01-13 Thread Vincent Hong via Phabricator via cfe-commits
v1nh1shungry added a comment. Thanks for reviewing! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D140838/new/ https://reviews.llvm.org/D140838 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http

[PATCH] D141787: [clang-tidy] fix a false positive of `modernize-concat-nested-namespaces`

2023-01-15 Thread Vincent Hong via Phabricator via cfe-commits
v1nh1shungry created this revision. v1nh1shungry added reviewers: carlosgalvezp, Eugene.Zelenko. Herald added a subscriber: xazax.hun. Herald added a reviewer: njames93. Herald added a project: All. v1nh1shungry requested review of this revision. Herald added a project: clang-tools-extra. Herald ad

[PATCH] D141787: [clang-tidy] fix a false positive of `modernize-concat-nested-namespaces`

2023-01-15 Thread Vincent Hong via Phabricator via cfe-commits
v1nh1shungry planned changes to this revision. v1nh1shungry added a comment. This patch doesn't handle situations like: namespace a { namespace b { #define FOO namespace c { } } } Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D141787/n

[PATCH] D141787: [clang-tidy] fix a false positive of `modernize-concat-nested-namespaces`

2023-01-15 Thread Vincent Hong via Phabricator via cfe-commits
v1nh1shungry updated this revision to Diff 489350. v1nh1shungry added a comment. add a test Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D141787/new/ https://reviews.llvm.org/D141787 Files: clang-tools-extra/clang-tidy/modernize/ConcatNestedName

[PATCH] D141787: [clang-tidy] fix a false positive of `modernize-concat-nested-namespaces`

2023-01-15 Thread Vincent Hong via Phabricator via cfe-commits
v1nh1shungry added a comment. In D141787#4054514 , @v1nh1shungry wrote: > This patch doesn't handle situations like: > > namespace a { > namespace b { > #define FOO > namespace c { > } > } > } It did. I must be mad :( Repository: rG LL

[PATCH] D141787: [clang-tidy] fix a false positive of `modernize-concat-nested-namespaces`

2023-01-15 Thread Vincent Hong via Phabricator via cfe-commits
v1nh1shungry added inline comments. Comment at: clang-tools-extra/test/clang-tidy/checkers/modernize/concat-nested-namespaces.cpp:173 +namespace n48 { +// CHECK-MESSAGES-DAG: :[[@LINE-2]]:1: warning: nested namespaces can be concatenated [modernize-concat-nested-namespaces] +//

[PATCH] D141838: [clang-tidy] fix a false positive of `cppcoreguidelines-avoid-non-const-global-variables`

2023-01-16 Thread Vincent Hong via Phabricator via cfe-commits
v1nh1shungry created this revision. v1nh1shungry added reviewers: carlosgalvezp, gribozavr2. Herald added subscribers: shchenz, kbarton, xazax.hun, nemanjai. Herald added a reviewer: njames93. Herald added a project: All. v1nh1shungry requested review of this revision. Herald added a project: clang

[PATCH] D142014: [clangd] fix wrong CalleeArgInfo in the hover

2023-01-18 Thread Vincent Hong via Phabricator via cfe-commits
v1nh1shungry created this revision. v1nh1shungry added reviewers: tom-anders, nridge. Herald added subscribers: kadircet, arphaman. Herald added a project: All. v1nh1shungry requested review of this revision. Herald added subscribers: cfe-commits, MaskRay, ilya-biryukov. Herald added a project: cla

[PATCH] D139705: [clang] fix zero-initialization fix-it for variable template

2023-01-19 Thread Vincent Hong via Phabricator via cfe-commits
v1nh1shungry updated this revision to Diff 490525. v1nh1shungry added a comment. rebase Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D139705/new/ https://reviews.llvm.org/D139705 Files: clang/docs/ReleaseNotes.rst clang/include/clang/AST/DeclT

[PATCH] D139705: [clang] fix zero-initialization fix-it for variable template

2023-01-19 Thread Vincent Hong via Phabricator via cfe-commits
v1nh1shungry added a comment. Sorry to disturb you again! It's been a week since I sent an email to Chris, and I have received no reply. Maybe my request was refused. It'd be great to land this and https://reviews.llvm.org/D140838 before the 16 release, right? If so, could you please help me co

[PATCH] D139705: [clang] fix zero-initialization fix-it for variable template

2023-01-19 Thread Vincent Hong via Phabricator via cfe-commits
v1nh1shungry added a comment. In D139705#4067370 , @lattner wrote: > I'm pretty sure I'm on top of commit access requests now, plz let me know if > I missed you or something! Could be spam filter or who knows what I sent an email from to on last Fri

[PATCH] D139705: [clang] fix zero-initialization fix-it for variable template

2023-01-20 Thread Vincent Hong via Phabricator via cfe-commits
v1nh1shungry added a comment. In D139705#4067774 , @lattner wrote: > Got it this time, sorry for the confusion! Confirmed that I received the invitation. Thanks a lot! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.l

[PATCH] D140838: [clang] fix crash on generic lambda with lambda in decltype

2023-01-20 Thread Vincent Hong via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGea4fd668c2cd: [clang] fix crash on generic lambda with lambda in decltype (authored by v1nh1shungry). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D140838/ne

[PATCH] D141787: [clang-tidy] fix a false positive of `modernize-concat-nested-namespaces`

2023-01-22 Thread Vincent Hong via Phabricator via cfe-commits
v1nh1shungry added a comment. Ping? @njames93 Comment at: clang-tools-extra/test/clang-tidy/checkers/modernize/concat-nested-namespaces.cpp:173 +namespace n48 { +// CHECK-MESSAGES-DAG: :[[@LINE-2]]:1: warning: nested namespaces can be concatenated [modernize-concat-nested-nam

[PATCH] D142014: [clangd] fix wrong CalleeArgInfo in the hover

2023-01-23 Thread Vincent Hong via Phabricator via cfe-commits
v1nh1shungry updated this revision to Diff 491287. v1nh1shungry added a comment. land comment's suggestions Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D142014/new/ https://reviews.llvm.org/D142014 Files: clang-tools-extra/clangd/Hover.cpp cl

[PATCH] D142014: [clangd] fix wrong CalleeArgInfo in the hover

2023-01-23 Thread Vincent Hong via Phabricator via cfe-commits
v1nh1shungry marked 2 inline comments as done. v1nh1shungry added a comment. Thanks for the review! @nridge Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D142014/new/ https://reviews.llvm.org/D142014 ___

[PATCH] D142014: [clangd] fix wrong CalleeArgInfo in the hover

2023-01-23 Thread Vincent Hong via Phabricator via cfe-commits
v1nh1shungry updated this revision to Diff 491440. v1nh1shungry added a comment. `==` to `>=` Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D142014/new/ https://reviews.llvm.org/D142014 Files: clang-tools-extra/clangd/Hover.cpp clang-tools-extr

[PATCH] D142014: [clangd] fix wrong CalleeArgInfo in the hover

2023-01-23 Thread Vincent Hong via Phabricator via cfe-commits
v1nh1shungry marked an inline comment as done. v1nh1shungry added a comment. Thanks! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D142014/new/ https://reviews.llvm.org/D142014 ___ cfe-commits mailing lis

[PATCH] D142014: [clangd] fix wrong CalleeArgInfo in the hover

2023-01-23 Thread Vincent Hong via Phabricator via cfe-commits
v1nh1shungry added inline comments. Comment at: clang-tools-extra/clangd/Hover.cpp:1035 } else if (const auto *MTE = CastNode->ASTNode.get()) { } else { // Unknown implicit node, assume type conversion. tom-anders wrote: > This branc

[PATCH] D142014: [clangd] fix wrong CalleeArgInfo in the hover

2023-01-23 Thread Vincent Hong via Phabricator via cfe-commits
v1nh1shungry marked an inline comment as done. v1nh1shungry added inline comments. Comment at: clang-tools-extra/clangd/Hover.cpp:1035 } else if (const auto *MTE = CastNode->ASTNode.get()) { } else { // Unknown implicit node, assume type conversion.

[PATCH] D142014: [clangd] fix wrong CalleeArgInfo in the hover

2023-01-23 Thread Vincent Hong via Phabricator via cfe-commits
v1nh1shungry updated this revision to Diff 491594. v1nh1shungry added a comment. land review's suggestions Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D142014/new/ https://reviews.llvm.org/D142014 Files: clang-tools-extra/clangd/Hover.cpp cla

[PATCH] D142014: [clangd] fix wrong CalleeArgInfo in the hover

2023-01-23 Thread Vincent Hong via Phabricator via cfe-commits
v1nh1shungry marked an inline comment as done. v1nh1shungry added a comment. Thanks for the review! @tom-anders Comment at: clang-tools-extra/clangd/Hover.cpp:1035 } else if (const auto *MTE = CastNode->ASTNode.get()) { } else { // Unknown implicit

[PATCH] D157956: [clangd] don't add inlay hint for dependent type in structured binding

2023-08-15 Thread Vincent Hong via Phabricator via cfe-commits
v1nh1shungry created this revision. v1nh1shungry added a reviewer: nridge. Herald added subscribers: kadircet, arphaman. Herald added a project: All. v1nh1shungry requested review of this revision. Herald added subscribers: cfe-commits, MaskRay, ilya-biryukov. Herald added a project: clang-tools-ex

[PATCH] D157956: [clangd] don't add inlay hint for dependent type in structured binding

2023-08-20 Thread Vincent Hong via Phabricator via cfe-commits
v1nh1shungry added a comment. Thank you for the review! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D157956/new/ https://reviews.llvm.org/D157956 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D157956: [clangd] don't add inlay hint for dependent type in structured binding

2023-08-20 Thread Vincent Hong via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGdc10bd43a103: [clangd] don't add inlay hint for dependent type in structured binding (authored by v1nh1shungry). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org

[PATCH] D158964: [clangd] support folding multi-line `#include`

2023-08-27 Thread Vincent Hong via Phabricator via cfe-commits
v1nh1shungry created this revision. v1nh1shungry added a reviewer: sammccall. Herald added subscribers: kadircet, arphaman. Herald added a project: All. v1nh1shungry requested review of this revision. Herald added subscribers: cfe-commits, MaskRay, ilya-biryukov. Herald added a project: clang-tools

[PATCH] D139705: [clang] fix zero-initialization fix-it for variable template

2023-03-23 Thread Vincent Hong via Phabricator via cfe-commits
v1nh1shungry added a comment. In D139705#4216539 , @erichkeane wrote: > In D139705#4216530 , > @tomasz-kaminski-sonarsource wrote: > >>> Since the motivation for this patch here was "make sure we're pointing to

[PATCH] D142014: [clangd] fix wrong CalleeArgInfo in the hover

2023-02-10 Thread Vincent Hong via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGb252824e6e6e: [clangd] fix wrong CalleeArgInfo in the hover (authored by v1nh1shungry). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D142014/new/ https://re

[PATCH] D137817: [clangd] Improve action `RemoveUsingNamespace` for user-defined literals

2022-12-15 Thread Vincent Hong via Phabricator via cfe-commits
v1nh1shungry updated this revision to Diff 483114. v1nh1shungry added a comment. apply review's suggestions Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D137817/new/ https://reviews.llvm.org/D137817 Files: clang-tools-extra/clangd/refactor/tweak

[PATCH] D137817: [clangd] Improve action `RemoveUsingNamespace` for user-defined literals

2022-12-16 Thread Vincent Hong via Phabricator via cfe-commits
v1nh1shungry updated this revision to Diff 483582. v1nh1shungry added a comment. Reimplemented. Note: Failed to find a way to use `ReferenceLoc` to insert the using-declarations. Currently I have to visit the `Decl` again and look for `CompoundStmt`, if there is any target user-defined literal i

[PATCH] D138300: [clangd] Support type hints for `decltype(expr)`

2022-12-16 Thread Vincent Hong via Phabricator via cfe-commits
v1nh1shungry added a comment. Thanks for the feedback! > One high-level thought I had is: what if we attached the type hint to the > closing `)` of the decltype (and had it pertain only to the `decltype(expr)`, > not anything surrounding it like `const` or `&`)? It seems to me that this > woul

[PATCH] D138300: [clangd] Support type hints for `decltype(expr)`

2022-12-16 Thread Vincent Hong via Phabricator via cfe-commits
v1nh1shungry reclaimed this revision. v1nh1shungry added a comment. Got it! Thank you for the detailed explanation! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D138300/new/ https://reviews.llvm.org/D138300

[PATCH] D138300: [clangd] Support type hints for `decltype(expr)`

2022-12-16 Thread Vincent Hong via Phabricator via cfe-commits
v1nh1shungry updated this revision to Diff 483720. v1nh1shungry added a comment. reimplement and address review's suggestions Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D138300/new/ https://reviews.llvm.org/D138300 Files: clang-tools-extra/cla

[PATCH] D137817: [clangd] Improve action `RemoveUsingNamespace` for user-defined literals

2022-12-17 Thread Vincent Hong via Phabricator via cfe-commits
v1nh1shungry updated this revision to Diff 483749. v1nh1shungry added a comment. Note: Currently if there are user-defined literals, this patch will find them and get their `CompoundStmt` parents. If there is one, it will record the parent so that it can add the using-declaration in it later. If

[PATCH] D137817: [clangd] Improve action `RemoveUsingNamespace` for user-defined literals

2022-12-17 Thread Vincent Hong via Phabricator via cfe-commits
v1nh1shungry added a comment. I think this patch is ready for another review now. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D137817/new/ https://reviews.llvm.org/D137817 ___ cfe-commits mailing list c

[PATCH] D137817: [clangd] Improve action `RemoveUsingNamespace` for user-defined literals

2022-12-17 Thread Vincent Hong via Phabricator via cfe-commits
v1nh1shungry added a comment. I think this patch is ready for another review now. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D137817/new/ https://reviews.llvm.org/D137817 ___ cfe-commits mailing list c