================
@@ -17528,8 +17528,9 @@ bool Sema::DiagnoseAssignmentResult(AssignConvertType 
ConvTy,
     }
     break;
   case AssignConvertType::IncompatiblePointerDiscardsQualifiers: {
-    // Perform array-to-pointer decay if necessary.
-    if (SrcType->isArrayType()) SrcType = Context.getArrayDecayedType(SrcType);
+    // Perform decay if necessary.
+    if (SrcType->isArrayType() || SrcType->isFunctionType())
+      SrcType = Context.getDecayedType(SrcType);
----------------
ojhunt wrote:

@cor3ntin @erichkeane I walked through the getDecayType() logic and I believe 
this is correct, but my generalized paranoia about decay means I'd like 
confirmation (or correction) from at least one other person :D

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

Reply via email to