Skip to content

Conversation

tarunprabhu
Copy link
Contributor

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.

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.
@llvmbot llvmbot added clang Clang issues not falling into any other category clang:openmp OpenMP related changes to Clang labels Oct 7, 2025
@llvmbot
Copy link
Member

llvmbot commented Oct 7, 2025

@llvm/pr-subscribers-clang

Author: Tarun Prabhu (tarunprabhu)

Changes

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.


Full diff: https://github.com/llvm/llvm-project/pull/162318.diff

1 Files Affected:

  • (modified) clang/test/OpenMP/nvptx_throw_trap.cpp (+2-2)
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

Copy link
Contributor

@AntonRydahl AntonRydahl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for addressing this issue!

@tarunprabhu tarunprabhu merged commit 9d49fe4 into llvm:main Oct 8, 2025
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
clang:openmp OpenMP related changes to Clang clang Clang issues not falling into any other category
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants