This is an archive of the discontinued LLVM Phabricator instance.

Allow use of -list-checks option without need to pass source files.
ClosedPublic

Authored by hintonda on Aug 16 2015, 6:41 PM.

Details

Reviewers
alexfh
Summary

Initialize CommonOptionsParser with ZeroOrOne NumOccurrenceFlag so callers can pass -list-checks without the need to pass additional positional parameters, then add dummy file if none were supplied.

Diff Detail

Event Timeline

hintonda updated this revision to Diff 32259.Aug 16 2015, 6:41 PM
hintonda retitled this revision from to Allow use of -list-checks option without need to pass source files..
hintonda updated this object.
hintonda added a reviewer: alexfh.
alexfh accepted this revision.Aug 17 2015, 2:40 AM
alexfh edited edge metadata.

Looks good with a couple of nits. I'll fix them and submit the patch for you. Thanks for fixing this!

clang-tidy/tool/ClangTidyMain.cpp
265

Looks like it exceeds the 80-column limit.

271

This should be a StringRef and there should be no space before the parenthesis.

This revision is now accepted and ready to land.Aug 17 2015, 2:40 AM
alexfh added inline comments.Aug 17 2015, 2:48 AM
clang-tidy/tool/ClangTidyMain.cpp
274

clang-tidy should also error out when no positional arguments are specified and no -list-checks. Will fix that as well.

alexfh closed this revision.Aug 17 2015, 3:05 AM

Fixed the issues and committed as revision 245205.

Thanks for the fix!

clang-tidy/tool/ClangTidyMain.cpp
272

s/pathlist/PathList/g

Great, thanks Alex...