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

Shafik Yaghmour via cfe-commits cfe-commits at lists.llvm.org
Mon Oct 9 15:20:56 PDT 2023


================
@@ -1629,6 +1629,8 @@ def IFunc : Attr, TargetSpecificAttr<TargetELF> {
 
 def Restrict : InheritableAttr {
   let Spellings = [Declspec<"restrict">, GCC<"malloc">];
+  let Args = [IdentifierArgument<"Deallocator", /*opt*/ 1>,
+              ParamIdxArgument<"DeallocatorPtrArgIndex", /*opt*/ 1>];
----------------
shafik wrote:

Nit: Unfortunately we have not been consistent through our codebase in argument comment format but e should strive to be consistent with [bugprone-argument-comment](https://clang.llvm.org/extra/clang-tidy/checks/bugprone/argument-comment.html)

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


More information about the cfe-commits mailing list