diff options
Diffstat (limited to 'clang/docs/MemorySanitizer.rst')
-rw-r--r-- | clang/docs/MemorySanitizer.rst | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/clang/docs/MemorySanitizer.rst b/clang/docs/MemorySanitizer.rst index 6ede1c36e02..fdb8a810232 100644 --- a/clang/docs/MemorySanitizer.rst +++ b/clang/docs/MemorySanitizer.rst @@ -80,6 +80,19 @@ whether MemorySanitizer is enabled. :ref:`\_\_has\_feature # endif #endif +``__attribute__((no_sanitize_memory))`` +----------------------------------------------- + +Some code should not be checked by MemorySanitizer. +One may use the function attribute +:ref:`no_sanitize_memory <langext-memory_sanitizer>` +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)``. Note: currently, this attribute will be +lost if the function is inlined. + Origin Tracking =============== |