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

via cfe-commits cfe-commits at lists.llvm.org
Tue Apr 9 08:58:50 PDT 2024


================
@@ -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


More information about the cfe-commits mailing list