================
@@ -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"};
----------------
ArcsinX wrote:
Why `clang-cl`? Maybe just `clang`?
Also, I think we can have several options to drop and at least one which we
should not drop.
E.g. `--unknown-option=abcd -std=c++23 --unknown-flag`
And check that `--unknown-option=abcd` and `--unknown-flag` were dropped, but
`-std=c++23` is not
https://github.com/llvm/llvm-project/pull/200001
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits