aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/Sema/SemaOpenMP.cpp
diff options
context:
space:
mode:
authorRon Lieberman <ron.lieberman@amd.com>2023-03-08 22:01:22 -0600
committerRon Lieberman <ron.lieberman@amd.com>2023-03-08 22:05:31 -0600
commit8cf85a0cadb033fed3d96aa5283deb4bfbbaf2c8 (patch)
tree6561e4905accbc858541268ed2adb4798e4c7025 /clang/lib/Sema/SemaOpenMP.cpp
parent556a811d686ea5242d8c21b95a97b90aa1be7c56 (diff)
downloadllvm-8cf85a0cadb033fed3d96aa5283deb4bfbbaf2c8.zip
llvm-8cf85a0cadb033fed3d96aa5283deb4bfbbaf2c8.tar.gz
llvm-8cf85a0cadb033fed3d96aa5283deb4bfbbaf2c8.tar.bz2
Revert "Add map info for dereference pointer."
breaks amdgpu buildbot This reverts commit 0f2f378425821de77e50a0dcb67c4504389a56e8.
Diffstat (limited to 'clang/lib/Sema/SemaOpenMP.cpp')
-rw-r--r--clang/lib/Sema/SemaOpenMP.cpp11
1 files changed, 4 insertions, 7 deletions
diff --git a/clang/lib/Sema/SemaOpenMP.cpp b/clang/lib/Sema/SemaOpenMP.cpp
index e193fa3..b87732a 100644
--- a/clang/lib/Sema/SemaOpenMP.cpp
+++ b/clang/lib/Sema/SemaOpenMP.cpp
@@ -2203,14 +2203,11 @@ bool Sema::isOpenMPCapturedByRef(const ValueDecl *D, unsigned Level,
++EI;
if (EI == EE)
return false;
- auto Last = std::prev(EE);
- const auto *UO =
- dyn_cast<UnaryOperator>(Last->getAssociatedExpression());
- if ((UO && UO->getOpcode() == UO_Deref) ||
- isa<ArraySubscriptExpr>(Last->getAssociatedExpression()) ||
- isa<OMPArraySectionExpr>(Last->getAssociatedExpression()) ||
+
+ if (isa<ArraySubscriptExpr>(EI->getAssociatedExpression()) ||
+ isa<OMPArraySectionExpr>(EI->getAssociatedExpression()) ||
isa<MemberExpr>(EI->getAssociatedExpression()) ||
- isa<OMPArrayShapingExpr>(Last->getAssociatedExpression())) {
+ isa<OMPArrayShapingExpr>(EI->getAssociatedExpression())) {
IsVariableAssociatedWithSection = true;
// There is nothing more we need to know about this variable.
return true;