diff options
author | Alexey Bataev <a.bataev@hotmail.com> | 2018-02-16 21:23:23 +0000 |
---|---|---|
committer | Alexey Bataev <a.bataev@hotmail.com> | 2018-02-16 21:23:23 +0000 |
commit | 16003bcdb4287aab3b87300d9e95f9b49ce52c1c (patch) | |
tree | 5a6544c13f3affde9c1f4f37fd2c3cd537ef667e /test | |
parent | cdb8a03f703f775f06f46a23f8e7393d83c6901d (diff) | |
download | clang-16003bcdb4287aab3b87300d9e95f9b49ce52c1c.tar.gz |
[OPENMP] Do not emit messages for templates in declare target
constructs.
The compiler may emit some extra warnings for functions, that are
implicit specialization of the templates, declared in the target region.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@325391 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test')
-rw-r--r-- | test/OpenMP/declare_target_messages.cpp | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/test/OpenMP/declare_target_messages.cpp b/test/OpenMP/declare_target_messages.cpp index 4615dbdae4..3286a29dc4 100644 --- a/test/OpenMP/declare_target_messages.cpp +++ b/test/OpenMP/declare_target_messages.cpp @@ -33,6 +33,33 @@ struct NonT { typedef int sint; +template <typename T> +T bla1() { return 0; } + +#pragma omp declare target +template <typename T> +T bla2() { return 0; } +#pragma omp end declare target + +template<> +float bla2() { return 1.0; } + +#pragma omp declare target +void blub2() { + bla2<float>(); + bla2<int>(); +} +#pragma omp end declare target + +void t2() { +#pragma omp target + { + bla2<float>(); + bla2<long>(); + } +} + + #pragma omp declare target // expected-note {{to match this '#pragma omp declare target'}} #pragma omp threadprivate(a) // expected-note {{defined as threadprivate or thread local}} extern int b; |