xref: /llvm-project/clang/test/Lexer/case-insensitive-include-win.c (revision 05d613ea931b6de1b46dfe04b8e55285359047f4)
1d0383834SNico Weber // Most Microsoft-specific testing should go in case-insensitive-include-ms.c
2d0383834SNico Weber // This file should only include code that really needs a Windows host OS to
3d0383834SNico Weber // run.
4d0383834SNico Weber 
5*05d613eaSSaleem Abdulrasool // Note: We must use the real path here, because the logic to detect case
6*05d613eaSSaleem Abdulrasool // mismatches must resolve the real path to figure out the original casing.
7*05d613eaSSaleem Abdulrasool // If we use %t and we are on a substitute drive S: mapping to C:\subst,
8*05d613eaSSaleem Abdulrasool // then we will compare "S:\test.dir\FOO.h" to "C:\subst\test.dir\foo.h"
9*05d613eaSSaleem Abdulrasool // and avoid emitting the diagnostic because the structure is different.
10*05d613eaSSaleem Abdulrasool 
11d0383834SNico Weber // REQUIRES: system-windows
12d0383834SNico Weber // RUN: mkdir -p %t.dir
13d0383834SNico Weber // RUN: touch %t.dir/foo.h
14*05d613eaSSaleem Abdulrasool // RUN: not %clang_cl /FI \\?\%{t:real}.dir\FOO.h /WX -fsyntax-only %s 2>&1 | FileCheck %s
15d0383834SNico Weber 
16d0383834SNico Weber // CHECK: non-portable path to file '"\\?\
17