[clang] Implement lifetime analysis for lifetime_capture_by(X) (#115921)
[llvm-project.git] / clang / test / Parser / wasm-funcref.c
blob5f5b1f60dc46b596c5426d75e3a74cf7c7bae3c5
1 // RUN: %clang_cc1 -triple powerpc-linux-gnu -fsyntax-only -verify %s
3 // Test that we trigger an error at parse time if using keyword funcref
4 // while not using a wasm triple.
5 typedef void (*__funcref funcref_t)(); // expected-error {{invalid use of '__funcref' keyword outside the WebAssembly triple}}
6 typedef int (*__funcref fn_funcref_t)(int);// expected-error {{invalid use of '__funcref' keyword outside the WebAssembly triple}}
7 typedef int (*fn_t)(int);
9 static fn_funcref_t nullFuncref = 0;