ABataev added inline comments.

================
Comment at: clang/lib/Parse/ParseExpr.cpp:1933
         }
+        if (getLangOpts().OpenMP >= 50 && Tok.is(tok::colon)) {
+          // Consume ':'
----------------
cchen wrote:
> cchen wrote:
> > ABataev wrote:
> > > You need to insert an additional check for `OMPClauseKind == 
> > > llvm::omp::Clause::OMPC_to || OMPClauseKind == 
> > > llvm::omp::Clause::OMPC_from` here. I.e. we shall expect stride not only 
> > > if the version is 5.0, but also if the current clauses is `to` or `from`
> > Got it, I was thinking that we might want to emit diagnostic message for 
> > OpenMP version < 50. Thanks for your explaination.
> Just want to make sure the error message for OpenMP5.0, for this case: 
> `#pragma omp target data map(to: marr[10][0:2:2])`.
> 
> OpenMP45:
> We don't expect stride at all, so we only emit the error message expecting 
> ']' just as before.
> 
> OpenMP50:
> Should I emit the new error message to inform user that stride can not use in 
> clause other than to or from?
> 
> Thanks.
I think, the same behavior just like for OpenMP 4.5 should be fine here since 
stride is not allowed.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D82800



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to