================
@@ -2510,12 +2542,15 @@ static bool IsStandardConversion(Sema &S, Expr* From, 
QualType ToType,
 
   SCS.setToType(2, FromType);
 
-  if (CanonFrom == CanonTo)
-    return true;
-
   // If we have not converted the argument type to the parameter type,
   // this is a bad conversion sequence, unless we're resolving an overload in 
C.
-  if (S.getLangOpts().CPlusPlus || !InOverloadResolution)
+  //
+  // Permit conversions from a function without `cfi_unchecked_callee` to a
+  // function with `cfi_unchecked_callee`.
+  if (CanonFrom == CanonTo || S.AddingCFIUncheckedCallee(CanonFrom, CanonTo))
+    return true;
+
+  if ((S.getLangOpts().CPlusPlus || !InOverloadResolution))
     return false;
----------------
brunodf-snps wrote:

I think there is still a bug here: allowing the check of `CanonFrom == CanonTo` 
to be bypassed when `AddingCFIUncheckedCallee` creates a hole in semantic 
checking, see issue #162798.

https://github.com/llvm/llvm-project/pull/135836
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to