================
@@ -1868,6 +1868,28 @@ bool Sema::IsFunctionConversion(QualType FromType,
QualType ToType,
FromFn = QT->getAs<FunctionType>();
Changed = true;
}
+
+ if (getLangOpts().CPlusPlus) {
+ // For C, when called from checkPointerTypesForAssignment,
+ // we need not to change the type, or else even an innocuous cast
+ // like dropping effects will fail.
----------------
Sirraide wrote:
The condition of the `if` checks for C++, but the comment talks about doing
something differently if we’re compiling C; that doesn’t seem right to me.
https://github.com/llvm/llvm-project/pull/84983
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits