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)
2954
2954
FinalType->isInstantiationDependentType () || FinalType->isUndeducedType ())
2955
2955
return false ;
2956
2956
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
+
2957
2976
if (auto RT = FinalType->getAs <clang::RecordType>())
2958
2977
if (!HasLayout (RT->getDecl ()))
2959
2978
return false ;
You can’t perform that action at this time.
0 commit comments