diff --git a/clang/docs/ClangFormat.rst b/clang/docs/ClangFormat.rst --- a/clang/docs/ClangFormat.rst +++ b/clang/docs/ClangFormat.rst @@ -26,7 +26,7 @@ together with s, the files are edited in-place. Otherwise, the result is written to the standard output. - USAGE: clang-format [options] [ ...] + USAGE: clang-format [options] [@] [ ...] OPTIONS: @@ -69,7 +69,8 @@ --ferror-limit= - Set the maximum number of clang-format errors to emit before stopping (0 = no limit). Used only with --dry-run or -n - --files= - Provide a list of files to run clang-format + --files= - A file containing a list of files to process, one + per line. -i - Inplace edit s, if specified. --length= - Format a range of this length (in bytes). Multiple ranges can be formatted by specifying diff --git a/clang/tools/clang-format/ClangFormat.cpp b/clang/tools/clang-format/ClangFormat.cpp --- a/clang/tools/clang-format/ClangFormat.cpp +++ b/clang/tools/clang-format/ClangFormat.cpp @@ -125,9 +125,11 @@ "determined by the QualifierAlignment style flag"), cl::init(""), cl::cat(ClangFormatCategory)); -static cl::opt - Files("files", cl::desc("Provide a list of files to run clang-format"), - cl::init(""), cl::cat(ClangFormatCategory)); +static cl::opt Files( + "files", + cl::desc("A file containing a list of files to process, one per line."), + cl::value_desc("filename"), + cl::init(""), cl::cat(ClangFormatCategory)); static cl::opt Verbose("verbose", cl::desc("If set, shows the list of processed files"),