brintos

brintos / llvm-project-archived public Read only

0
0
Text · 520 B · 37fed70 Raw
21 lines · c
1// RUN: %clang_cc1 %s -triple wasm32-unknown-unknown -target-feature +tail-call -o /dev/null -emit-llvm -verify=tail2// RUN: %clang_cc1 %s -triple wasm32-unknown-unknown -o /dev/null -emit-llvm -verify=notail3 4int foo(int x) {5  return x;6}7 8#if __has_attribute(musttail)9// tail-warning@+1 {{HAS IT}}10#warning HAS IT11#else12// notail-warning@+1 {{DOES NOT HAVE}}13#warning DOES NOT HAVE14#endif15 16int bar(int x)17{18  // notail-warning@+1 {{unknown attribute 'clang::musttail' ignored}}19 [[clang::musttail]] return foo(1);20}21