cchen marked an inline comment as done. cchen added inline comments.
================ Comment at: clang/lib/Sema/SemaOpenMP.cpp:15235 + bool VisitUnaryOperator(UnaryOperator *UO) { + DerefCnt++; + CurComponents.emplace_back(UO, nullptr); ---------------- ABataev wrote: > cchen wrote: > > cchen wrote: > > > ABataev wrote: > > > > Need a check that this is a dereference op. Also, maybe allow using an > > > > addr_of operation? > > > is addr_of operation allowed in lvalue? > > > > > > In this code: > > > ``` > > > int arr[50]; > > > > > > #pragma omp target map(&arr) > > > {} > > > ``` > > > We now reject `&arr` since `RE->IgnoreParenImpCasts()->isLValue()` return > > > false. (RE is the expr of `&arr`) > > BTW, `RE->isLValue()` also return false in this case. > I'm not saying that `&var` must be allowed, but something like `*(&var)`. Of > course, just `&var` is an rvalue. Got it, thanks for the clarification! 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