[PATCH] D56901: [Support] Fix Windows Command Shell Command line parsing for quoted arguments

Alexander Kornienko via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Jan 18 07:00:54 PST 2019


alexfh added a comment.

In D56901#1363088 <https://reviews.llvm.org/D56901#1363088>, @MyDeveloperDay wrote:

> In D56901#1363040 <https://reviews.llvm.org/D56901#1363040>, @alexfh wrote:
>
> > Where does this problem come from?
>
>
> https://bugs.llvm.org/show_bug.cgi?id=38471 (in case you didn't see that)


I saw that. I was mostly wondering how someone comes with an idea of using single quotes. Copying from stackoverflow seems like a good guess ;)

> http://clang.llvm.org/extra/clang-tidy/  (look for format-style), There are some others in ClangFormat too..

Seems like it's worth changing to double quotes.

> So I think I like your idea of moving extra error checking up into clang-tidy instead, This might help a little because it will prevent clang-tidy from silently failing but also will have the desired effect, and hopefully won't break the world.

The minimal viable safeguard would be to look at the set of characters in the `-checks=` option value (roughly `[a-zA-Z0-9-,*.]`). An even better validation would be to split the checks filter by commas and verify that each part actually affects the final set of checks. Unless I'm missing something, both validation strategies should be rather straightforward to implement.


Repository:
  rL LLVM

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D56901/new/

https://reviews.llvm.org/D56901





More information about the llvm-commits mailing list