[clang] Fix test on read-only file systems (PR #205108)

via cfe-commits cfe-commits at lists.llvm.org
Mon Jun 22 06:48:13 PDT 2026


llvmorg-github-actions[bot] wrote:


<!--LLVM PR SUMMARY COMMENT-->

@llvm/pr-subscribers-clang

Author: Walter Lee (googlewalt)

<details>
<summary>Changes</summary>

Fixes 25e4057d49055a645dc6a51ae1f40ac647aaed5b.

Use the -fsyntax-only flag instead of -c.  This performs the necessary parsing and diagnostics verification (the actual intent of this test) without attempting to emit an object file.

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


1 Files Affected:

- (modified) clang/test/AST/ByteCode/command-line-options.cpp (+4-4) 


``````````diff
diff --git a/clang/test/AST/ByteCode/command-line-options.cpp b/clang/test/AST/ByteCode/command-line-options.cpp
index e85b66f08d020..b64fc565e042a 100644
--- a/clang/test/AST/ByteCode/command-line-options.cpp
+++ b/clang/test/AST/ByteCode/command-line-options.cpp
@@ -6,11 +6,11 @@
 /// All this should be true if the driver is used or -cc1.
 
 
-// RUN: %clang -c   -fexperimental-new-constant-interpreter %s -Xclang -verify=bc
-// RUN: %clang -cc1 -fexperimental-new-constant-interpreter %s         -verify=bc
+// RUN: %clang -fsyntax-only -fexperimental-new-constant-interpreter %s -Xclang -verify=bc
+// RUN: %clang -cc1          -fexperimental-new-constant-interpreter %s         -verify=bc
 
-// RUN: %clang -c   -fno-experimental-new-constant-interpreter %s -Xclang -verify=nobc
-// RUN: %clang -cc1 -fno-experimental-new-constant-interpreter %s         -verify=nobc
+// RUN: %clang -fsyntax-only -fno-experimental-new-constant-interpreter %s -Xclang -verify=nobc
+// RUN: %clang -cc1          -fno-experimental-new-constant-interpreter %s         -verify=nobc
 
 
 /// Note that we're not testing the behavior without those command line options since that

``````````

</details>


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


More information about the cfe-commits mailing list