[PATCH] D79223: Fix pr31836 on Windows too, and correctly handle repeated separators.
Adrian McCarthy via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Fri May 1 17:15:24 PDT 2020
amccarth accepted this revision.
amccarth added a comment.
This revision is now accepted and ready to land.
OK as is, but please consider re-using `llvm::sys::path` to distinguish separators.
Please also check that there are no regressions in the clang VFS tests.
================
Comment at: clang/lib/Lex/PPDirectives.cpp:2118
+ return c == '/' || (BackslashIsSeparator && c == '\\');
+ };
+
----------------
Can you re-use `llvm::sys::path::is_separator` instead of inventing a new thing? You can explicitly pass `llvm::path::Style::windows` if the Microsoft extensions are enabled. Otherwise let it default to llvm::path::Style::native.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D79223/new/
https://reviews.llvm.org/D79223
More information about the cfe-commits
mailing list