aboutsummaryrefslogtreecommitdiff
path: root/clang/test/OpenMP/declare_target_messages.cpp
diff options
context:
space:
mode:
authorYaxun (Sam) Liu <yaxun.liu@amd.com>2020-02-16 21:38:03 -0500
committerYaxun (Sam) Liu <yaxun.liu@amd.com>2020-02-16 22:44:33 -0500
commit1b978ddba05cb15e22b4e75adb5e7362ad861987 (patch)
treeee75220a21b8e51bab0b40c58b6959411d03518a /clang/test/OpenMP/declare_target_messages.cpp
parente8e078c8bf7987b95298062a644bac9eed26f988 (diff)
downloadllvm-1b978ddba05cb15e22b4e75adb5e7362ad861987.zip
llvm-1b978ddba05cb15e22b4e75adb5e7362ad861987.tar.gz
llvm-1b978ddba05cb15e22b4e75adb5e7362ad861987.tar.bz2
[CUDA][HIP][OpenMP] Emit deferred diagnostics by a post-parsing AST travese
This patch removes the explicit call graph for CUDA/HIP/OpenMP deferred diagnostics generated during parsing since it is error prone due to incomplete information about function declarations during parsing. In stead, this patch does a post-parsing AST traverse and emits deferred diagnostics based on the use graph implicitly generated during the traverse. Differential Revision: https://reviews.llvm.org/D70172
Diffstat (limited to 'clang/test/OpenMP/declare_target_messages.cpp')
-rw-r--r--clang/test/OpenMP/declare_target_messages.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/clang/test/OpenMP/declare_target_messages.cpp b/clang/test/OpenMP/declare_target_messages.cpp
index cc6558d..1a371d6 100644
--- a/clang/test/OpenMP/declare_target_messages.cpp
+++ b/clang/test/OpenMP/declare_target_messages.cpp
@@ -162,17 +162,17 @@ namespace {
#pragma omp declare target link(x) // expected-error {{'x' must not appear in both clauses 'to' and 'link'}}
void bazz() {}
-#pragma omp declare target to(bazz) device_type(nohost) // omp45-error {{unexpected 'device_type' clause, only 'to' or 'link' clauses expected}} host5-note {{marked as 'device_type(nohost)' here}}
+#pragma omp declare target to(bazz) device_type(nohost) // omp45-error {{unexpected 'device_type' clause, only 'to' or 'link' clauses expected}} host5-note 3{{marked as 'device_type(nohost)' here}}
void bazzz() {bazz();}
#pragma omp declare target to(bazzz) device_type(nohost) // omp45-error {{unexpected 'device_type' clause, only 'to' or 'link' clauses expected}}
void any() {bazz();} // host5-error {{function with 'device_type(nohost)' is not available on host}}
-void host1() {bazz();}
-#pragma omp declare target to(host1) device_type(host) // omp45-error {{unexpected 'device_type' clause, only 'to' or 'link' clauses expected}} dev5-note 2 {{marked as 'device_type(host)' here}}
-void host2() {bazz();}
+void host1() {bazz();} // host5-error {{function with 'device_type(nohost)' is not available on host}}
+#pragma omp declare target to(host1) device_type(host) // omp45-error {{unexpected 'device_type' clause, only 'to' or 'link' clauses expected}} dev5-note 4 {{marked as 'device_type(host)' here}}
+void host2() {bazz();} //host5-error {{function with 'device_type(nohost)' is not available on host}}
#pragma omp declare target to(host2)
-void device() {host1();}
+void device() {host1();} // dev5-error {{function with 'device_type(host)' is not available on device}}
#pragma omp declare target to(device) device_type(nohost) // omp45-error {{unexpected 'device_type' clause, only 'to' or 'link' clauses expected}} host5-note 2 {{marked as 'device_type(nohost)' here}}
-void host3() {host1();}
+void host3() {host1();} // dev5-error {{function with 'device_type(host)' is not available on device}}
#pragma omp declare target to(host3)
#pragma omp declare target