[PATCH] D99905: [OPENMP51]Initial parsing/sema for adjust_args clause for 'declare variant'

Aaron Ballman via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Apr 9 05:01:03 PDT 2021


aaron.ballman added inline comments.


================
Comment at: clang/lib/Sema/SemaOpenMP.cpp:7109
+    E = E->IgnoreParenImpCasts();
+    if (const auto *DRE = dyn_cast<DeclRefExpr>(E)) {
+      if (const auto *PVD = dyn_cast<ParmVarDecl>(DRE->getDecl())) {
----------------
mikerice wrote:
> aaron.ballman wrote:
> > Do we have to worry about things like `MemberExpr` as well?
> I don't think so, or maybe I don't understand the question.  They can specify only function parameters here and anything else is an error.  It is also an error if the function parameter is specified more than once.
> I don't think so, or maybe I don't understand the question.
It's most likely my near-complete ignorance of OpenMP showing through. :-D

> They can specify only function parameters here and anything else is an error.
Ah, I was thinking they could refer to a member of a parameter. e.g., `void foo(SomeStruct S);` and they could refer to `S.Whatever`. But it sounds like that's explicitly not allowed?


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

https://reviews.llvm.org/D99905



More information about the llvm-commits mailing list