[clang] nonblocking/nonallocating attributes (was: nolock/noalloc) (PR #84983)
Aaron Ballman via cfe-commits
cfe-commits at lists.llvm.org
Thu May 16 06:16:43 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?
----------------
AaronBallman wrote:
I think I'm a bit surprised that `IsFunctionConversion()` would need this logic as opposed to `MergeFunctionDecl()` handling it. Testing whether something is a function conversion doesn't seem like a time when we know we need to add or drop effects, it's only after we've decided to do something about the function conversion that would need that, right?
https://github.com/llvm/llvm-project/pull/84983
More information about the cfe-commits
mailing list