[PATCH] D99905: [OPENMP51]Initial parsing/sema for adjust_args clause for 'declare variant'
Mike Rice via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Apr 8 14:10:27 PDT 2021
mikerice added a comment.
Thanks for taking a look at this.
================
Comment at: clang/lib/Parse/ParseOpenMP.cpp:1456
+ }
+ return false;
+ }
----------------
aaron.ballman wrote:
> Should this return `IsError`?
Possibly yes. If we return true we should cleanup the tokens before returning.
Returning false is probably okay here but we could end up with a bunch of cascading errors. I guess I prefer the former so I updated to that for a look.
================
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())) {
----------------
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.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D99905/new/
https://reviews.llvm.org/D99905
More information about the llvm-commits
mailing list