[clang] [sanitizer][NFCI] Document interaction of inlining with disabling instrumentation (PR #177672)

Marco Elver via cfe-commits cfe-commits at lists.llvm.org
Fri Jan 23 13:51:06 PST 2026


================
@@ -248,12 +248,26 @@ compilers, so we suggest to use it together with
 The same attribute used on a global variable prevents AddressSanitizer
 from adding redzones around it and detecting out of bounds accesses.
 
-
 AddressSanitizer also supports
 ``__attribute__((disable_sanitizer_instrumentation))``. This attribute
 works similarly to ``__attribute__((no_sanitize("address")))``, but it also
 prevents instrumentation performed by other sanitizers.
 
+Interaction of Inlining with Disabling Sanitizer Instrumentation
+-----------------------------------------------------------------
+
+* `no_sanitize` functions will not be inlined heuristically by the compiler.
----------------
melver wrote:

no_sanitize can be inlined into other no_sanitize, so this is somewhat wrong. The notes I wrote to you somewhere capture the nuances, so I'd try to convey as much of that.

https://github.com/llvm/llvm-project/pull/177672


More information about the cfe-commits mailing list