[PATCH] D128440: [WebAssembly] Initial support for reference type funcref in clang
Thomas Lively via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Tue Aug 16 18:18:05 PDT 2022
tlively added a comment.
It would be good to add tests for more error conditions like in the externref patch and also additional errors like trying to apply __funcref to types that aren't function pointers.
================
Comment at: clang/include/clang/Basic/Attr.td:4053
+ let Spellings = [Keyword<"__funcref">];
+ let Documentation = [Undocumented];
+}
----------------
It would be good to document this!
================
Comment at: clang/lib/Sema/SemaChecking.cpp:4525
+ case WebAssembly::BI__builtin_wasm_ref_null_func:
+ return (SemaBuiltinWasmRefNullFunc(TheCall));
+ }
----------------
Are the extra parentheses meaningful here?
================
Comment at: clang/lib/Sema/SemaChecking.cpp:6552-6555
+ // The call we get looks like
+ // CallExpr
+ // `- ImplicitCastExpr
+ // `- DeclRefExpr
----------------
How do these parts correspond to the original source code?
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