diff --git a/clang/lib/AST/Expr.cpp b/clang/lib/AST/Expr.cpp index 99e89aeafc242..4bfc4f082cd6a 100644 --- a/clang/lib/AST/Expr.cpp +++ b/clang/lib/AST/Expr.cpp @@ -1621,6 +1621,10 @@ QualType CallExpr::getCallReturnType(const ASTContext &Ctx) const { // This should never be overloaded and so should never return null. CalleeType = Expr::findBoundMemberType(Callee); assert(!CalleeType.isNull()); + } else if (CalleeType->isRecordType()) { + // If the Callee is a record type, then it is a not-yet-resolved + // dependent call to the call operator of that type. + return Ctx.DependentTy; } else if (CalleeType->isDependentType() || CalleeType->isSpecificPlaceholderType(BuiltinType::Overload)) { return Ctx.DependentTy; diff --git a/clang/test/SemaTemplate/temp_arg_nontype_cxx1z.cpp b/clang/test/SemaTemplate/temp_arg_nontype_cxx1z.cpp index 6ab9ecbfd573b..22788e1c1ffb3 100644 --- a/clang/test/SemaTemplate/temp_arg_nontype_cxx1z.cpp +++ b/clang/test/SemaTemplate/temp_arg_nontype_cxx1z.cpp @@ -603,3 +603,15 @@ namespace PR47792 { template void bar<>(); // expected-note {{previous explicit instantiation is here}} template void bar(); // expected-error {{duplicate explicit instantiation of 'bar<&PR47792::foo>'}} } + +namespace GH68024 { +template +struct s {}; + +struct { + void operator()(int); +} f; + +template +using a = s; +}