[cfe-commits] [PATCH] Add support for GNU attributes on function definitions.
Delesley Hutchins
delesley at google.com
Fri Jan 6 10:20:49 PST 2012
This patch adds support for parsing of GNU attributes on function
definitions, e.g. void foo() __attribute__(...) { ... }.
Such attributes arise in several cases:
(1) Functions that are defined without a prior declaration.
(2) Attributes that only make sense on a definition, e.g.
no_thread_safety_analysis.
(3) Thread safety attributes that must be put on the definition,
because controlling mutexes are not in scope at the point where the
function is declared.
In addition, this patch extends late parsing of attributes to cover
top-level functions. Late parsing previously worked only on methods.
Patch is enclosed, and also available at:
http://codereview.appspot.com/5517059/
-DeLesley
--
DeLesley Hutchins | Software Engineer | delesley at google.com | 505-206-0315
-------------- next part --------------
A non-text attachment was scrubbed...
Name: clang-function-definition-attributes3.patch
Type: application/octet-stream
Size: 13999 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20120106/670ee9aa/attachment.obj>
More information about the cfe-commits
mailing list