[PATCH] OpenMP threadprivate with qualified names.

Doug Gregor dgregor at apple.com
Wed May 1 21:32:58 PDT 2013


  With a BalancedDelimiterTracker fix, this is good to go.


================
Comment at: lib/Parse/ParseOpenMP.cpp:81
@@ +80,3 @@
+  bool LParen = true;
+  if (Tok.isNot(tok::l_paren)) {
+    Diag(Tok, diag::err_expected_lparen_after)
----------------
Alexey Bataev wrote:
> Doug Gregor wrote:
> > Why did you remove the BalancedDelimiterTracker?
> BalancedDelimiterTracker is not suitable for parsing constructs without final semicolon. It expects semicolon at the end of the construct. But we use special annotation token 'annot_openmp_end'. If there is an error found during parsing (for example, no closing paren) it skips all tokens until the semicolon is found, not this annotation token. That's why I can't use BalancedDelimiterTracker.
BalancedDelimiterTracker can be fixed to deal with this case. Just give it another parameter to specify whether to stop at the annotation token rather than stopping at semicolon. It's better to generalize than duplicate.


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



More information about the cfe-commits mailing list