[clang] Implement lifetime analysis for lifetime_capture_by(X) (#115921)
[llvm-project.git] / clang / test / SemaCXX / wasm-funcref.cpp
blob364565e9e803cad63a8a7ef154af5ccc047ffe1a
1 // RUN: %clang_cc1 -std=c++11 -fcxx-exceptions -fexceptions -fsyntax-only -verify -triple wasm32 -Wno-unused-value -target-feature +reference-types %s
3 // Testing that funcrefs work on template aliases
4 // expected-no-diagnostics
6 using IntIntFuncref = int(*)(int) __funcref;
7 using DoubleQual = IntIntFuncref __funcref;
9 int get(int);
11 IntIntFuncref getFuncref() {
12 return get;