[cfe-commits] [PATCH] Instantiate dependent attributes in template code.
Delesley Hutchins
delesley at google.com
Tue Dec 13 15:08:53 PST 2011
This patch modifies Sema::InstantiateAttrs so that attributes in
template code are properly instantiated; the previous behavior was to
clone them. The main motivation for the patch are thread safety
attributes, which make extensive use of expressions.
A new method named instantiateFromTemplate is now generated for all
attributes. The behavior of this method is identical to clone() for
all arguments except ExprArgument and VariadicExprArgument;
expression arguments are instantiated rather than cloned.
Features still on the todo list are:
(1) Instantiate type arguments as well as expressions. This will
affect attributes other than thread-safety, so I wanted to get
feedback before implementing it.
(2) Move handling of the aligned attribute to the new mechanism.
Patch can be found at:
http://codereview.appspot.com/5488067/
--
DeLesley Hutchins | Software Engineer | delesley at google.com | 505-206-0315
-------------- next part --------------
A non-text attachment was scrubbed...
Name: clang-template-attribute.patch
Type: text/x-patch
Size: 13008 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20111213/e8dc8253/attachment.bin>
More information about the cfe-commits
mailing list