Skip to content

Conversation

HighCommander4
Copy link
Collaborator

SawInput() is intended to be called for every argument after a --, but it was mistakenly being called for the -- itself.

Partially fixes clangd/clangd#1850

SawInput() is intended to be called for every argument after a `--`,
but it was mistakenly being called for the `--` itself.

Partially fixes clangd/clangd#1850
tooling::CompileCommand Cmd;
Cmd.CommandLine = {"clang-cl", "-std:c++latest", "--", "/Users/foo.cc"};
Mangler(Cmd, "/Users/foo.cc");
// Check that the -std:c++latest flag is not dropped
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure if this is the best test case for this change. -std:c++latest being dropped in transferCompileCommand() is a separate bug that will hopefully be fixed in the near future.

But I'm not sure how to write a more direct test for "transferCompileCommand() was not called", and the scenario being tested here is a valid one from a user expectation point of view.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Code highlighting for C++23 with clang-cl on Windows
1 participant