File tree Expand file tree Collapse file tree 1 file changed +19
-0
lines changed Expand file tree Collapse file tree 1 file changed +19
-0
lines changed Original file line number Diff line number Diff line change @@ -2954,6 +2954,25 @@ bool Parser::CanCheckCodeGenInfo(clang::Sema& S, const clang::Type* Ty)
29542954 FinalType->isInstantiationDependentType () || FinalType->isUndeducedType ())
29552955 return false ;
29562956
2957+ if (FinalType->isFunctionType ())
2958+ {
2959+ auto FTy = FinalType->getAs <clang::FunctionType>();
2960+ auto CanCheck = CanCheckCodeGenInfo (S, FTy->getReturnType ().getTypePtr ());
2961+ if (!CanCheck)
2962+ return false ;
2963+
2964+ if (FinalType->isFunctionProtoType ())
2965+ {
2966+ auto FPTy = FinalType->getAs <clang::FunctionProtoType>();
2967+ for (const auto & ParamType : FPTy->getParamTypes ())
2968+ {
2969+ auto CanCheck = CanCheckCodeGenInfo (S, ParamType.getTypePtr ());
2970+ if (!CanCheck)
2971+ return false ;
2972+ }
2973+ }
2974+ }
2975+
29572976 if (auto RT = FinalType->getAs <clang::RecordType>())
29582977 if (!HasLayout (RT->getDecl ()))
29592978 return false ;
You can’t perform that action at this time.
0 commit comments