[clang] [clang] Ignore GCC 11 `[[malloc(x)]]` attribute (PR #68059)

Timm Baeder via cfe-commits cfe-commits at lists.llvm.org
Mon Oct 2 21:08:02 PDT 2023


================
@@ -4122,6 +4122,9 @@ def RestrictDocs : Documentation {
 The ``malloc`` attribute indicates that the function acts like a system memory
 allocation function, returning a pointer to allocated storage disjoint from the
 storage for any other object accessible to the caller.
+
+The form of ``malloc`` with one or two arguments (supported by GCC 11) is
+currently ignored by Clang.
----------------
tbaederr wrote:

Is it really ignored or is it just treated as if it had no arguments?

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


More information about the cfe-commits mailing list