[clang] Really fix tysan test failing on unsupported arches (PR #169096)

Sergei Barannikov via cfe-commits cfe-commits at lists.llvm.org
Fri Nov 21 13:21:10 PST 2025


https://github.com/s-barannikov created https://github.com/llvm/llvm-project/pull/169096

'target' is not one of the features recognized by clang tests, and the test doesn't require X86 backend to be built. Specify the target explicitly instead. Remove duplicate `-fsanitize=type` as well.

>From 50ad5357a968d0f53884e42696387e4af0789a9b Mon Sep 17 00:00:00 2001
From: Sergei Barannikov <barannikov88 at gmail.com>
Date: Sat, 22 Nov 2025 00:20:26 +0300
Subject: [PATCH] Really fix tysan test failing on unsupported arches

'target' is not one of the features recognized by clang tests, and the
test doesn't require X86 backend to be built. Specify the target
explicitly instead. Remove duplicate `-fsanitize=type` as well.
---
 clang/test/CodeGen/sanitize-type-outlined.cpp | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/clang/test/CodeGen/sanitize-type-outlined.cpp b/clang/test/CodeGen/sanitize-type-outlined.cpp
index 67e2f49e53d34..2c2caa98b21db 100644
--- a/clang/test/CodeGen/sanitize-type-outlined.cpp
+++ b/clang/test/CodeGen/sanitize-type-outlined.cpp
@@ -1,9 +1,7 @@
-// REQUIRES: target=x86_64-linux-gnu
-
-// RUN: %clang -S -fsanitize=type -emit-llvm -o - -fsanitize=type %s \
+// RUN: %clang --target=x86_64-linux-gnu -S -fsanitize=type -emit-llvm -o - %s \
 // RUN:     -fno-sanitize-type-outline-instrumentation \
 // RUN:     | FileCheck %s --check-prefixes=CHECK-NO-OUTLINE
-// RUN: %clang -S -fsanitize=type -emit-llvm -o - -fsanitize=type %s \
+// RUN: %clang --target=x86_64-linux-gnu -S -fsanitize=type -emit-llvm -o - %s \
 // RUN:     -fsanitize-type-outline-instrumentation \
 // RUN:     | FileCheck %s --check-prefixes=CHECK-OUTLINE
 



More information about the cfe-commits mailing list