[clang] nonblocking/nonallocating attributes (was: nolock/noalloc) (PR #84983)

Doug Wyatt via cfe-commits cfe-commits at lists.llvm.org
Mon May 6 12:22:45 PDT 2024


================
@@ -1870,6 +1870,28 @@ bool Sema::IsFunctionConversion(QualType FromType, QualType ToType,
       FromFn = QT->getAs<FunctionType>();
       Changed = true;
     }
+
+    // For C, when called from checkPointerTypesForAssignment,
+    // we need not to alter FromFn, or else even an innocuous cast
+    // like dropping effects will fail. In C++ however we do want to
+    // alter FromFn. TODO: Is this correct?
----------------
dougsonos wrote:

I think C ends up doing something similar but in a different place, `ASTContext::mergeFunctionTypes()`

https://github.com/llvm/llvm-project/pull/84983


More information about the cfe-commits mailing list