This is an archive of the discontinued LLVM Phabricator instance.

[clangd] Tweak --query-driver to ignore slash direction on windows
ClosedPublic

Authored by sammccall on Feb 18 2022, 4:28 AM.

Diff Detail

Event Timeline

sammccall created this revision.Feb 18 2022, 4:28 AM
sammccall requested review of this revision.Feb 18 2022, 4:28 AM
kadircet accepted this revision.Feb 18 2022, 7:50 AM

thanks, lgtm!

clang-tools-extra/clangd/QueryDriverDatabase.cpp
278

nit: maybe extract llvm::sys::path::is_separator('/') && llvm::sys::path::is_separator('\\') into a bool PlatformIsSlashInsensitive ?

298

we don't know the FS .. ?

This revision is now accepted and ready to land.Feb 18 2022, 7:50 AM
sammccall marked an inline comment as done.Feb 18 2022, 9:06 AM
sammccall added inline comments.
clang-tools-extra/clangd/QueryDriverDatabase.cpp
278

We require the separators to be exactly \ and / for the regex to be correct, so I'd rather keep the literals here.

(Call me paranoid, but I grew up on a system with : for separators...)