[PATCH] D65461: [OPENMP]Add support for analysis of linear variables and step.

Artem Dergachev via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Aug 7 14:29:53 PDT 2019


NoQ accepted this revision.
NoQ added a comment.
This revision is now accepted and ready to land.

Thx again!



================
Comment at: lib/AST/OpenMPClause.cpp:473
+  // (Step and CalcStep), list of used expression + step.
+  void *Mem = C.Allocate(totalSizeToAlloc<Expr *>(5 * NumVars + 2 + NumVars  +1));
   return new (Mem) OMPLinearClause(NumVars);
----------------
Formatting error ^.^


================
Comment at: lib/AST/OpenMPClause.cpp:477
 
+OMPClause::child_range OMPLinearClause::used_children() {
+  // Range includes only non-nullptr elements.
----------------
This function name almost makes me slightly uncomfortable -___-"


================
Comment at: test/OpenMP/distribute_parallel_for_simd_linear_messages.cpp:9
+  int i;
+#pragma omp distribute parallel for simd linear(i)
+  for (i = 0; i < 10; ++i)
----------------
I see you guys don't do the `// no-warning` thing very often? 'Cause even if it's meaningless for `VerifyDiagnosticsConsumer`, i find it pretty useful when reading other people's tests and trying to figure out what they were about. I.e., if somebody accidentally breaks your machinery and they see a warning on this test, it would be nice if they immediately understand that this is a false positive and they need to go fix their code rather than add an `// expected-warning`.


Repository:
  rC Clang

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D65461/new/

https://reviews.llvm.org/D65461





More information about the cfe-commits mailing list