clang/test/SemaCXX/wasm-funcref.cpp
raw| 1 | // RUN: %clang_cc1 -std=c++11 -fcxx-exceptions -fexceptions -fsyntax-only -verify -triple wasm32 -Wno-unused-value -target-feature +reference-types %s |
| 2 | |
| 3 | // Testing that funcrefs work on template aliases |
| 4 | // expected-no-diagnostics |
| 5 | |
| 6 | using IntIntFuncref = int(*)(int) __funcref; |
| 7 | using DoubleQual = IntIntFuncref __funcref; |
| 8 | |
| 9 | int get(int); |
| 10 | |
| 11 | IntIntFuncref getFuncref() { |
| 12 | return get; |
| 13 | } |