hokein accepted this revision. hokein added a comment. This revision is now accepted and ready to land.
looks almost good. ================ Comment at: clang-tools-extra/clangd/unittests/CompileCommandsTests.cpp:197 +} + +TEST(ArgStripperTest, Spellings) { ---------------- sammccall wrote: > hokein wrote: > > add tests for stripping the diagnostic flags, `-Wfoo` etc. > Those aren't actually separate flags: "-W" is a Joined flag and foo is an arg. > Do you want a test specifically for such a string anyway? > Or do you want special behavior for them? (Like interaction between -Wfoo and > -Wno-foo) I was a bit unclear about how the stripper strips the "-W/-D"-like flag, would be nice to have them in tests as I think these are important cases. > Those aren't actually separate flags: "-W" is a Joined flag and foo is an arg. oh, if I understand correctly: - `strip("unused", "clang -Wunused foo.cc")` => `clang foo.cc` ? - `strip("-W", "clang -Wunused -Wextra foo.cc")` => `clang foo.cc` // remove all -W flags ? - `strip("error=unused", "clang -Wunused -Werror=unused -Werror=date-time foo.cc")` => `clang -Wunused -Werror=date-time foo.cc`? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D81958/new/ https://reviews.llvm.org/D81958 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits