aboutsummaryrefslogtreecommitdiff
path: root/clang/test/SemaCXX/wasm-funcref.cpp
blob: 364565e9e803cad63a8a7ef154af5ccc047ffe1a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
// RUN: %clang_cc1 -std=c++11 -fcxx-exceptions -fexceptions -fsyntax-only -verify -triple wasm32 -Wno-unused-value -target-feature +reference-types %s

// Testing that funcrefs work on template aliases
// expected-no-diagnostics

using IntIntFuncref = int(*)(int) __funcref;
using DoubleQual = IntIntFuncref __funcref;

int get(int);

IntIntFuncref getFuncref() {
    return get;
}