https://github.com/ilovepi created 
https://github.com/llvm/llvm-project/pull/135255

Tests should avoid using platform dependent behavior, like /dev/null
when possible. -fdriver-only should stop clang even earlier, and avoid
any non-diagnostic output.

>From b392334bc6be0262ca734d3791a87afeac4cab41 Mon Sep 17 00:00:00 2001
From: Paul Kirth <paulki...@google.com>
Date: Thu, 10 Apr 2025 13:48:37 -0700
Subject: [PATCH] [clang][test][NFC] Use -fdriver-only over /dev/null

Tests should avoid using platform dependent behavior, like /dev/null
when possible. -fdriver-only should stop clang even earlier, and avoid
any non-diagnostic output.
---
 clang/test/Driver/openacc-no-cir.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/clang/test/Driver/openacc-no-cir.c 
b/clang/test/Driver/openacc-no-cir.c
index 891f175a001bb..5fa1e4e0c809f 100644
--- a/clang/test/Driver/openacc-no-cir.c
+++ b/clang/test/Driver/openacc-no-cir.c
@@ -1,6 +1,6 @@
-// RUN: %clang -fopenacc -S %s -o /dev/null 2>&1 | FileCheck %s 
-check-prefix=ERROR
-// RUN: %clang -fclangir -fopenacc -S %s -o /dev/null 2>&1 | FileCheck %s 
--allow-empty -check-prefix=NOERROR
-// RUN: %clang -fopenacc -fclangir -S %s -o /dev/null 2>&1 | FileCheck %s 
--allow-empty -check-prefix=NOERROR
+// RUN: %clang -fopenacc -S %s -o -fdriver-only 2>&1 | FileCheck %s 
-check-prefix=ERROR
+// RUN: %clang -fclangir -fopenacc -S %s -fdriver-only 2>&1 | FileCheck %s 
--allow-empty -check-prefix=NOERROR
+// RUN: %clang -fopenacc -fclangir -S %s -fdriver-only 2>&1 | FileCheck %s 
--allow-empty -check-prefix=NOERROR
 
 // ERROR: OpenACC directives will result in no runtime behavior; use -fclangir 
to enable runtime effect
 // NOERROR-NOT: OpenACC directives

_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to