[PATCH] D155370: [CodeComplete] Improve FunctionCanBeCall
Younan Zhang via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Sun Jul 23 07:25:57 PDT 2023
zyounan added a comment.
Thanks for the insightful suggestions!
(Apologies for my late update. Just had a really busy week.)
As suggested, I left the CCR intact and handled these functions in `CodeCompletionResult::createCodeCompletionStringForDecl`. I think this preserves the Declaration, right? (While I think we //could// get the associated Decl if using `RK_Pattern`, however the current approach looks more terse to me.)
I also noticed that the previous implementation did not consider function templates. For example,
struct S {
template <typename T>
void foo(T);
void bar();
};
&S::bar^ // getting `S::bar`
&S::foo^ // getting `S::foo(T)`!
This brings a discrepancy, which I have also fixed in this patch. I hope this doesn't cause too much inconvenience for the review :)
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D155370/new/
https://reviews.llvm.org/D155370
More information about the cfe-commits
mailing list