[PATCH] [OPENMP] 'if' clause support

Alexey Bataev a.bataev at hotmail.com
Mon Feb 10 19:26:29 PST 2014



================
Comment at: lib/Parse/ParseOpenMP.cpp:343
@@ +342,3 @@
+                                             T.getOpenLocation(),
+                                             Tok.getLocation());
+}
----------------
Dmitri Gribenko wrote:
> Tok.getLocation() should be T.getCloseLocation()?
> 
Yes, thanks.

================
Comment at: test/OpenMP/parallel_if_messages.cpp:21
@@ +20,3 @@
+  #pragma omp parallel if (S1) // expected-error {{'S1' does not refer to a value}}
+  #pragma omp parallel if (argv[1]=2) // expected-error {{expected ')'}} expected-note {{to match this '('}}
+  foo();
----------------
Dmitri Gribenko wrote:
> Could you add where an incomplete 'if' is not at the end of the directive?
> 
> #pragma omp parallel if ( if ( foo (bar)
> 
> this should reasonable recovery now that the parser uses BalancedDelimiterTracker.
Ok, I will add test for it.


http://llvm-reviews.chandlerc.com/D2719



More information about the cfe-commits mailing list