[clang-tools-extra] [clangd][modules] Remove the options when driver detects that it was unsupported, and log them (PR #200001)
Aleksandr Platonov via cfe-commits
cfe-commits at lists.llvm.org
Mon Jun 8 08:45:38 PDT 2026
================
@@ -561,7 +561,18 @@ TEST(CommandMangler, ClangClStdFlags_Inference) {
EXPECT_THAT(llvm::join(Cmd.CommandLine, " "), HasSubstr("/std:c++latest"));
}
}
+TEST(CommandMangler, ClangUnknownArgs) {
+ // Check that clang-cl-specific will drop unknown flags
+ const auto Mangler = CommandMangler::forTests();
+ {
+ tooling::CompileCommand Cmd;
+ Cmd.CommandLine = {"clang-cl", "-std=c++23", "--unknown-flag=abcd.flag"};
+ Mangler(Cmd, "/Users/foo.hpp");
----------------
ArcsinX wrote:
I think we can use just `foo.cpp`. Please check tests above, which are not `clang-cl` specific.
https://github.com/llvm/llvm-project/pull/200001
More information about the cfe-commits
mailing list