[PATCH] D79531: Make -Wnonportable-include-path ignore drive case on Windows.
Nico Weber via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Thu May 7 11:20:46 PDT 2020
thakis marked an inline comment as done.
thakis added inline comments.
================
Comment at: clang/lib/Lex/PPDirectives.cpp:2123
+ isLowercase(Name[0]) != isLowercase(RealPathName[0])) {
+ assert(Components.size() >= 3 && "should have drive, backslash, name");
+ FixedDriveRealPath = (Name.substr(0, 1) + RealPathName.substr(1)).str();
----------------
hans wrote:
> Could it be different for e.g. network drives? I guess maybe they'd still have at least 3 components, but perhaps no drive letter
Oh, good call, ` /FI\\?\%cd%\test.h` produces a path that's is_absolute() but that returns
```
\\?
\
c:
\
src
llvm-project
test.h
```
as path components (one per line). Looking at how to handle that now. If anyone happens to know, please shout :)
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D79531/new/
https://reviews.llvm.org/D79531
More information about the cfe-commits
mailing list