[PATCH] [OPENMP] parsing 'linear' clause (for directive 'omp simd')

hfinkel at anl.gov hfinkel at anl.gov
Sun Apr 20 20:58:05 PDT 2014

  With some improvement to the warning message, LGTM.

Comment at: include/clang/Basic/DiagnosticSemaKinds.td:6931
@@ +6930,3 @@
+def warn_omp_linear_step_zero : Warning<
+  "zero linear step - probably it is not nesessary to have the clause here">,
+  InGroup<OpenMPClauses>;
The comment on the code that generates the warning says,
    // Warn about zero linear step (it would be probably better specified as
    // making corresponding variables 'const').

and I think that would make a better warning than what you have here. The "probably it is not necessary" language I think is likely going to be confusing (because the user will wonder under what circumstances such a construct might be needed).

How about, "zero linear step (%0 should probably be const)"


More information about the cfe-commits mailing list