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

via cfe-commits cfe-commits at lists.llvm.org
Sun Jun 9 22:53:51 PDT 2024


llvmbot wrote:


<!--LLVM PR SUMMARY COMMENT-->

@llvm/pr-subscribers-clang

Author: Karl-Johan Karlsson (karka228)

<details>
<summary>Changes</summary>

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.

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


1 Files Affected:

- (modified) clang/test/OpenMP/error_unsupport_feature.c (+1-1) 


``````````diff
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;

``````````

</details>


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


More information about the cfe-commits mailing list