================
@@ -17531,6 +17531,10 @@ bool Sema::DiagnoseAssignmentResult(AssignConvertType 
ConvTy,
     // Perform array-to-pointer decay if necessary.
     if (SrcType->isArrayType()) SrcType = Context.getArrayDecayedType(SrcType);
 
+    // Perform function-to-pointer decay if necessary.
+    if (SrcType->isFunctionType())
+      SrcType = Context.getDecayedType(SrcType);
+
----------------
ojhunt wrote:

For both of these cases I think you can replace them with something like

```cpp
    // Perform array- or function-to-pointer decay if necessary.
    if (SrcType->isArrayType() || SrcType->isFunctionType())
      SrcType = Context.getDecayedType(SrcType);
```



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