[PATCH] D98558: [OPENMP51]Initial support for the interop directive

Mike Rice via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Mar 16 19:45:49 PDT 2021


mikerice added inline comments.


================
Comment at: clang/lib/Sema/SemaOpenMP.cpp:14711
+  QualType VarType =
+      InteropVarExpr->getType().getNonLValueExprType(SemaRef.Context);
+  if (!SemaRef.Context.hasSameType(InteropType, VarType)) {
----------------
ABataev wrote:
> mikerice wrote:
> > ABataev wrote:
> > > I don't think you need to call `getNonLValueExprType()` here since `InteropVarExpr` is an expression already.
> > Just needs the unqualified type.
>  What if `init` clause is applied to `const` qualified var? Is this allowed?
No it isn't allowed, but that is checked below and 'VarType' is not used there, it uses the fully qualified type from the original expression.


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

https://reviews.llvm.org/D98558



More information about the llvm-commits mailing list