[PATCH] D142014: [clangd] fix wrong CalleeArgInfo in the hover
Vincent Hong via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Thu Jan 26 00:03:37 PST 2023
v1nh1shungry added a comment.
I just came up with a case where the original implementation and this patch behave differently.
void foobar(const float &);
int main() {
foobar(0);
^
}
Used to `Passed by value`, now it is `Passed by const reference`. I think the former one is apparently better.
This case can be fixed by getting the `PassType.PassBy = HoverInfo::PassType::Value;` back to the `ImplicitCastExpr` case, but hmm...It does make me hesitate to insist on the current code change. Maybe we should switch to @kadircet's idea if I understand him correctly. WDYT, @nridge, @tom-anders and @adamcz?
But the `isLiteral()` and `ImplicitCastExpr` cases in the original implementation bring enough mystery and risks to me. For me this is a hard decision.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D142014/new/
https://reviews.llvm.org/D142014
More information about the cfe-commits
mailing list