[clang-tools-extra] r190194 - clang-modernize: Update docs with -include/-exclude

Edwin Vane edwin.vane at intel.com
Fri Sep 6 12:26:25 PDT 2013


Author: revane
Date: Fri Sep  6 14:26:25 2013
New Revision: 190194

URL: http://llvm.org/viewvc/llvm-project?rev=190194&view=rev
Log:
clang-modernize: Update docs with -include/-exclude

-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.

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


Modified:
    clang-tools-extra/trunk/clang-modernize/tool/ClangModernize.cpp
    clang-tools-extra/trunk/docs/ModernizerUsage.rst

Modified: clang-tools-extra/trunk/clang-modernize/tool/ClangModernize.cpp
URL: http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/clang-modernize/tool/ClangModernize.cpp?rev=190194&r1=190193&r2=190194&view=diff
==============================================================================
--- clang-tools-extra/trunk/clang-modernize/tool/ClangModernize.cpp (original)
+++ clang-tools-extra/trunk/clang-modernize/tool/ClangModernize.cpp Fri Sep  6 14:26:25 2013
@@ -99,22 +99,20 @@ static cl::opt<std::string> TimingDirect
                      "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"));
 

Modified: clang-tools-extra/trunk/docs/ModernizerUsage.rst
URL: http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/docs/ModernizerUsage.rst?rev=190194&r1=190193&r2=190194&view=diff
==============================================================================
--- clang-tools-extra/trunk/docs/ModernizerUsage.rst (original)
+++ clang-tools-extra/trunk/docs/ModernizerUsage.rst Fri Sep  6 14:26:25 2013
@@ -54,6 +54,32 @@ General Command Line Options
 
 .. _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





More information about the cfe-commits mailing list