================
@@ -6594,6 +6603,16 @@ ExprResult Sema::BuildCallExpr(Scope *Scope, Expr *Fn,
SourceLocation LParenLoc,
*this, dyn_cast<UnresolvedMemberExpr>(Fn->IgnoreParens()),
Fn->getBeginLoc());
+ if (!Fn->getType()->isDependentType()) {
+ // If the type of the function itself is not dependent
+ // check that it is a reasonable as a function, as type deduction
+ // later assume the CallExpr has a sensible TYPE.
+ if (!MayBeFunctionType(Context, Fn->getType()))
----------------
erichkeane wrote:
I might suggest putting these in teh same 'if' to make it more obvious what is
happening (or perhaps have `MayBeFunctionType` return `true` for a dependent
type?
https://github.com/llvm/llvm-project/pull/138731
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits