r285349 - [docs] Update the TSan and MSan docs to refer to the new no_sanitize attribute

Anna Zaks via cfe-commits cfe-commits at lists.llvm.org
Thu Oct 27 14:38:44 PDT 2016


Author: zaks
Date: Thu Oct 27 16:38:44 2016
New Revision: 285349

URL: http://llvm.org/viewvc/llvm-project?rev=285349&view=rev
Log:
[docs] Update the TSan and MSan docs to refer to the new no_sanitize attribute

TSan and MSan were the only remaining sanitizers referring to the deprecated
attribute for issue suppression. Update the docs to recommend
__attribute__((no_sanitize("..."))) instead.

Differential Revision: https://reviews.llvm.org/D25885

Modified:
    cfe/trunk/docs/MemorySanitizer.rst
    cfe/trunk/docs/ThreadSanitizer.rst

Modified: cfe/trunk/docs/MemorySanitizer.rst
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/docs/MemorySanitizer.rst?rev=285349&r1=285348&r2=285349&view=diff
==============================================================================
--- cfe/trunk/docs/MemorySanitizer.rst (original)
+++ cfe/trunk/docs/MemorySanitizer.rst Thu Oct 27 16:38:44 2016
@@ -76,14 +76,14 @@ whether MemorySanitizer is enabled. :ref
     #  endif
     #endif
 
-``__attribute__((no_sanitize_memory))``
+``__attribute__((no_sanitize("memory")))``
 -----------------------------------------------
 
 Some code should not be checked by MemorySanitizer.  One may use the function
-attribute `no_sanitize_memory` to disable uninitialized checks in a particular
-function.  MemorySanitizer may still instrument such functions to avoid false
-positives.  This attribute may not be supported by other compilers, so we
-suggest to use it together with ``__has_feature(memory_sanitizer)``.
+attribute ``no_sanitize("memory")`` to disable uninitialized checks in a
+particular function.  MemorySanitizer may still instrument such functions to
+avoid false positives.  This attribute may not be supported by other compilers,
+so we suggest to use it together with ``__has_feature(memory_sanitizer)``.
 
 Blacklist
 ---------

Modified: cfe/trunk/docs/ThreadSanitizer.rst
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/docs/ThreadSanitizer.rst?rev=285349&r1=285348&r2=285349&view=diff
==============================================================================
--- cfe/trunk/docs/ThreadSanitizer.rst (original)
+++ cfe/trunk/docs/ThreadSanitizer.rst Thu Oct 27 16:38:44 2016
@@ -83,11 +83,11 @@ this purpose.
     #  endif
     #endif
 
-``__attribute__((no_sanitize_thread))``
+``__attribute__((no_sanitize("thread")))``
 -----------------------------------------------
 
 Some code should not be instrumented by ThreadSanitizer.  One may use the
-function attribute `no_sanitize_thread` to disable instrumentation of plain
+function attribute ``no_sanitize("thread")`` to disable instrumentation of plain
 (non-atomic) loads/stores in a particular function.  ThreadSanitizer still
 instruments such functions to avoid false positives and provide meaningful stack
 traces.  This attribute may not be supported by other compilers, so we suggest
@@ -99,9 +99,9 @@ Blacklist
 ThreadSanitizer supports ``src`` and ``fun`` entity types in
 :doc:`SanitizerSpecialCaseList`, that can be used to suppress data race reports
 in the specified source files or functions. Unlike functions marked with
-`no_sanitize_thread` attribute, blacklisted functions are not instrumented at
-all. This can lead to false positives due to missed synchronization via atomic
-operations and missed stack frames in reports.
+``no_sanitize("thread")`` attribute, blacklisted functions are not instrumented
+at all. This can lead to false positives due to missed synchronization via
+atomic operations and missed stack frames in reports.
 
 Limitations
 -----------




More information about the cfe-commits mailing list