aaron.ballman added inline comments.

================
Comment at: include/clang/Basic/Attr.td:2279
@@ +2278,3 @@
+  let Spellings = [GNU<"overallocated">, CXX11<"clang", "overallocated">];
+  let Subjects = SubjectList<[Record], ErrorDiag, "ExpectedStructOrUnion">;
+  let Documentation = [OverAllocatedDocs];
----------------
Can drop the "Expected" string literal. A record type should automatically do 
the right thing.

================
Comment at: lib/Sema/SemaDeclAttr.cpp:4932
@@ -4931,1 +4931,3 @@
 
+static void handleOverAllocatedAttr(Sema &S, Decl *D, const AttributeList 
&Attr) {
+  D->addAttr(::new (S.Context)
----------------
This isn't required.

================
Comment at: lib/Sema/SemaDeclAttr.cpp:5404
@@ +5403,3 @@
+  case AttributeList::AT_OverAllocated:
+    handleOverAllocatedAttr(S, D, Attr);
+    break;
----------------
Can just call `handleSimpleAttribute()` instead.


http://reviews.llvm.org/D21453



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to