[PATCH] clang-modernize: Update docs with -include/-exclude

Edwin Vane edwin.vane at intel.com
Fri Sep 6 11:32:08 PDT 2013


Hi tareqsiraj, arielbernal, Sarcasm,

-include/-exclude and friends have been marked as hidden options until
this point. This is no longer necessary. Update the docs to describe
their effect.

http://llvm-reviews.chandlerc.com/D1621

Files:
  clang-modernize/tool/ClangModernize.cpp
  docs/ModernizerUsage.rst

Index: clang-modernize/tool/ClangModernize.cpp
===================================================================
--- clang-modernize/tool/ClangModernize.cpp
+++ clang-modernize/tool/ClangModernize.cpp
@@ -99,22 +99,20 @@
                      "directory. Default: ./migrate_perf"),
     cl::init(NoTiming), cl::ValueOptional, cl::value_desc("directory name"));
 
-// TODO: Remove cl::Hidden when functionality for acknowledging include/exclude
-// options are implemented in the tool.
 static cl::opt<std::string>
-IncludePaths("include", cl::Hidden,
+IncludePaths("include",
              cl::desc("Comma seperated list of paths to consider to be "
                       "transformed"));
 static cl::opt<std::string>
-ExcludePaths("exclude", cl::Hidden,
+ExcludePaths("exclude",
              cl::desc("Comma seperated list of paths that can not "
                       "be transformed"));
 static cl::opt<std::string>
-IncludeFromFile("include-from", cl::Hidden, cl::value_desc("filename"),
+IncludeFromFile("include-from", cl::value_desc("filename"),
                 cl::desc("File containing a list of paths to consider to "
                          "be transformed"));
 static cl::opt<std::string>
-ExcludeFromFile("exclude-from", cl::Hidden, cl::value_desc("filename"),
+ExcludeFromFile("exclude-from", cl::value_desc("filename"),
                 cl::desc("File containing a list of paths that can not be "
                          "transforms"));
 
Index: docs/ModernizerUsage.rst
===================================================================
--- docs/ModernizerUsage.rst
+++ docs/ModernizerUsage.rst
@@ -54,6 +54,32 @@
 
 .. _Ninja: http://martine.github.io/ninja/
 
+.. option:: -include=<path1>,<path2>,...,<pathN>
+
+  Use this option to indicate which directories contain files that can be
+  changed by the modernizer. Inidividual files may be specified if desired.
+  Multiple paths can be specified as a comma-separated list. Sources mentioned
+  explicitly on the command line are always included so this option controls
+  which other files (e.g. headers) may be changed while transforming
+  translation units.
+
+.. option:: -exclude=<path1>,<path2>,...,<pathN>
+
+  Used with ``-include`` to provide finer control over which files and
+  directories can be transformed. Individual files and files within directories
+  specified by this option **will not** be transformed. Multiple paths can be
+  specified as a comma-separated list.
+
+.. option:: -include-from=<filename>
+
+  Like ``-include`` but read paths from the given file. Paths should be one per
+  line.
+
+.. option:: -exclude-from=<filename>
+
+  Like ``-exclude`` but read paths from the given file. Paths are listed one
+  per line.
+
 .. option:: -risk=<risk-level>
 
   Some transformations may cause a change in semantics. In such cases the
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D1621.1.patch
Type: text/x-patch
Size: 2845 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20130906/85dd42f3/attachment.bin>


More information about the cfe-commits mailing list