[PATCH] D124486: [clangd] ExtractVariable support for C and Objective-C

2022-05-31 Thread David Goldman via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGae67984ca6d8: [clangd] ExtractVariable support for C and Objective-C (authored by dgoldman). Changed prior to commit: https://reviews.llvm.org/D124486?vs=425914&id=433089#toc Repository: rG LLVM Gith

[PATCH] D124486: [clangd] ExtractVariable support for C and Objective-C

2022-05-31 Thread David Goldman via Phabricator via cfe-commits
dgoldman added inline comments. Comment at: clang-tools-extra/clangd/refactor/tweaks/ExtractVariable.cpp:418 + if (const auto *ME = dyn_cast(E)) +if (const auto *TE = dyn_cast(ME->getBase())) + if (TE->isImplicit()) sammccall wrote: > dgoldman wrote: >

[PATCH] D124486: [clangd] ExtractVariable support for C and Objective-C

2022-05-25 Thread Sam McCall via Phabricator via cfe-commits
sammccall added a comment. Please go ahead and land this, the remaining open comment doesn't really matter. Comment at: clang-tools-extra/clangd/refactor/tweaks/ExtractVariable.cpp:418 + if (const auto *ME = dyn_cast(E)) +if (const auto *TE = dyn_cast(ME->getBase())) +

[PATCH] D124486: [clangd] ExtractVariable support for C and Objective-C

2022-05-20 Thread David Goldman via Phabricator via cfe-commits
dgoldman added inline comments. Comment at: clang-tools-extra/clangd/refactor/tweaks/ExtractVariable.cpp:418 + if (const auto *ME = dyn_cast(E)) +if (const auto *TE = dyn_cast(ME->getBase())) + if (TE->isImplicit()) sammccall wrote: > dgoldman wrote: >

[PATCH] D124486: [clangd] ExtractVariable support for C and Objective-C

2022-05-20 Thread Sam McCall via Phabricator via cfe-commits
sammccall added inline comments. Comment at: clang-tools-extra/clangd/refactor/tweaks/ExtractVariable.cpp:418 + if (const auto *ME = dyn_cast(E)) +if (const auto *TE = dyn_cast(ME->getBase())) + if (TE->isImplicit()) dgoldman wrote: > sammccall wrote: >

[PATCH] D124486: [clangd] ExtractVariable support for C and Objective-C

2022-05-20 Thread David Goldman via Phabricator via cfe-commits
dgoldman added inline comments. Comment at: clang-tools-extra/clangd/refactor/tweaks/ExtractVariable.cpp:418 + if (const auto *ME = dyn_cast(E)) +if (const auto *TE = dyn_cast(ME->getBase())) + if (TE->isImplicit()) sammccall wrote: > oops, I forgot one

[PATCH] D124486: [clangd] ExtractVariable support for C and Objective-C

