[PATCH] D72811: [WIP][OPENMP5.0] allow lvalue for motion clause

Chi Chun Chen via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Jan 27 13:50:57 PST 2020


cchen marked an inline comment as done.
cchen added a comment.

In D72811#1839561 <https://reviews.llvm.org/D72811#1839561>, @ABataev wrote:

> In D72811#1839538 <https://reviews.llvm.org/D72811#1839538>, @cchen wrote:
>
> > In D72811#1837392 <https://reviews.llvm.org/D72811#1837392>, @jdoerfert wrote:
> >
> > > Thanks for working on this! While you are at it, `*this` is probably one of the most important ones to test and support.
> >
> >
> > Can anyone tell me how to get `ValueDecl` from `CXXThisExpr`? I cannot find any method return decl in https://clang.llvm.org/doxygen/classclang_1_1CXXThisExpr.html#details.
> >  Thanks!
>
>
> CXXThisExpr is an expression without associated declaration.


Then which kind of thing should I sent to `CurComponents` if we do not have associated declaration for CXXThisExpr? We can't just send nullptr, right?



================
Comment at: clang/lib/Sema/SemaOpenMP.cpp:16007
+    if (!RE->IgnoreParenImpCasts()->isLValue() &&
+        (MLValue != clang::Expr::isModifiableLvalueResult::MLV_LValueCast)) {
       SemaRef.Diag(ELoc,
----------------
ABataev wrote:
> Why `MLV_LValueCast` must be allowed here?
I'm doing this since `isLValue` return false for either C style casting CXX style casting and `MLV_LValueCast` can categorize these two  as `MLV_LValueCast`.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D72811





More information about the cfe-commits mailing list