================
@@ -9283,8 +9283,14 @@ static AssignConvertType
checkPointerTypesForAssignment(Sema &S,
return AssignConvertType::IncompatibleFunctionPointer;
return AssignConvertType::IncompatiblePointer;
}
- if (!S.getLangOpts().CPlusPlus && S.IsFunctionConversion(ltrans, rtrans))
- return AssignConvertType::IncompatibleFunctionPointer;
+ bool DiscardingCFIUncheckedCallee, AddingCFIUncheckedCallee;
+ if (!S.getLangOpts().CPlusPlus &&
+ S.IsFunctionConversion(ltrans, rtrans, &DiscardingCFIUncheckedCallee,
+ &AddingCFIUncheckedCallee)) {
+ // Allow conversions between CFIUncheckedCallee-ness.
+ if (!DiscardingCFIUncheckedCallee && !AddingCFIUncheckedCallee)
+ return AssignConvertType::IncompatibleFunctionPointer;
+ }
----------------
brunodf-snps wrote:
Follow up in #160474 and #160477, please review.
https://github.com/llvm/llvm-project/pull/135836
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits