[PATCH] D74941: [OpenMP] `omp begin/end declare variant` - part 1, parsing

Johannes Doerfert via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Feb 21 08:04:57 PST 2020


jdoerfert marked 2 inline comments as done.
jdoerfert added inline comments.


================
Comment at: clang/lib/Parse/ParseOpenMP.cpp:1357-1359
+  // Skip last tokens.
+  while (Tok.isNot(tok::annot_pragma_openmp_end))
+    ConsumeAnyToken();
----------------
ABataev wrote:
> Better to emit a warning here about extra tokens at the end of the directive
I think I copied that at some point but I'll add a helper and a warning


================
Comment at: clang/lib/Parse/ParseOpenMP.cpp:1807
+        --Nesting;
+      if (DK == OMPD_begin_declare_variant)
+        ++Nesting;
----------------
kiranchandramohan wrote:
> Can there be an else here? Or is this the recommended style?
I can make it else if


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D74941





More information about the llvm-commits mailing list