[PATCH] D128440: [WebAssembly] Initial support for reference type funcref in clang
Paulo Matos via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Mon Sep 19 00:52:21 PDT 2022
pmatos marked 3 inline comments as done.
pmatos added inline comments.
================
Comment at: clang/include/clang/Basic/DiagnosticSemaKinds.td:7332
+def err_attribute_webassembly_funcref : Error<
+ "'__clang_webassembly_funcref' attribute can only be applied to function pointer types">;
----------------
aaron.ballman wrote:
> 1) What is `__clang_webassembly_funcref`? Did you mean `__funcref`?
> 2) There's no test coverage for this diagnostic.
> 1) What is `__clang_webassembly_funcref`? Did you mean `__funcref`?
> 2) There's no test coverage for this diagnostic.
Yes, I meant __funcref. Thanks, will add test coverage for the diagnostic.
================
Comment at: clang/include/clang/Basic/TokenKinds.def:666
+// WebAssembly Type Extension
+KEYWORD(__funcref , KEYALL)
+
----------------
aaron.ballman wrote:
> Why is this a keyword in all language modes?
I might have misread the docs but this keyword should be available for both C and C++. Maybe I want `KEYC99 | KEYCXX` ?
================
Comment at: clang/include/clang/Sema/Sema.h:13103-13104
CallExpr *TheCall);
+ bool CheckWebAssemblyBuiltinFunctionCall(const TargetInfo &TI, unsigned BuiltinID,
+ CallExpr *TheCall);
----------------
aaron.ballman wrote:
> Formatting is off here.
Don't understand why. It's the same as `CheckRISCVBuiltinFunctionCall` ?
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