[PATCH] D74144: [OPENMP50]Add basic support for array-shaping operation.
John McCall via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Wed Mar 25 20:35:11 PDT 2020
rjmccall added a comment.
Okay, if you think that suppress array decay is the right behavior here, that's fine with me. Please check the behavior of other OpenMP implementations, though.
================
Comment at: clang/lib/Sema/SemaExpr.cpp:4848
+ Expr::EvalResult EvResult;
+ if (Dim->EvaluateAsInt(EvResult, Context)) {
+ // OpenMP 5.0, [2.1.4 Array Shaping]
----------------
You do still need an `isValueDependent()` check here, and you should add a test that exercises it. (A `sizeof(T)` argument is probably good enough.)
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D74144/new/
https://reviews.llvm.org/D74144
More information about the cfe-commits
mailing list