[clang] [Driver] Fix detection of libc++ with empty sysroot. (PR #66947)
Shoaib Meenai via cfe-commits
cfe-commits at lists.llvm.org
Fri Sep 22 09:06:04 PDT 2023
================
@@ -316,6 +318,52 @@ TEST(ToolChainTest, VFSSolarisMultiGCCInstallation) {
}
}
+MATCHER_P(jobHasArgs, Substr, "") {
+ const driver::Command &C = arg;
+ std::string Args = "";
+ llvm::ListSeparator Sep(" ");
+ for (const char *Arg : C.getArguments()) {
+ Args += Sep;
+ Args += Arg;
+ }
+ if (is_style_windows(llvm::sys::path::Style::native))
+ std::replace(Args.begin(), Args.end(), '\\', '/');
+ if (llvm::StringRef(Args).contains(Substr))
+ return true;
+ *result_listener << "whose args are '" << Args << "'";
----------------
smeenai wrote:
Not familiar with the unit testing set up ... do you need the "whose args are" bit?
https://github.com/llvm/llvm-project/pull/66947
More information about the cfe-commits
mailing list