[PATCH] Only strip underscores for GNU attributes

Aaron Ballman aaron at aaronballman.com
Thu Dec 5 12:16:46 PST 2013


Currently, attribute names that have surrounding double underscores
will have them stripped silently when determining the attribute kind.
However, this doesn't make sense for all forms of attributes. For
instance: __declspec(__dllexport__) should not be a valid attribute
name, nor should [[__carries_dependency__]]

This patch checks the attribute form and only strips the underscores
for GNU attributes. However, it does also handle C++11-style GNU
attribute as well, because there are existing test cases checking for
that. Do we want to have the same behavior for C++11-style clang
attributes?

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


More information about the cfe-commits mailing list