Skip to content

Commit f9c22f8

Browse files
committed
Precommit
1 parent 0746ff3 commit f9c22f8

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -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

Comments
 (0)