https://github.com/nigham updated 
https://github.com/llvm/llvm-project/pull/225241

>From e7f122cbdcc17fe0fad30b5f0ea8b009f1a4b183 Mon Sep 17 00:00:00 2001
From: Anshul Nigham <[email protected]>
Date: Mon, 21 Sep 2026 17:26:20 -0700
Subject: [PATCH 1/2] [clang][test] Fix module cache path in module-redecl1.cpp

Use '-fmodules-cache-path=%t' instead of 'Inputs/' which fails in read-only
test sandboxes due to permission errors when writing compiled module files.
Also clean '%t' before execution and remove redundant '-cc1', matching the
RUN lines in test/Modules/redecl-add-after-load.cpp.
---
 clang/test/AST/ByteCode/module-redecl1.cpp | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/clang/test/AST/ByteCode/module-redecl1.cpp 
b/clang/test/AST/ByteCode/module-redecl1.cpp
index 90961eeae4aff..dc4ccd5a3f83f 100644
--- a/clang/test/AST/ByteCode/module-redecl1.cpp
+++ b/clang/test/AST/ByteCode/module-redecl1.cpp
@@ -1,5 +1,6 @@
-// RUN: %clang_cc1 -cc1 -xobjective-c++ %s -fmodules -fimplicit-module-maps 
-fmodules-cache-path=Inputs/ -I %S/Inputs -verify -std=c++11
-// RUN: %clang_cc1 -cc1 -xobjective-c++ %s -fmodules -fimplicit-module-maps 
-fmodules-cache-path=Inputs/ -I %S/Inputs -verify -std=c++11 
-fexperimental-new-constant-interpreter
+// RUN: rm -rf %t
+// RUN: %clang_cc1 -x objective-c++ %s -fmodules -fimplicit-module-maps 
-fmodules-cache-path=%t -I %S/Inputs -verify -std=c++11
+// RUN: %clang_cc1 -x objective-c++ %s -fmodules -fimplicit-module-maps 
-fmodules-cache-path=%t -I %S/Inputs -verify -std=c++11 
-fexperimental-new-constant-interpreter
 
 // expected-no-diagnostics
 

>From a6efdee523a961245c0a481243b5d5d430d8a937 Mon Sep 17 00:00:00 2001
From: Anshul Nigham <[email protected]>
Date: Mon, 21 Sep 2026 17:57:28 -0700
Subject: [PATCH 2/2] add mkdir %t after cleanup

---
 clang/test/AST/ByteCode/module-redecl1.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/clang/test/AST/ByteCode/module-redecl1.cpp 
b/clang/test/AST/ByteCode/module-redecl1.cpp
index dc4ccd5a3f83f..081b515f2f147 100644
--- a/clang/test/AST/ByteCode/module-redecl1.cpp
+++ b/clang/test/AST/ByteCode/module-redecl1.cpp
@@ -1,4 +1,4 @@
-// RUN: rm -rf %t
+// RUN: rm -rf %t && mkdir %t
 // RUN: %clang_cc1 -x objective-c++ %s -fmodules -fimplicit-module-maps 
-fmodules-cache-path=%t -I %S/Inputs -verify -std=c++11
 // RUN: %clang_cc1 -x objective-c++ %s -fmodules -fimplicit-module-maps 
-fmodules-cache-path=%t -I %S/Inputs -verify -std=c++11 
-fexperimental-new-constant-interpreter
 

_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to