My primary desire is that we use consistent naming for the attributes across sanitizers. I'm a little concerned about the proliferation of attributes this will create -- we currently have 26 different -fsanitize=<foo> values, and presumably we will want attributes covering all of them eventually. My counter-proposal is __attribute__((no_sanitize("address"))), but it's sufficiently superficial that I don't really care very much. I'm happy for this to go ahead either way.<div>
<div><br><div class="gmail_quote">On Fri, Feb 22, 2013 at 5:29 AM, Chandler Carruth <span dir="ltr"><<a href="mailto:chandlerc@gmail.com" target="_blank">chandlerc@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div dir="ltr">FYI, Richard Smith had more strong feelings about the Clang attributes than I did. It was still in the vein of consolidating on a single predictable pattern, but I'll defer this patch to him to review in case he wants to tweak exactly what pattern that is. (I think he had more compelling arguments for using one attribute and 3 string literals, I leave that in his hands... =D)</div>

<div class="gmail_extra"><br><br><div class="gmail_quote"><div><div class="h5">On Fri, Feb 22, 2013 at 5:03 AM, Kostya Serebryany <span dir="ltr"><<a href="mailto:kcc@google.com" target="_blank">kcc@google.com</a>></span> wrote:<br>
</div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div class="h5">
Hi chandlerc, samsonov,<br>
<br>
These are two related changes (one in llvm, one in clang).<br>
LLVM:<br>
 -  rename address_safety => sanitize_address (the enum value is the same, so we preserve binary compatibility with old bitcode)<br>
 - rename thread_safety => sanitize_thread<br>
 - rename no_uninitialized_checks -> sanitize_memory<br>
<br>
CLANG:<br>
  - add __attribute__((no_sanitize_address)) as a synonym for __attribute__((no_address_safety_analysis))<br>
  - add __attribute__((no_sanitize_thread))<br>
  - add __attribute__((no_sanitize_memory))<br>
<br>
for S in address thread memory<br>
   If -fsanitize=S is present and __attribute__((no_sanitize_S)) is not<br>
       set llvm attribute sanitize_S<br>
<br>
<a href="http://llvm-reviews.chandlerc.com/D449" target="_blank">http://llvm-reviews.chandlerc.com/D449</a><br>
<br>
Files:<br>
  test/CodeGenObjCXX/<a href="http://address-safety-attr.mm" target="_blank">address-safety-attr.mm</a><br>
  test/CodeGen/address-safety-attr.cpp<br>
  test/CodeGen/sanitize-thread-attr.cpp<br>
  test/SemaCXX/attr-no-sanitize-address.cpp<br>
  test/SemaCXX/attr-no-sanitize-thread.cpp<br>
  test/SemaCXX/attr-no-sanitize-memory.cpp<br>
  include/clang/Basic/Attr.td<br>
  docs/MemorySanitizer.rst<br>
  docs/LanguageExtensions.rst<br>
  docs/AddressSanitizer.rst<br>
  docs/ThreadSanitizer.rst<br>
  lib/CodeGen/CGDeclCXX.cpp<br>
  lib/CodeGen/CodeGenModule.cpp<br>
  lib/Sema/SemaDeclAttr.cpp<br>
<br></div></div>_______________________________________________<br>
cfe-commits mailing list<br>
<a href="mailto:cfe-commits@cs.uiuc.edu" target="_blank">cfe-commits@cs.uiuc.edu</a><br>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits</a><br>
<br></blockquote></div><br></div>
<br>_______________________________________________<br>
llvm-commits mailing list<br>
<a href="mailto:llvm-commits@cs.uiuc.edu">llvm-commits@cs.uiuc.edu</a><br>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits</a><br>
<br></blockquote></div><br></div></div>