2022-05-20 Thread David Goldman via Phabricator via cfe-commits
dgoldman added inline comments. Comment at: clang-tools-extra/clangd/refactor/tweaks/ExtractVariable.cpp:170 + if (E->hasPlaceholderType(BuiltinType::PseudoObject)) { +if (const auto *PR = dyn_cast(E)) { + if (PR->isMessagingSetter()) { dgoldman wrote:

[PATCH] D124486: [clangd] ExtractVariable support for C and Objective-C

2022-05-19 Thread Sam McCall via Phabricator via cfe-commits
sammccall accepted this revision. sammccall added a comment. This revision is now accepted and ready to land. Thank you! Comment at: clang-tools-extra/clangd/refactor/tweaks/ExtractVariable.cpp:418 + if (const auto *ME = dyn_cast(E)) +if (const auto *TE = dyn_cast(ME->getB

[PATCH] D124486: [clangd] ExtractVariable support for C and Objective-C

2022-05-06 Thread David Goldman via Phabricator via cfe-commits
dgoldman marked an inline comment as done. dgoldman added a comment. Friendly ping Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D124486/new/ https://reviews.llvm.org/D124486 ___ cfe-commits mailing list

[PATCH] D124486: [clangd] ExtractVariable support for C and Objective-C

2022-04-28 Thread David Goldman via Phabricator via cfe-commits
dgoldman marked an inline comment as done. dgoldman added inline comments. Comment at: clang-tools-extra/clangd/refactor/tweaks/ExtractVariable.cpp:170 + if (E->hasPlaceholderType(BuiltinType::PseudoObject)) { +if (const auto *PR = dyn_cast(E)) { + if (PR->isMessagingSe

[PATCH] D124486: [clangd] ExtractVariable support for C and Objective-C

2022-04-28 Thread David Goldman via Phabricator via cfe-commits
dgoldman updated this revision to Diff 425914. dgoldman marked 6 inline comments as done. dgoldman added a comment. - Extract var type handling to a function - Other fixes for review Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D124486/new/ https:/

[PATCH] D124486: [clangd] ExtractVariable support for C and Objective-C

2022-04-28 Thread Sam McCall via Phabricator via cfe-commits
sammccall added a comment. Ok, this looks pretty good to me! Just nits Comment at: clang-tools-extra/clangd/refactor/tweaks/ExtractVariable.cpp:170 + if (E->hasPlaceholderType(BuiltinType::PseudoObject)) { +if (const auto *PR = dyn_cast(E)) { + if (PR->isMessagingSett

[PATCH] D124486: [clangd] ExtractVariable support for C and Objective-C

2022-04-27 Thread David Goldman via Phabricator via cfe-commits
dgoldman updated this revision to Diff 425650. dgoldman added a comment. - Remove extraneous computeExprType declaration Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D124486/new/ https://reviews.llvm.org/D124486 Files: clang-tools-extra/clangd/r

[PATCH] D124486: [clangd] ExtractVariable support for C and Objective-C

2022-04-27 Thread David Goldman via Phabricator via cfe-commits
dgoldman added inline comments. Comment at: clang-tools-extra/clangd/refactor/tweaks/ExtractVariable.cpp:170 + if (E->hasPlaceholderType(BuiltinType::PseudoObject)) { +if (const auto *PR = dyn_cast(E)) { + if (PR->isMessagingSetter()) { sammccall wrote:

[PATCH] D124486: [clangd] ExtractVariable support for C and Objective-C

2022-04-27 Thread David Goldman via Phabricator via cfe-commits
dgoldman updated this revision to Diff 425644. dgoldman marked 5 inline comments as done. dgoldman added a comment. - Don't use a method for computing the type - Compute the type using printType - Support MemberExprs and add a test for function pointers Repository: rG LLVM Github Monorepo CHA

[PATCH] D124486: [clangd] ExtractVariable support for C and Objective-C

2022-04-27 Thread Sam McCall via Phabricator via cfe-commits
sammccall added inline comments. Comment at: clang-tools-extra/clangd/refactor/tweaks/ExtractVariable.cpp:165 +std::string +ExtractionContext::computeExprType(const clang::Expr *E) const { + if (Ctx.getLangOpts().CPlusPlus) (does this need to be a method?) ===

[PATCH] D124486: [clangd] ExtractVariable support for C and Objective-C

2022-04-26 Thread David Goldman via Phabricator via cfe-commits
dgoldman updated this revision to Diff 425354. dgoldman added a comment. Minor formatting fix Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D124486/new/ https://reviews.llvm.org/D124486 Files: clang-tools-extra/clangd/refactor/tweaks/ExtractVaria

[PATCH] D124486: [clangd] ExtractVariable support for C and Objective-C

2022-04-26 Thread David Goldman via Phabricator via cfe-commits
dgoldman created this revision. Herald added subscribers: usaxena95, kadircet, arphaman. Herald added a project: All. dgoldman requested review of this revision. Herald added subscribers: cfe-commits, MaskRay, ilya-biryukov. Herald added a project: clang-tools-extra. - Use the expression's type fo