diff --git a/clang-tools-extra/test/clang-tidy/infrastructure/validate-check-names.cpp b/clang-tools-extra/test/clang-tidy/infrastructure/validate-check-names.cpp --- a/clang-tools-extra/test/clang-tidy/infrastructure/validate-check-names.cpp +++ b/clang-tools-extra/test/clang-tidy/infrastructure/validate-check-names.cpp @@ -1,2 +1,6 @@ // Check names may only contain alphanumeric characters, '-', '_', and '.'. -// RUN: clang-tidy -checks=* -list-checks | grep '^ ' | cut -b5- | not grep -v '^[a-zA-Z0-9_.\-]\+$' +// RUN: clang-tidy -checks=* -list-checks | grep '^ ' | cut -b5- | not grep -v '^[a-zA-Z0-9_.\-]*$' + +// Hack: The regex should ideally use \+ instead of * to require at least +// one char, but if grep is a MSYS based tool, the command line argument +// can end up misparsed by the MSYS runtime.