[PATCH] D152720: [clangd][ObjC] Support ObjC class rename from implementation decls

2023-06-26 Thread David Goldman via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG1b66840f7103: [clangd][ObjC] Support ObjC class rename from implementation decls (authored by dgoldman). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D152720

[PATCH] D152720: [clangd][ObjC] Support ObjC class rename from implementation decls

2023-06-26 Thread David Goldman via Phabricator via cfe-commits
dgoldman updated this revision to Diff 534618. dgoldman marked an inline comment as done. dgoldman added a comment. Fixes for review + rebase Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D152720/new/ https://reviews.llvm.org/D152720 Files: clang

[PATCH] D152720: [clangd][ObjC] Support ObjC class rename from implementation decls

2023-06-26 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet accepted this revision. kadircet added a comment. This revision is now accepted and ready to land. thanks! Comment at: clang-tools-extra/clangd/refactor/Rename.cpp:144 +const NamedDecl *pickInterestingTarget(const NamedDecl *D) { + // We only support renaming the cl

[PATCH] D152720: [clangd][ObjC] Support ObjC class rename from implementation decls

2023-06-23 Thread David Goldman via Phabricator via cfe-commits
dgoldman added inline comments. Comment at: clang-tools-extra/clangd/refactor/Rename.cpp:787 + // names like class and protocol names. + if (const auto *CD = dyn_cast(&RenameDecl)) +if (CD->getName() != IdentifierToken->text(SM)) kadircet wrote: > this spec

[PATCH] D152720: [clangd][ObjC] Support ObjC class rename from implementation decls

2023-06-23 Thread David Goldman via Phabricator via cfe-commits
dgoldman updated this revision to Diff 533993. dgoldman marked 4 inline comments as done. dgoldman added a comment. Fixes for review Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D152720/new/ https://reviews.llvm.org/D152720 Files: clang-tools-ex

[PATCH] D152720: [clangd][ObjC] Support ObjC class rename from implementation decls

2023-06-23 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet added inline comments. Comment at: clang-tools-extra/clangd/refactor/Rename.cpp:164 AST.getHeuristicResolver())) { Result.insert(canonicalRenameDecl(D)); } before calling `canonicalRenameDecl` here we can do a `D = pickInteres

[PATCH] D152720: [clangd][ObjC] Support ObjC class rename from implementation decls

2023-06-22 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/FindTarget.cpp:716 +void VisitObjCImplementationDecl(const ObjCImplementationDecl *OIMD) { + if (const auto *CI = OIMD->getClassInterface()) +Refs.push

[PATCH] D152720: [clangd][ObjC] Support ObjC class rename from implementation decls

2023-06-22 Thread David Goldman via Phabricator via cfe-commits
dgoldman updated this revision to Diff 533769. dgoldman marked an inline comment as done. dgoldman added a comment. Add more FindTarget tests Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D152720/new/ https://reviews.llvm.org/D152720 Files: clang

[PATCH] D152720: [clangd][ObjC] Support ObjC class rename from implementation decls

2023-06-22 Thread David Goldman via Phabricator via cfe-commits
dgoldman updated this revision to Diff 533640. dgoldman added a comment. Disable renaming categories Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D152720/new/ https://reviews.llvm.org/D152720 Files: clang-tools-extra/clangd/FindTarget.cpp clan

[PATCH] D152720: [clangd][ObjC] Support ObjC class rename from implementation decls

2023-06-20 Thread David Goldman via Phabricator via cfe-commits
dgoldman added inline comments. Comment at: clang-tools-extra/clangd/SemanticHighlighting.cpp:131 return HighlightingKind::Interface; - if (isa(D)) + if (isa(D)) return HighlightingKind::Namespace; kadircet wrote: > let's do this in a separate change,

[PATCH] D152720: [clangd][ObjC] Support ObjC class rename from implementation decls

2023-06-16 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet added inline comments. Comment at: clang-tools-extra/clangd/FindTarget.cpp:715 + +void VisitObjCImplementationDecl(const ObjCImplementationDecl *OIMD) { + if (const auto *CI = OIMD->getClassInterface()) can you also add tests for these into `Fin

[PATCH] D152720: [clangd][ObjC] Support ObjC class rename from implementation decls

2023-06-14 Thread David Goldman via Phabricator via cfe-commits
dgoldman updated this revision to Diff 531439. dgoldman added a comment. - Implement discussed fixes + category support Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D152720/new/ https://reviews.llvm.org/D152720 Files: clang-tools-extra/clangd/Fi

[PATCH] D152720: [clangd][ObjC] Support ObjC class rename from implementation decls

2023-06-12 Thread David Goldman via Phabricator via cfe-commits
dgoldman updated this revision to Diff 530665. dgoldman added a comment. Run clang format Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D152720/new/ https://reviews.llvm.org/D152720 Files: clang-tools-extra/clangd/FindTarget.cpp clang-tools-ext

[PATCH] D152720: [clangd][ObjC] Support ObjC class rename from implementation decls

2023-06-12 Thread David Goldman via Phabricator via cfe-commits
dgoldman created this revision. dgoldman added a reviewer: kadircet. Herald added a subscriber: 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. Repository: