[PATCH] D84304: [AST][RecoveryExpr] Part 2: Build dependent callexpr in C for error-recovery.

Haojian Wu via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Oct 7 03:22:03 PDT 2020


hokein added inline comments.


================
Comment at: clang/lib/Sema/SemaExpr.cpp:6444
+               "should only occur in error-recovery path.");
+    return CallExpr::Create(Context, Fn, ArgExprs, Context.DependentTy,
+                            VK_RValue, RParenLoc);
----------------
sammccall wrote:
> sammccall wrote:
> > Is this really the right place vs in BuildResolvedCallExpr?
> why DependentTy? shouldn't it be the return type of the function, if available?
> Is this really the right place vs in BuildResolvedCallExpr?

BuildResolvedCallExpr does some semantic analysis/check, it might emit diagnostics, which we want to avoid. And putting the logic here also aligns with what C++ code path does.

> why DependentTy? shouldn't it be the return type of the function, if available?

oh, yeah, I missed this. Added.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D84304



More information about the cfe-commits mailing list