[PATCH] D55212: Handle alloc_size attribute on function pointers

Aaron Ballman via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Dec 10 11:59:24 PST 2018


aaron.ballman added inline comments.


================
Comment at: test/Misc/pragma-attribute-supported-attributes-list.test:15
+// FIXME: After changing the subject from Function to HasFunctionProto, AllocSize is no longer listed (similar to Format, etc)
+// FIXME-NEXT: AllocSize (SubjectMatchRule_function)
 // CHECK-NEXT: AlwaysDestroy (SubjectMatchRule_variable)
----------------
arichardson wrote:
> This seems to also affect __attribute((format)) and others so I'm not sure whether removing AllocSize from this list is a blocker for this patch.
I believe you may need to add an `AttrSubjectMatcherSubRule` in Attr.td to expose the attribute for `#pragma clang attribute` support. Can you see if you can support it instead of shrinking this list? Otherwise, I worry that this change will break code that was using the pragma to apply the attribute to declarations.


Repository:
  rC Clang

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D55212/new/

https://reviews.llvm.org/D55212





More information about the cfe-commits mailing list