[clang] [TySan][Clang] Add clang flag to use tysan outlined instrumentation a… (PR #166170)

Marco Elver via cfe-commits cfe-commits at lists.llvm.org
Mon Nov 3 07:20:12 PST 2025


================
@@ -0,0 +1,23 @@
+// RUN: %clang -S -fsanitize=type -emit-llvm -o - -fsanitize=type %s \
+// RUN:     | FileCheck %s --check-prefixes=CHECK-NO-OUTLINE
+// RUN: %clang -S -fsanitize=type -emit-llvm -o - -fsanitize=type %s \
+// RUN:     -fsanitize-type-outline-instrumentation \
+// RUN:     | FileCheck %s --check-prefixes=CHECK-OUTLINE
+
+// RUN: %clang -S -fsanitize=type -emit-llvm -o - -fsanitize=type %s \
+// RUN:     -fsanitize-type-outline-instrumentation \
+// RUN:     -fsanitize-type-verify-outlined-instrumentation \
+// RUN:     | FileCheck %s --check-prefixes=CHECK-OUTLINE-VERIFY
+// RUN: %clang -S -fsanitize=type -emit-llvm -o - -fsanitize=type %s \
+// RUN:     -fsanitize-type-verify-outlined-instrumentation \
+// RUN:     | FileCheck %s --check-prefixes=CHECK-VERIFY
+
+// CHECK-NO-OUTLINE-NOT: call{{.*}}@__tysan_instrument_mem_inst
+// CHECK-OUTLINE: call{{.*}}@__tysan_instrument_mem_inst
+// CHECK-OUTLINE-VERIFY: call{{.*}}@__tysan_instrument_mem_inst
+// CHECK-VERIFY: call{{.*}}@__tysan_instrument_mem_inst
+
+float alias(int *ptr){
----------------
melver wrote:

Can you use CHECK-LABEL to avoid accidentally passing the test for some reason?

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


More information about the cfe-commits mailing list