This revision was automatically updated to reflect the committed changes.
Closed by commit rC349635: [OpenMP] Fix data sharing analysis in nested clause
(authored by jdenny, committed by ).
Changed prior to commit:
https://reviews.llvm.org/D55861?vs=178803&id=178890#toc
Repository:
rC Clang
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D55861/new/
https://reviews.llvm.org/D55861
Files:
lib/Sema/SemaOpenMP.cpp
test/OpenMP/target_teams_messages.cpp
Index: test/OpenMP/target_teams_messages.cpp
===================================================================
--- test/OpenMP/target_teams_messages.cpp
+++ test/OpenMP/target_teams_messages.cpp
@@ -50,6 +50,16 @@
#pragma omp target teams default(none)
++argc; // expected-error {{variable 'argc' must have explicitly specified
data sharing attributes}}
+#pragma omp target teams default(none)
+#pragma omp parallel num_threads(argc) // expected-error {{variable 'argc'
must have explicitly specified data sharing attributes}}
+ ;
+
+#pragma omp target teams default(none)
+ {
+#pragma omp parallel num_threads(argc) // expected-error {{variable 'argc'
must have explicitly specified data sharing attributes}}
+ ;
+ }
+
goto L2; // expected-error {{use of undeclared label 'L2'}}
#pragma omp target teams
L2:
Index: lib/Sema/SemaOpenMP.cpp
===================================================================
--- lib/Sema/SemaOpenMP.cpp
+++ lib/Sema/SemaOpenMP.cpp
@@ -2390,13 +2390,9 @@
void VisitStmt(Stmt *S) {
for (Stmt *C : S->children()) {
if (C) {
- if (auto *OED = dyn_cast<OMPExecutableDirective>(C)) {
- // Check implicitly captured variables in the task-based directives
to
- // check if they must be firstprivatized.
- VisitSubCaptures(OED);
- } else {
- Visit(C);
- }
+ // Check implicitly captured variables in the task-based directives to
+ // check if they must be firstprivatized.
+ Visit(C);
}
}
}
Index: test/OpenMP/target_teams_messages.cpp
===================================================================
--- test/OpenMP/target_teams_messages.cpp
+++ test/OpenMP/target_teams_messages.cpp
@@ -50,6 +50,16 @@
#pragma omp target teams default(none)
++argc; // expected-error {{variable 'argc' must have explicitly specified data sharing attributes}}
+#pragma omp target teams default(none)
+#pragma omp parallel num_threads(argc) // expected-error {{variable 'argc' must have explicitly specified data sharing attributes}}
+ ;
+
+#pragma omp target teams default(none)
+ {
+#pragma omp parallel num_threads(argc) // expected-error {{variable 'argc' must have explicitly specified data sharing attributes}}
+ ;
+ }
+
goto L2; // expected-error {{use of undeclared label 'L2'}}
#pragma omp target teams
L2:
Index: lib/Sema/SemaOpenMP.cpp
===================================================================
--- lib/Sema/SemaOpenMP.cpp
+++ lib/Sema/SemaOpenMP.cpp
@@ -2390,13 +2390,9 @@
void VisitStmt(Stmt *S) {
for (Stmt *C : S->children()) {
if (C) {
- if (auto *OED = dyn_cast<OMPExecutableDirective>(C)) {
- // Check implicitly captured variables in the task-based directives to
- // check if they must be firstprivatized.
- VisitSubCaptures(OED);
- } else {
- Visit(C);
- }
+ // Check implicitly captured variables in the task-based directives to
+ // check if they must be firstprivatized.
+ Visit(C);
}
}
}
_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits