r246701 - Update comment for AdditionalMembers with a note to avoid using

Aaron Ballman via cfe-commits cfe-commits at lists.llvm.org
Wed Sep 2 13:15:34 PDT 2015


On Wed, Sep 2, 2015 at 4:13 PM, Eric Christopher via cfe-commits
<cfe-commits at lists.llvm.org> wrote:
> Author: echristo
> Date: Wed Sep  2 15:13:41 2015
> New Revision: 246701
>
> URL: http://llvm.org/viewvc/llvm-project?rev=246701&view=rev
> Log:
> Update comment for AdditionalMembers with a note to avoid using
> additional data members in attributes as they'll leak and provide
> some guidance as to where they should be allocated if necessary.

Thank you for this!

~Aaron

>
> Modified:
>     cfe/trunk/include/clang/Basic/Attr.td
>
> Modified: cfe/trunk/include/clang/Basic/Attr.td
> URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Basic/Attr.td?rev=246701&r1=246700&r2=246701&view=diff
> ==============================================================================
> --- cfe/trunk/include/clang/Basic/Attr.td (original)
> +++ cfe/trunk/include/clang/Basic/Attr.td Wed Sep  2 15:13:41 2015
> @@ -290,6 +290,8 @@ class Attr {
>    // attribute to be applicable. If empty, no language options are required.
>    list<LangOpt> LangOpts = [];
>    // Any additional text that should be included verbatim in the class.
> +  // Note: Any additional data members will leak and should be constructed
> +  // externally on the ASTContext.
>    code AdditionalMembers = [{}];
>    // Any documentation that should be associated with the attribute. Since an
>    // attribute may be documented under multiple categories, more than one
>
>
> _______________________________________________
> cfe-commits mailing list
> cfe-commits at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


More information about the cfe-commits mailing list