[cfe-commits] adding attribute no_address_safety_analysis, please review

Chandler Carruth chandlerc at google.com
Tue Jan 24 10:52:52 PST 2012

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. =]
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20120124/9f6ecd77/attachment.html>

More information about the cfe-commits mailing list