[PATCH] D75077: [OpenMP5.0] Allow pointer arithmetic in motion/map clause
Alexey Bataev via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Fri Feb 28 09:28:44 PST 2020
ABataev added inline comments.
================
Comment at: clang/lib/Sema/SemaOpenMP.cpp:15499-15501
RelevantExpr = DRE;
// Record the component.
Components.emplace_back(DRE, DRE->getDecl());
----------------
Shall we do this only if `RelevantExpr` is nullptr?
================
Comment at: clang/lib/Sema/SemaOpenMP.cpp:15510-15511
if (isa<CXXThisExpr>(BaseE))
// We found a base expression: this->Val.
RelevantExpr = ME;
else
----------------
Shall we do this only if `RelevantExpr` is nullptr?
================
Comment at: clang/lib/Sema/SemaOpenMP.cpp:15570-15571
// Record the component.
Components.emplace_back(ME, FD);
return RelevantExpr || Visit(E);
----------------
Shall we do this only if `RelevantExpr` is nullptr?
================
Comment at: clang/lib/Sema/SemaOpenMP.cpp:15676-15680
RelevantExpr = TE;
}
// Record the component - we don't have any declaration associated.
Components.emplace_back(OASE, nullptr);
----------------
Shall we do this only if `RelevantExpr` is nullptr?
================
Comment at: clang/lib/Sema/SemaOpenMP.cpp:15707
+ Expr *RE = BO->getRHS()->IgnoreParenImpCasts();
+ Components.emplace_back(BO, nullptr);
+ assert((LE->getType().getTypePtr() == BO->getType().getTypePtr() ||
----------------
Shall we do this only if `RelevantExpr` is nullptr?
================
Comment at: clang/lib/Sema/SemaOpenMP.cpp:15712
+ if (BO->getType().getTypePtr() == LE->getType().getTypePtr())
+ return Visit(LE);
+ return Visit(RE);
----------------
Shall we also here do `return RelevantExpr || Visit(LE);`?
================
Comment at: clang/lib/Sema/SemaOpenMP.cpp:15713
+ return Visit(LE);
+ return Visit(RE);
+ }
----------------
Shall we also here do `return RelevantExpr || Visit(RE);`?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D75077/new/
https://reviews.llvm.org/D75077
More information about the cfe-commits
mailing list