[clang] [clang] Fix test to require x86 (PR #162318)

Tarun Prabhu via cfe-commits cfe-commits at lists.llvm.org
Tue Oct 7 09:37:06 PDT 2025


https://github.com/tarunprabhu created https://github.com/llvm/llvm-project/pull/162318

This test would fail if the x86 target had not been built. This fix makes the requirement on x86 explicit. Trailing whitespace has also been removed.

>From 6fcda9a01cc5f9a8cf9d123b3384275146c77ee7 Mon Sep 17 00:00:00 2001
From: Tarun Prabhu <tarun at lanl.gov>
Date: Tue, 7 Oct 2025 10:33:01 -0600
Subject: [PATCH] [clang] Fix test to require x86

This test forces -triple x86_64-pc-linux-gnu. This will fail if the x86 target
has not been built. Fix so that the target is required. Remove trailing
whitespace.
---
 clang/test/OpenMP/nvptx_throw_trap.cpp | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/clang/test/OpenMP/nvptx_throw_trap.cpp b/clang/test/OpenMP/nvptx_throw_trap.cpp
index b13a09136c17d..ce1173831f7c0 100644
--- a/clang/test/OpenMP/nvptx_throw_trap.cpp
+++ b/clang/test/OpenMP/nvptx_throw_trap.cpp
@@ -1,4 +1,4 @@
-// REQUIRES: nvptx-registered-target
+// REQUIRES: nvptx-registered-target, x86-registered-target
 
 // RUN: %clang_cc1 -fopenmp -triple nvptx64 -fopenmp-is-target-device %s -S -Wno-openmp-target-exception -o - | FileCheck -check-prefix=DEVICE %s
 // RUN: %clang_cc1 -fopenmp -triple x86_64-pc-linux-gnu -fopenmp-is-target-device -fcxx-exceptions %s -S -Wno-openmp-target-exception -o - | FileCheck -check-prefix=HOST %s
@@ -8,6 +8,6 @@
 // HOST-NOT: trap;
 #pragma omp declare target
 void foo(void) {
-	throw 404; 
+	throw 404;
 }
 #pragma omp end declare target



More information about the cfe-commits mailing list