================
@@ -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
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to