[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 06:01:56 PST 2019


alexfh added a comment.

This is not in any way specific to clang-tidy. Since it will affect the behavior of Clang on Windows, I'd like Reid or someone else who's familiar with the topic to have a look.

Where does this problem come from? Do we have any documentation that mentions single quotes in the context of command line? I personally doubt that the use of single quotes is common for windows CLI tools. Since single quotes don't have any special meaning on Windows unlike double quotes (used to enclose argument values with spaces in them, IIRC).

I believe, the confusion the user had could be addressed by clang-tidy being a bit stricter about the set of characters it accepts in the -checks= option and issue a warning/error in case it sees something weird.



================
Comment at: unittests/Support/CommandLineTest.cpp:925
+  const char *argsCmdShell[] = {"clang-tidy.exe",
+                                "-checks='-*,readability-identifier-naming'"};
+
----------------
Since the check name has no special meaning to the functionality being proposed, I'd refrain from using it.


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