aboutsummaryrefslogtreecommitdiff
path: root/clang/test/SemaOpenMP/openmp-begin-declare-variant_template.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'clang/test/SemaOpenMP/openmp-begin-declare-variant_template.cpp')
-rw-r--r--clang/test/SemaOpenMP/openmp-begin-declare-variant_template.cpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/clang/test/SemaOpenMP/openmp-begin-declare-variant_template.cpp b/clang/test/SemaOpenMP/openmp-begin-declare-variant_template.cpp
new file mode 100644
index 0000000..ded8f58
--- /dev/null
+++ b/clang/test/SemaOpenMP/openmp-begin-declare-variant_template.cpp
@@ -0,0 +1,12 @@
+// RUN: %clang_cc1 -triple x86_64 -fopenmp -verify %s
+
+// FIXME: Is this supposed to work?
+
+#pragma omp begin declare variant match(implementation={extension(allow_templates)})
+template <class T> void f(T) {}
+// expected-note@-1 {{explicit instantiation refers here}}
+#pragma end
+template <int> struct A {};
+template <bool B> A<B> f() = delete;
+template void f<float>(float);
+// expected-error@-1 {{explicit instantiation of undefined function template 'f'}}