[PATCH] D151515: [CodeGen] add additional cast when checking call arguments
Reid Kleckner via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Fri May 26 10:26:50 PDT 2023
rnk added subscribers: efriedma, rjmccall, rnk.
rnk added inline comments.
================
Comment at: clang/lib/CodeGen/CGCall.cpp:4376
+ .getTypePtr()
+ ->getPointeeOrArrayElementType();
+ const Type *CanonicalArgTy = getContext()
----------------
I think this discards too much information about pointer types. I think it would treat two pointers with interestingly different qualifiers differently. Consider, perhaps, a mismatch in pointer address spaces, which are passed differently (think `__ptr32` `__ptr64`).
I think there is probably some other way to get the type of the parameter after pointer decay. I would ask @efriedma since he's the current IRGen owner or @rjmccall since I think he may have added this prototype assertion originally, I just moved the code around.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D151515/new/
https://reviews.llvm.org/D151515
More information about the cfe-commits
mailing list