Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
clang-tools-extra/clangd/FindTarget.cpp | ||
---|---|---|
719 | can you also add tests for these into FindTargetTests? | |
720 | we don't have the null check in other places, what's the significance here? | |
clang-tools-extra/clangd/SemanticHighlighting.cpp | ||
131 | let's do this in a separate change, with some tests | |
clang-tools-extra/clangd/refactor/Rename.cpp | ||
175–181 | sorry i don't follow what's the logic doing here and we're likely doing these in the wrong layer. we should either:
|
clang-tools-extra/clangd/FindTarget.cpp | ||
---|---|---|
720 | Removed, doesn't look like it's needed. |
clang-tools-extra/clangd/refactor/Rename.cpp | ||
---|---|---|
173 | before calling canonicalRenameDecl here we can do a D = pickInterestingTarget(D); and map it to interface decl once (we'll probably need something similar for propertydecls?), rather than canonicalizing all ObjcCategoryDecls. that way we'll still get to rename proper references that target ObjcInterfaceDecls. | |
297 | i am afraid we're doing this at the wrong layer. the discrepancy is actually arising from the fact that findExplicitReferences will report name locations for an entity whose primary location contains a different name (e.g. @interface ^Foo (^Bar) saying that there's a reference to objccategorydecl at Bar, but canonicalizing it to Foo). so i think what we really want is not to canonicalize objccategory(impl)decls to objcinterfacedecl, but rather pick rename target as objcinterfacedecl when the user is trying to rename a categorydecl inside locatelDeclAt (put more comments near that part of the code). sorry for the extra round trip here :/ | |
792 | this special casing should no longer be needed if we just map CategoryDecls to InterfaceDecls in locateDeclAt rather than at canonicalization time | |
clang-tools-extra/clangd/unittests/FindTargetTests.cpp | ||
2063 | can you move this into a separate test case? |
Fixes for review
clang-tools-extra/clangd/refactor/Rename.cpp | ||
---|---|---|
792 | Yep, no longer needed since the Check the rename-triggering location is actually being renamed check catches this although the error is no symbol found instead of unsupported symbol. |
thanks!
clang-tools-extra/clangd/refactor/Rename.cpp | ||
---|---|---|
144 | can you put a function level comment like: Some AST nodes can reference multiple declarations. We try to pick the relevant one to rename here. | |
clang-tools-extra/clangd/unittests/RenameTests.cpp | ||
1709 | can you drop the ^ in here. we only iterate over points in the header file. |
can you also add tests for these into FindTargetTests?