[PATCH] D133843: [clangd] Prefer definitions for gototype and implementation
Sam McCall via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Wed Sep 14 16:19:03 PDT 2022
sammccall added a comment.
There's no test here, can you describe the cases you expect this to affect and why the new behavior is better?
For types this seems doubly-dubious at first glance:
- when we've decided to "prefer" a non-definition declaration, why make an exception here?
- I'd expect the definition to almost-always be the preferred declaration anyway.
For implementation, I think I there's a good argument for this behavior: the purpose of the command is to cut through abstractions to see what this method does in practice, and finding the definition fits with that. I'm happy with this behavior but I think it deserves a comment.
(There's also a bad argument: users think "implementation" means definition - just because the name is ambiguous doesn't mean we should implement both behaviors!)
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D133843/new/
https://reviews.llvm.org/D133843
More information about the cfe-commits
mailing list