[clang] [Docs][TySan] Correct optimisation remarks (PR #205577)

Matthew Nagy via cfe-commits cfe-commits at lists.llvm.org
Mon Sep 14 02:18:39 PDT 2026


https://github.com/gbMattN updated https://github.com/llvm/llvm-project/pull/205577

>From f84a3a373397688a60c705478f682b6415841dbb Mon Sep 17 00:00:00 2001
From: gbMattN <matthew.nagy at sony.com>
Date: Mon, 14 Sep 2026 10:18:20 +0100
Subject: [PATCH] [Docs][TySan] Correct optimisation remarks

---
 clang/docs/TypeSanitizer.md | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/clang/docs/TypeSanitizer.md b/clang/docs/TypeSanitizer.md
index 39f6194dc8e76b..f6e8f9686915c8 100644
--- a/clang/docs/TypeSanitizer.md
+++ b/clang/docs/TypeSanitizer.md
@@ -71,8 +71,8 @@ $ cmake -DCMAKE_BUILD_TYPE=Release -DLLVM_ENABLE_PROJECTS="clang" -DLLVM_ENABLE_
 
 Compile and link your program with `-fsanitize=type` flag. The
 TypeSanitizer run-time library should be linked to the final executable, so
-make sure to use `clang` (not `ld`) for the final link step. To
-get a reasonable performance add `-O1` or higher.
+make sure to use ``clang`` (not ``ld``) for the final link step. To increase performance, you can optimise with ``-O1``.
+Higher levels of optimization may result in false-negatives as incorrect code fragments may get optimized out incorrectly.
 TypeSanitizer by default doesn't print the full stack trace in error messages. Use `TYSAN_OPTIONS=print_stacktrace=1`
 to print the full trace. To get nicer stack traces in error messages add `-fno-omit-frame-pointer` and
 `-g`. To get perfect stack traces you may need to disable inlining (just use `-O1`) and tail call elimination



More information about the cfe-commits mailing list