Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
clang-tools-extra/clangd/InlayHints.cpp | ||
---|---|---|
466 | The reason I didn't unify them in this patch is less that I'm lazy, and more that I'm not sure where to put code that will be shared by SemaCodeComplete.cpp and clangd. Do we have some sort of dumping ground for miscellaneous AST utilities, like clang-tools-extra/clangd/AST.h but also usable in libSema? |
clang-tools-extra/clangd/InlayHints.cpp | ||
---|---|---|
466 | I guess the function is performing a heuristic / best-effort operation, so HeuristicResolver could be the place for it once that is upstreamed. |
clang-tools-extra/clangd/InlayHints.cpp | ||
---|---|---|
508 | Calling this "callee" confuses me a bit - originally the callee was an expr and always present, so this must be a different idea: CalleeDecl?. However I also think this struct has an unneccesarily broad scope: we're not really gaining anything by bundling Args into it rather than continuing to pass that as a separate param. struct Callee { Decl *Declaration; FunctionProtoTypeLoc Loc; }; |
clang-tools-extra/clangd/InlayHints.cpp | ||
---|---|---|
466 | (I'm happy with this being where it is, for lack of a really good option) I don't have a good answer here - sometimes people seem to dumb these as methods on Expr etc itself, but that seems terrible. AST is probably the best existing library for it if we want to use it from Sema, but it feels a little... impure. It doesn't feel like a perfect fit for HeuristicResolver but in practice if we're going to move that into AST then it seems best overall for this function to come along for the ride. |
clang-tools-extra/clangd/InlayHints.cpp | ||
---|---|---|
508 | Good point, updated |
The reason I didn't unify them in this patch is less that I'm lazy, and more that I'm not sure where to put code that will be shared by SemaCodeComplete.cpp and clangd.
Do we have some sort of dumping ground for miscellaneous AST utilities, like clang-tools-extra/clangd/AST.h but also usable in libSema?