[PATCH] D77290: [OpenMP] Specialize OpenMP calls after template instantiation
Erich Keane via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Tue Apr 7 10:19:05 PDT 2020
erichkeane added inline comments.
================
Comment at: clang/lib/Sema/TreeTransform.h:2414
Expr *ExecConfig = nullptr) {
- return getSema().BuildCallExpr(/*Scope=*/nullptr, Callee, LParenLoc, Args,
- RParenLoc, ExecConfig);
+ ExprResult Result = getSema().BuildCallExpr(
+ /*Scope=*/nullptr, Callee, LParenLoc, Args, RParenLoc, ExecConfig);
----------------
It seems to me that this logic would better fit in 'ActOnCallExpr' if at all possible, and RebuildCallExpr should just call ActOnCallExpr. I see there is a warning implemented there (a strange place for that), but if this doesn't cause conflicts I would expect that to be the behavior here.
================
Comment at: clang/lib/Sema/TreeTransform.h:2418
+ if (!getSema().getLangOpts().OpenMP || !Result.isUsable() ||
+ !isa<CallExpr>(Result.get()))
+ return Result;
----------------
What would BuildCallExpr return that is both valid/usable and NOT a callexpr? I'm not sure this check needs to be here.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D77290/new/
https://reviews.llvm.org/D77290
More information about the cfe-commits
mailing list