[PATCH] Capability attributes on a typedef

Aaron Ballman aaron at aaronballman.com
Mon Mar 24 07:31:20 PDT 2014


This patch allows a capability attribute to be declared on a typedef
declaration (as a declaration attribute, not a type attribute). Eg)
typedef int __attribute__((capability("role"))) ThreadRole;

This is necessary for a WIP for Boolean expressions involving
capability attributes in C, where there are not operator overloads
that we can use. Eg) void func(void)
__attribute__((requires_capability(!SomeCap)));

This patch removes an existing diagnostic because it no longer
applies, which is why there is a fair amount of testcase churn.

~Aaron
-------------- next part --------------
A non-text attachment was scrubbed...
Name: CapabilityInt.patch
Type: application/octet-stream
Size: 25468 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20140324/e33ce944/attachment.obj>


More information about the cfe-commits mailing list