================ @@ -3646,6 +3646,14 @@ def Unavailable : InheritableAttr { let MeaningfulToClassTemplateDefinition = 1; } +def CanDiscard : InheritableAttr { + let Spellings = [CXX11<"clang", "candiscard">, + GCC<"candiscard">]; + let Subjects = SubjectList<[ObjCMethod, FunctionLike, TypedefName]>; ---------------- erichkeane wrote:
Are we sure about this subject list? `ObjCMethod` seems odd here, and `FunctionLike` ALSO allows this to be added to function/mem function pointers/references/etc. I suspect this whole list should just be `Function` + `TypedefName` (though maybe `Typedef` and `TypeAlias`, as including Objective C ParamDecls seems odd here). IF you leave any of the above, please make sure that ALL of the FunctionLike has well defined semantics/etc, and that the ObjectiveC types are tested/have well defined semantics. https://github.com/llvm/llvm-project/pull/154943 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits