[PATCH] D77290: [OpenMP] Specialize OpenMP calls after template instantiation
Mike Rice via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Sat Apr 4 10:04:37 PDT 2020
mikerice added inline comments.
================
Comment at: clang/lib/Sema/SemaTemplateInstantiate.cpp:1693
+ExprResult TemplateInstantiator::TransformCallExpr(CallExpr *E) {
+ ExprResult R = TreeTransform<TemplateInstantiator>::TransformCallExpr(E);
+ if (!SemaRef.getLangOpts().OpenMP || !R.isUsable() || !isa<CallExpr>(R.get()))
----------------
Is there a reason you are adding this here as opposed to in the base class RebuildCallExpr? Are there cases where we rebuild call expressions that we don't want to do this variant processing?
================
Comment at: clang/lib/Sema/SemaTemplateInstantiate.cpp:1698
+ auto *CE = cast<CallExpr>(R.get());
+ return SemaRef.ActOnOpenMPCall(R, nullptr, CE->getRParenLoc(),
+ MultiExprArg(CE->getArgs(), CE->getNumArgs()),
----------------
Comments on nullptr arguments would be nice.
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