https://github.com/jansvoboda11 created 
https://github.com/llvm/llvm-project/pull/76985

When the test was ran via a symlink path, the diagnostic did not fire, since 
the `%t` path in the include directive would differ in more than just a case 
from the real path of the header file.

>From c8ebe899978ade58fa014a3c71a7b5888be865bd Mon Sep 17 00:00:00 2001
From: Jan Svoboda <jan_svob...@apple.com>
Date: Thu, 4 Jan 2024 08:57:40 -0800
Subject: [PATCH] [clang] Fix test for case-insensitive absolute includes

When the test was ran via a symlink path (e.g. `ninja -C 
/symlink/llvm-project/build check-clang`), the diagnostic would not fire, since 
`%t` path in the include directive would differ in more than just a case from 
the real path of the header file.
---
 clang/test/Lexer/case-insensitive-include-absolute.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/clang/test/Lexer/case-insensitive-include-absolute.c 
b/clang/test/Lexer/case-insensitive-include-absolute.c
index 6247e4808c7fa2..ef9e131c45df59 100644
--- a/clang/test/Lexer/case-insensitive-include-absolute.c
+++ b/clang/test/Lexer/case-insensitive-include-absolute.c
@@ -1,8 +1,8 @@
 // REQUIRES: case-insensitive-filesystem
 
 // RUN: rm -rf %t && split-file %s %t
-// RUN: sed "s|DIR|%/t|g" %t/tu.c.in > %t/tu.c
-// RUN: %clang_cc1 -fsyntax-only %t/tu.c 2>&1 | FileCheck %s --DDIR=%/t
+// RUN: sed "s|DIR|%{/t:real}|g" %t/tu.c.in > %t/tu.c
+// RUN: %clang_cc1 -fsyntax-only %t/tu.c 2>&1 | FileCheck %s -DDIR=%{/t:real}
 
 //--- header.h
 //--- tu.c.in

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

Reply via email to