We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0746ff3 commit f9c22f8Copy full SHA for f9c22f8
clang/test/CodeGen/WebAssembly/musttail.c
@@ -0,0 +1,20 @@
1
+// RUN: %clang_cc1 %s -triple wasm32-unknown-unknown -target-feature +tail-call -o /dev/null -emit-llvm -verify=good
2
+// RUN: %clang_cc1 %s -triple wasm64-unknown-unknown -target-feature +tail-call -o /dev/null -emit-llvm -verify=good
3
+// RUN: %clang_cc1 %s -triple wasm32-unknown-unknown -o /dev/null -emit-llvm -verify=notail
4
+
5
+int foo(int x) {
6
+ return x;
7
+}
8
9
+#if __has_attribute(musttail)
10
+// good-warning@+2 {{HAS IT}}
11
+// notail-warning@+1 {{HAS IT}}
12
+#warning HAS IT
13
+#else
14
+#warning DOES NOT HAVE
15
+#endif
16
17
+int bar(int x)
18
+{
19
+ [[clang::musttail]] return foo(1);
20
0 commit comments