[clang] [test][OpenMP] Avoid writing to a potentially write-protected dir (PR #94931)

Karl-Johan Karlsson via cfe-commits cfe-commits at lists.llvm.org
Sun Jun 9 22:53:20 PDT 2024


https://github.com/karka228 created https://github.com/llvm/llvm-project/pull/94931

The test clang/test/OpenMP/error_unsupport_feature.c don't check the output written to the current directory. The current directory may be write protected e.g. in a sandboxed environment.

This patch replace the -emit-llvm option with -fsyntax-only as it don't care about the outputed llvm IR.

>From c5b2765d9f4bd2a8412c0722a052148673411f94 Mon Sep 17 00:00:00 2001
From: Karl-Johan Karlsson <karl-johan.karlsson at ericsson.com>
Date: Mon, 10 Jun 2024 07:45:48 +0200
Subject: [PATCH] [test][OpenMP] Avoid writing to a potentially write-protected
 dir

The test clang/test/OpenMP/error_unsupport_feature.c don't check the output
written to the current directory. The current directory may be write protected
e.g. in a sandboxed environment.

This patch replace the -emit-llvm option with -fsyntax-only as it don't care
about the outputed llvm IR.
---
 clang/test/OpenMP/error_unsupport_feature.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/clang/test/OpenMP/error_unsupport_feature.c b/clang/test/OpenMP/error_unsupport_feature.c
index 611a8b4639c44..2dc485e20dbb7 100644
--- a/clang/test/OpenMP/error_unsupport_feature.c
+++ b/clang/test/OpenMP/error_unsupport_feature.c
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -emit-llvm -verify -fopenmp %s
+// RUN: %clang_cc1 -fsyntax-only -verify -fopenmp %s
 
 int main () {
   int r = 0;



More information about the cfe-commits mailing list