[LLVMbugs] [Bug 17993] New: Filemanager possible issue with case insensitivity in Windows‏

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Tue Nov 19 04:09:14 PST 2013


            Bug ID: 17993
           Summary: Filemanager possible issue with case insensitivity in
           Product: new-bugs
           Version: trunk
          Hardware: PC
                OS: Windows NT
            Status: NEW
          Severity: normal
          Priority: P
         Component: new bugs
          Assignee: unassignedbugs at nondot.org
          Reporter: yaron.keren at gmail.com
                CC: llvmbugs at cs.uiuc.edu
    Classification: Unclassified

In Windows, files are usually case insensitive. The program may not be able to
change this, see  

Meanwhile, SeenFileEntries keys in FileManager are case-sensitive, so we may
end up with duplicate mappings in SeenFileEntries for the same file, for


will all map to the same FileEntry.

Furthermore, the file name in FE will be the searched-for filename rather than
the real filename. For example, let's say you have hello.h on disk but you
searched for HELLO.H. Since stat succeeds with HELLO.H this will be the
filename linked from the FE and used in all clang's diagnostics. 

I'm not sure if this should be called a bug but it may not be what the user

Fixing this would require extra work for every file open on Windows, using
FindFirstFile looking for file instead of stat checking the file exists.

Reid Kleckner comment on cfe-dev:
I think the correct design is to have multiple strings point to the same
FileEntry, which owns the canonical name, rather than pointing to the StringMap
key used for the first path encountered.

You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20131119/db22d82f/attachment.html>

More information about the llvm-bugs mailing list