https://github.com/yuxuanchen1997 updated 
https://github.com/llvm/llvm-project/pull/119903

>From 449459edf130c842d57b672799927f158f0b92cb Mon Sep 17 00:00:00 2001
From: Yuxuan Chen <yuxuanchen1...@outlook.com>
Date: Fri, 13 Dec 2024 09:09:14 -0800
Subject: [PATCH] [clang] test should not depend on system header

---
 clang/test/Interpreter/Inputs/vector | 10 ++++++++++
 clang/test/Interpreter/crash.cpp     |  2 +-
 2 files changed, 11 insertions(+), 1 deletion(-)
 create mode 100644 clang/test/Interpreter/Inputs/vector

diff --git a/clang/test/Interpreter/Inputs/vector 
b/clang/test/Interpreter/Inputs/vector
new file mode 100644
index 00000000000000..4fc5d04f4718c7
--- /dev/null
+++ b/clang/test/Interpreter/Inputs/vector
@@ -0,0 +1,10 @@
+#ifndef VECTOR
+#define VECTOR
+namespace std {
+template <typename>
+class vector {
+public:
+  vector();
+};
+} // namespace std
+#endif // VECTOR
diff --git a/clang/test/Interpreter/crash.cpp b/clang/test/Interpreter/crash.cpp
index 1ab24b0febfa15..9a606983524d82 100644
--- a/clang/test/Interpreter/crash.cpp
+++ b/clang/test/Interpreter/crash.cpp
@@ -5,7 +5,7 @@
 //
 // RUN: split-file %s %t
 //
-// RUN: %clang++ -std=c++20 -fPIC -c %t/vec.cpp -o %t/vec.o
+// RUN: %clang++ -Xclang -nostdsysteminc -I%S/Inputs/ -std=c++20 -fPIC -c 
%t/vec.cpp -o %t/vec.o
 // RUN: %clang++ -shared %t/vec.o -o %t/vec.so
 //
 // RUN: cat %t/Test.cpp | LD_LIBRARY_PATH=%t:$LD_LIBRARY_PATH clang-repl

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

Reply via email to