]> granicus.if.org Git - clang/commitdiff
Update comment for AdditionalMembers with a note to avoid using
authorEric Christopher <echristo@gmail.com>
Wed, 2 Sep 2015 20:13:41 +0000 (20:13 +0000)
committerEric Christopher <echristo@gmail.com>
Wed, 2 Sep 2015 20:13:41 +0000 (20:13 +0000)
additional data members in attributes as they'll leak and provide
some guidance as to where they should be allocated if necessary.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@246701 91177308-0d34-0410-b5e6-96231b3b80d8

include/clang/Basic/Attr.td

index 8523ed92a7104f0afeeacee6d5f462d245b4f211..58d82ae326ab3ca80cecba3ffc2cb960c77d1cf0 100644 (file)
@@ -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