diff options
author | Alexey Bataev <a.bataev@hotmail.com> | 2016-11-28 15:55:15 +0000 |
---|---|---|
committer | Alexey Bataev <a.bataev@hotmail.com> | 2016-11-28 15:55:15 +0000 |
commit | 7fcacd8e0e9fd5dc937da96c77b7b2239e022f69 (patch) | |
tree | 88ff5a05f936987ec8a94178ed879b5b292e01c3 /clang/lib/Sema/SemaOpenMP.cpp | |
parent | 6ec13991f583d72713528907d0561c14e4872b31 (diff) | |
download | bcm5719-llvm-7fcacd8e0e9fd5dc937da96c77b7b2239e022f69.tar.gz bcm5719-llvm-7fcacd8e0e9fd5dc937da96c77b7b2239e022f69.zip |
[OPENMP] Fix for PR31137: Wrong DSA for members in struct.
If member expression is used in the task region and the base expression
is a DeclRefExp and the variable used in this ref expression is private,
it should be marked as implicitly firstprivate inside this region. Patch
fixes this issue.
llvm-svn: 288039
Diffstat (limited to 'clang/lib/Sema/SemaOpenMP.cpp')
-rw-r--r-- | clang/lib/Sema/SemaOpenMP.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/clang/lib/Sema/SemaOpenMP.cpp b/clang/lib/Sema/SemaOpenMP.cpp index 5cae7e30025..f92b99713f2 100644 --- a/clang/lib/Sema/SemaOpenMP.cpp +++ b/clang/lib/Sema/SemaOpenMP.cpp @@ -1556,7 +1556,8 @@ public: !Stack->isLoopControlVariable(FD).first) ImplicitFirstprivate.push_back(E); } - } + } else + Visit(E->getBase()); } void VisitOMPExecutableDirective(OMPExecutableDirective *S) { for (auto *C : S->clauses()) { |