[PATCH] D53517: [FileCheck] Parse command-line options from FILECHECK_OPTS

Paul Robinson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Nov 6 08:48:05 PST 2018


probinson added inline comments.


================
Comment at: llvm/docs/CommandGuide/FileCheck.rst:28
+Options are parsed from the command line and from the environment variable
+``FILECHECK_OPTS``.
+
----------------
This currently implies the command line is done first, which it isn't.
"Options are parsed from the env var and then from the command line" or something along those lines.


================
Comment at: llvm/utils/FileCheck/FileCheck.cpp:117
   InitLLVM X(argc, argv);
-  cl::ParseCommandLineOptions(argc, argv);
+  cl::ParseCommandLineOptions(argc, argv, "", nullptr, "FILECHECK_OPTS");
 
----------------
For arguments such as "" and nullptr, generally the style is to put the parameter name in a comment so the reader knows what is being omitted.  So in this case something like:
```
..., /*Overview*/ "", /*Errs*/ nullptr, "FILECHECK_OPTS");
```



https://reviews.llvm.org/D53517





More information about the llvm-commits mailing list