[PATCH] D128440: [WebAssembly] Initial support for reference type funcref in clang
Aaron Ballman via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Wed Jan 11 08:18:52 PST 2023
aaron.ballman added inline comments.
================
Comment at: clang/lib/Sema/SemaChecking.cpp:6711
+ // Prepare FDecl type
+ QualType Pointee = Context.getFunctionType(Context.VoidTy, {}, {});
+ QualType Type = Context.getPointerType(Pointee);
----------------
erichkeane wrote:
> aaron.ballman wrote:
> > I'm still wondering why this code is needed and what it's trying to do. It worries me that we're changing the type of the call expression like this.
> This appears to be a 'custom type checking' builtin, where the code in Sema has to check the arguments (rather than the automatic behavior working), and set its return type to the 'correct' one. It appears that this accepts no arguments, then changes the result of the builtin.
>
> So this doesn't seem particularly odd, other than the strange comments above.
Oh yeah that's right, that is how the custom checking code works, thank you for the reminder!
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D128440/new/
https://reviews.llvm.org/D128440
More information about the cfe-commits
mailing list