[cfe-commits] adding attribute no_address_safety_analysis, please review

Kostya Serebryany kcc at google.com
Tue Jan 24 11:30:26 PST 2012

On Tue, Jan 24, 2012 at 10:52 AM, Chandler Carruth <chandlerc at google.com>wrote:

> Sorry for the delay.
> On Fri, Jan 20, 2012 at 1:38 PM, Kostya Serebryany <kcc at google.com> wrote:
>> Hello,
>> The following patch adds __attribute__((no_address_safety_analysis))
>> which will allow to disable
>> address safety analysis (such as e.g. AddressSanitizer or SAFECode) for a
>> specific function.
> At a high level, I'm not thrilled with the name of the attribute. I'd
> really like to have a common prefix, or some other structured naming
> scheme. However, I see that this matches the pattern of the thread_safety
> attributes, which in turn match GCC attributes. Since this is the GCC
> attribute syntax, that makes sense.
> For future reference, I'm hoping we can start enabling the use of C++11
> attributes in the not-too-distant future with Clang, and at that point
> we'll want to have a namespace for any address safety (or related)
> attributes. Might be good to think about what those should look like.
> The patch looks good with one exception: please add a template function
> and make sure that the instantiations pick up the attribute. I'm always a
> touch paranoid about the attribute/template interactions, although they're
> much better now than they were and everything should Just Work. ;] Feel
> free to commit if the template test cases work. =]

Thanks, r148842.
I extended the test with two template functions and verified that the
instances have the attribute only when needed.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20120124/9313222a/attachment.html>

More information about the cfe-commits mailing list