ABataev added a comment.

In D72811#1843066 <https://reviews.llvm.org/D72811#1843066>, @cchen wrote:

> 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?


Check how compiler handles mapping of `this[0:1]`, which is the same as `*this`.



================
Comment at: clang/lib/Sema/SemaOpenMP.cpp:16007
+    if (!RE->IgnoreParenImpCasts()->isLValue() &&
+        (MLValue != clang::Expr::isModifiableLvalueResult::MLV_LValueCast)) {
       SemaRef.Diag(ELoc,
----------------
cchen wrote:
> 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`.
Are they the lvalues according to the standard? If not, no need for this 
analysis.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D72811



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

Reply via email to