The OpenMP specification disallows having zero-length array sections in the depend clause (OpenMP 5.0 2.17.11).
Details
Details
Diff Detail
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
Comment Actions
Is there a reason not to put this check right next to the one that issues err_omp_section_length_negative. SemaExpr.cpp +4668
clang/lib/Sema/SemaOpenMP.cpp | ||
---|---|---|
15030–15032 | Just .. Length->EvaluateAsInt(Result, Context) && Result.Val.getInt().isNullValue()) { |
Comment Actions
It is a good idea to group the checking together however this check is specific for the depend clause. The map clause allows the zero-length array section. Isn't it better to keep it in ActOnOpenMPDependClause?
Just .. Length->EvaluateAsInt(Result, Context) && Result.Val.getInt().isNullValue()) {