[PATCH] D79531: Make -Wnonportable-include-path ignore drive case on Windows.

Reid Kleckner via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed May 6 18:12:28 PDT 2020


rnk added inline comments.


================
Comment at: clang/lib/Lex/PPDirectives.cpp:2118
+    // given drive letter case as correct for the purpose of this warning.
+    SmallString<128> FixedDriveRealPath;
+    if (llvm::sys::path::is_absolute(Name) &&
----------------
It seems like trySimplifyPath could check if it is checking the case of the first component on Windows, and that would hide the complexity from the main Preprocessor::HandleHeaderIncludeOrImport implementation. It also saves a string copy for every include.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D79531/new/

https://reviews.llvm.org/D79531





More information about the cfe-commits mailing list