================
@@ -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);
----------------
NeKon69 wrote:
We can produce a test case for this (see first func declaration in the test
file), I wasn't able to produce a test case for
`IncompatiblePointerDiscardsOverflowBehavior` with function types
https://github.com/llvm/llvm-project/pull/183616
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits