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



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to