summaryrefslogtreecommitdiffstats
path: root/clang/test/OpenMP/parallel_sections_default_messages.cpp
diff options
context:
space:
mode:
authorAlexey Bataev <a.bataev@hotmail.com>2019-05-09 18:14:57 +0000
committerAlexey Bataev <a.bataev@hotmail.com>2019-05-09 18:14:57 +0000
commit41ebe0ce64bfc5ea208fc391b6dabd39bf670cec (patch)
tree68165d28219aeb3f7e72cd0c432551535546982e /clang/test/OpenMP/parallel_sections_default_messages.cpp
parente406f0eec64f5b6ceb38a2afdd119c41f9905f42 (diff)
downloadbcm5719-llvm-41ebe0ce64bfc5ea208fc391b6dabd39bf670cec.tar.gz
bcm5719-llvm-41ebe0ce64bfc5ea208fc391b6dabd39bf670cec.zip
[OPENMP]Fix PR41768: check DSA for globals with default(none) clauses.
If the default(none) was specified for the construct, we might miss diagnostic for the globals without explicitly specified data-sharing attributes. Patch fixes this problem. llvm-svn: 360362
Diffstat (limited to 'clang/test/OpenMP/parallel_sections_default_messages.cpp')
-rw-r--r--clang/test/OpenMP/parallel_sections_default_messages.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/clang/test/OpenMP/parallel_sections_default_messages.cpp b/clang/test/OpenMP/parallel_sections_default_messages.cpp
index b16e5f73695..3d2e74933f1 100644
--- a/clang/test/OpenMP/parallel_sections_default_messages.cpp
+++ b/clang/test/OpenMP/parallel_sections_default_messages.cpp
@@ -25,12 +25,12 @@ int main(int argc, char **argv) {
}
}
-#pragma omp parallel sections default(none)
+#pragma omp parallel sections default(none) // expected-note {{explicit data sharing attribute requested here}}
{
++argc; // expected-error {{variable 'argc' must have explicitly specified data sharing attributes}}
}
-#pragma omp parallel sections default(none)
+#pragma omp parallel sections default(none) // expected-note {{explicit data sharing attribute requested here}}
{
#pragma omp parallel sections default(shared)
{
OpenPOWER on IntegriCloud