This is an archive of the discontinued LLVM Phabricator instance.

[Support] Fix Windows Command Shell Command line parsing for quoted arguments
AbandonedPublic

Authored by MyDeveloperDay on Jan 17 2019, 3:25 PM.

Details

Summary

PR38471 - Check readability-identifier-naming is not working on Windows 10

clang-tidy command line parsing fails to read single quoted -checks when using windows cmd.exe prompt

The following will fail to read the values of -checks due argv not removing the single quote (') on windows cmd shell (unlike unix variants & cygwin)
see (https://bugs.llvm.org/show_bug.cgi?id=38471) for more details

clang-tidy.exe -checks='-*,readability-identifier-naming' test.cpp -- -std=c++11

this results in Windows only supporting double quote usage and this is confusing with lots of the examples using single quotes

clang-tidy.exe -checks="-*,readability-identifier-naming" test.cpp -- -std=c++11

As I'm fairly new to LLVM this may not be the best place to do this, whilst this was reported up in clang-tidy I suspect it could have an effect on any of the llvm tools being run in a windows command shell (but not inside bash.exe)

If you think this can be done better elsewhere or is unnecessary I'll be happy to change/abandon it

Picking reviewers from code owners and common reviewers to changes in this area feel free to adjust as necessary.

Diff Detail

Event Timeline

MyDeveloperDay created this revision.Jan 17 2019, 3:25 PM
chandlerc requested changes to this revision.Jan 17 2019, 7:26 PM

This wasn't sent to the llvm-commits mailing list. Please abandon this revision in Phab and create a new one with the list subscribed.

This revision now requires changes to proceed.Jan 17 2019, 7:26 PM