mirror of
https://github.com/llvm/llvm-project.git
synced 2025-04-25 02:46:11 +00:00
[docs] Remove doubled spaces
Reviewers: aaron.ballman Subscribers: nemanjai, cfe-commits Differential Revision: https://reviews.llvm.org/D26798 llvm-svn: 287226
This commit is contained in:
parent
d8b81d6663
commit
5831a00634
@ -10,9 +10,9 @@ specific to modularize, which are described below in
|
||||
`Modularize Command Line Options`.
|
||||
|
||||
``<module-map>`` specifies the path of a file name for an
|
||||
existing module map. The module map must be well-formed in
|
||||
terms of syntax. Modularize will extract the header file names
|
||||
from the map. Only normal headers are checked, assuming headers
|
||||
existing module map. The module map must be well-formed in
|
||||
terms of syntax. Modularize will extract the header file names
|
||||
from the map. Only normal headers are checked, assuming headers
|
||||
marked "private", "textual", or "exclude" are not to be checked
|
||||
as a top-level include, assuming they either are included by
|
||||
other headers which are checked, or they are not suitable for
|
||||
@ -32,7 +32,7 @@ but must be on the same line. For example::
|
||||
|
||||
Note that unless a ``-prefix (header path)`` option is specified,
|
||||
non-absolute file paths in the header list file will be relative
|
||||
to the header list file directory. Use -prefix to specify a different
|
||||
to the header list file directory. Use -prefix to specify a different
|
||||
directory.
|
||||
|
||||
``<front-end-options>`` is a place-holder for regular Clang
|
||||
@ -53,24 +53,24 @@ Modularize Command Line Options
|
||||
|
||||
Prepend the given path to non-absolute file paths in the header list file.
|
||||
By default, headers are assumed to be relative to the header list file
|
||||
directory. Use ``-prefix`` to specify a different directory.
|
||||
directory. Use ``-prefix`` to specify a different directory.
|
||||
|
||||
.. option:: -module-map-path=<module-map-path>
|
||||
|
||||
Generate a module map and output it to the given file. See the description
|
||||
Generate a module map and output it to the given file. See the description
|
||||
in :ref:`module-map-generation`.
|
||||
|
||||
.. option:: -problem-files-list=<problem-files-list-file-name>
|
||||
|
||||
For use only with module map assistant. Input list of files that
|
||||
have problems with respect to modules. These will still be
|
||||
For use only with module map assistant. Input list of files that
|
||||
have problems with respect to modules. These will still be
|
||||
included in the generated module map, but will be marked as
|
||||
"excluded" headers.
|
||||
|
||||
.. option:: -root-module=<root-name>
|
||||
|
||||
Put modules generated by the -module-map-path option in an enclosing
|
||||
module with the given name. See the description in :ref:`module-map-generation`.
|
||||
module with the given name. See the description in :ref:`module-map-generation`.
|
||||
|
||||
.. option:: -block-check-header-list-only
|
||||
|
||||
@ -93,6 +93,6 @@ Modularize Command Line Options
|
||||
and a combined list with problem files preceded by a '#'.
|
||||
This can be used to quickly determine which files have problems.
|
||||
The latter combined list might be useful in starting to modularize
|
||||
a set of headers. You can start with a full list of headers,
|
||||
a set of headers. You can start with a full list of headers,
|
||||
use -display-file-lists option, and then use the combined list as
|
||||
your intermediate list, uncommenting-out headers as you fix them.
|
||||
|
@ -11,7 +11,7 @@ variable that is actually of type X to be accessed as if it were of an unrelated
|
||||
type Z. Note that a C-style ``(T)expression`` cast means to perform the first of
|
||||
the following that is possible: a ``const_cast``, a ``static_cast``, a
|
||||
``static_cast`` followed by a ``const_cast``, a ``reinterpret_cast``, or a
|
||||
``reinterpret_cast`` followed by a ``const_cast``. This rule bans
|
||||
``reinterpret_cast`` followed by a ``const_cast``. This rule bans
|
||||
``(T)expression`` only when used to perform an unsafe cast.
|
||||
|
||||
This rule is part of the "Type safety" profile of the C++ Core Guidelines, see
|
||||
|
@ -31,7 +31,7 @@ Options
|
||||
|
||||
If set to non-zero, the check will not warn about array members that are not
|
||||
zero-initialized during construction. For performance critical code, it may
|
||||
be important to not initialize fixed-size array members. Default is `0`.
|
||||
be important to not initialize fixed-size array members. Default is `0`.
|
||||
|
||||
This rule is part of the "Type safety" profile of the C++ Core
|
||||
Guidelines, corresponding to rule Type.6. See
|
||||
|
@ -140,7 +140,7 @@ Options
|
||||
.. option:: WarnOnSizeOfConstant
|
||||
|
||||
When non-zero, the check will warn on an expression like
|
||||
``sizeof(CONSTANT)``. Default is `1`.
|
||||
``sizeof(CONSTANT)``. Default is `1`.
|
||||
|
||||
.. option:: WarnOnSizeOfThis
|
||||
|
||||
|
@ -37,10 +37,10 @@ converted to a raw string literal: ``\\``, ``\'``, ``\"``, ``\?``,
|
||||
and octal or hexadecimal escapes for printable ASCII characters.
|
||||
|
||||
A string literal containing only escaped newlines is a common way of
|
||||
writing lines of text output. Introducing physical newlines with raw
|
||||
string literals in this case is likely to impede readability. These
|
||||
writing lines of text output. Introducing physical newlines with raw
|
||||
string literals in this case is likely to impede readability. These
|
||||
string literals are left unchanged.
|
||||
|
||||
An escaped horizontal tab, form feed, or vertical tab prevents the string
|
||||
literal from being converted. The presence of a horizontal tab, form feed or
|
||||
literal from being converted. The presence of a horizontal tab, form feed or
|
||||
vertical tab in source code is not visually obvious.
|
||||
|
@ -4,7 +4,7 @@ modernize-use-auto
|
||||
==================
|
||||
|
||||
This check is responsible for using the ``auto`` type specifier for variable
|
||||
declarations to *improve code readability and maintainability*. For example:
|
||||
declarations to *improve code readability and maintainability*. For example:
|
||||
|
||||
.. code-block:: c++
|
||||
|
||||
|
@ -4,7 +4,7 @@ modernize-use-default
|
||||
=====================
|
||||
|
||||
This check replaces default bodies of special member functions with ``=
|
||||
default;``. The explicitly defaulted function declarations enable more
|
||||
default;``. The explicitly defaulted function declarations enable more
|
||||
opportunities in optimization, because the compiler might treat explicitly
|
||||
defaulted functions as trivial.
|
||||
|
||||
|
@ -75,7 +75,7 @@ For more info read item 42 - "Consider emplacement instead of insertion." of
|
||||
Scott Meyers "Effective Modern C++".
|
||||
|
||||
The default smart pointers that are considered are ``std::unique_ptr``,
|
||||
``std::shared_ptr``, ``std::auto_ptr``. To specify other smart pointers or
|
||||
``std::shared_ptr``, ``std::auto_ptr``. To specify other smart pointers or
|
||||
other classes use the :option:`SmartPointers` option.
|
||||
|
||||
|
||||
|
@ -4,7 +4,7 @@ performance-faster-string-find
|
||||
==============================
|
||||
|
||||
Optimize calls to ``std::string::find()`` and friends when the needle passed is
|
||||
a single character string literal. The character literal overload is more
|
||||
a single character string literal. The character literal overload is more
|
||||
efficient.
|
||||
|
||||
Examples:
|
||||
|
@ -33,6 +33,6 @@ Options
|
||||
to trigger this check.
|
||||
|
||||
The number of lines is counted from the end of condition or initial keyword
|
||||
(``do``/``else``) until the last line of the inner statement. Default value
|
||||
(``do``/``else``) until the last line of the inner statement. Default value
|
||||
`0` means that braces will be added to all statements (not having them
|
||||
already).
|
||||
|
@ -116,7 +116,7 @@ An overview of all the command-line options:
|
||||
prefix add checks with matching names to the
|
||||
set, globs with the '-' prefix remove checks
|
||||
with matching names from the set of enabled
|
||||
checks. This option's value is appended to the
|
||||
checks. This option's value is appended to the
|
||||
value of the 'Checks' option in .clang-tidy
|
||||
file, if any.
|
||||
-config=<string> -
|
||||
@ -544,7 +544,7 @@ The ``check_clang_tidy.py`` script provides an easy way to test both
|
||||
diagnostic messages and fix-its. It filters out ``CHECK`` lines from the test
|
||||
file, runs :program:`clang-tidy` and verifies messages and fixes with two
|
||||
separate `FileCheck`_ invocations. To use the script, put a .cpp file with the
|
||||
appropriate ``RUN`` line in the ``test/clang-tidy`` directory. Use
|
||||
appropriate ``RUN`` line in the ``test/clang-tidy`` directory. Use
|
||||
``CHECK-MESSAGES:`` and ``CHECK-FIXES:`` lines to write checks against
|
||||
diagnostic messages and fixed code.
|
||||
|
||||
|
@ -122,7 +122,7 @@ in your ``.emacs``:
|
||||
(require 'clang-include-fixer)
|
||||
|
||||
Within Emacs the tool can be invoked with the command
|
||||
``M-x clang-include-fixer``. This will insert the header that defines the
|
||||
``M-x clang-include-fixer``. This will insert the header that defines the
|
||||
first undefined symbol; if there is more than one header that would define the
|
||||
symbol, the user is prompted to select one.
|
||||
|
||||
|
@ -39,7 +39,7 @@ or reference manual for each tool.
|
||||
|
||||
.. _`Doxygen documentation`: doxygen/annotated.html
|
||||
|
||||
.. note::
|
||||
.. note::
|
||||
This documentation is generated directly from the source code with doxygen.
|
||||
Since the tools of clang-tools-extra are constantly under active
|
||||
development, what you're about to read is out of date!
|
||||
|
@ -18,7 +18,7 @@ headers to behave poorly, and should be fixed before introducing a module
|
||||
map.
|
||||
|
||||
:program:`modularize` also has an assistant mode option for generating
|
||||
a module map file based on the provided header list. The generated file
|
||||
a module map file based on the provided header list. The generated file
|
||||
is a functional module map that can be used as a starting point for a
|
||||
module.map file.
|
||||
|
||||
@ -115,10 +115,10 @@ Module Map Coverage Check
|
||||
=========================
|
||||
|
||||
The coverage check uses the Clang library to read and parse the
|
||||
module map file. Starting at the module map file directory, or just the
|
||||
module map file. Starting at the module map file directory, or just the
|
||||
include paths, if specified, it will collect the names of all the files it
|
||||
considers headers (no extension, .h, or .inc--if you need more, modify the
|
||||
isHeader function). It then compares the headers against those referenced
|
||||
isHeader function). It then compares the headers against those referenced
|
||||
in the module map, either explicitly named, or implicitly named via an
|
||||
umbrella directory or umbrella file, as parsed by the ModuleMap object.
|
||||
If headers are found which are not referenced or covered by an umbrella
|
||||
@ -128,7 +128,7 @@ will return an error code of 1. If no problems are found, an error code of
|
||||
|
||||
Note that in the case of umbrella headers, this tool invokes the compiler
|
||||
to preprocess the file, and uses a callback to collect the header files
|
||||
included by the umbrella header or any of its nested includes. If any
|
||||
included by the umbrella header or any of its nested includes. If any
|
||||
front end options are needed for these compiler invocations, these
|
||||
can be included on the command line after the module map file argument.
|
||||
|
||||
@ -154,10 +154,10 @@ Module Map Generation
|
||||
|
||||
If you specify the ``-module-map-path=<module map file>``,
|
||||
:program:`modularize` will output a module map based on the input header list.
|
||||
A module will be created for each header. Also, if the header in the header
|
||||
A module will be created for each header. Also, if the header in the header
|
||||
list is a partial path, a nested module hierarchy will be created in which a
|
||||
module will be created for each subdirectory component in the header path,
|
||||
with the header itself represented by the innermost module. If other headers
|
||||
with the header itself represented by the innermost module. If other headers
|
||||
use the same subdirectories, they will be enclosed in these same modules also.
|
||||
|
||||
For example, for the header list::
|
||||
@ -258,8 +258,8 @@ Clang module mechanism doesn't support headers the rely on other headers
|
||||
to be included first.
|
||||
|
||||
The module map format defines some keywords which can't be used in module
|
||||
names. If a header has one of these names, an underscore ('_') will be
|
||||
prepended to the name. For example, if the header name is ``header.h``,
|
||||
names. If a header has one of these names, an underscore ('_') will be
|
||||
prepended to the name. For example, if the header name is ``header.h``,
|
||||
because ``header`` is a keyword, the module name will be ``_header``.
|
||||
For a list of the module map keywords, please see:
|
||||
`Lexical structure <http://clang.llvm.org/docs/Modules.html#lexical-structure>`_
|
||||
|
@ -8,11 +8,11 @@ pp-trace User's Manual
|
||||
:hidden:
|
||||
|
||||
:program:`pp-trace` is a standalone tool that traces preprocessor
|
||||
activity. It's also used as a test of Clang's PPCallbacks interface.
|
||||
activity. It's also used as a test of Clang's PPCallbacks interface.
|
||||
It runs a given source file through the Clang preprocessor, displaying
|
||||
selected information from callback functions overridden in a
|
||||
`PPCallbacks <http://clang.llvm.org/doxygen/classclang_1_1PPCallbacks.html>`_
|
||||
derivation. The output is in a high-level YAML format, described in
|
||||
derivation. The output is in a high-level YAML format, described in
|
||||
:ref:`OutputFormat`.
|
||||
|
||||
.. _Usage:
|
||||
@ -43,8 +43,8 @@ Command Line Options
|
||||
.. option:: -ignore <callback-name-list>
|
||||
|
||||
This option specifies a comma-separated list of names of callbacks
|
||||
that shouldn't be traced. It can be used to eliminate unwanted
|
||||
trace output. The callback names are the name of the actual
|
||||
that shouldn't be traced. It can be used to eliminate unwanted
|
||||
trace output. The callback names are the name of the actual
|
||||
callback function names in the PPCallbacks class:
|
||||
|
||||
* FileChanged
|
||||
@ -80,7 +80,7 @@ Command Line Options
|
||||
|
||||
.. option:: -output <output-file>
|
||||
|
||||
By default, pp-trace outputs the trace information to stdout. Use this
|
||||
By default, pp-trace outputs the trace information to stdout. Use this
|
||||
option to output the trace information to a file.
|
||||
|
||||
.. _OutputFormat:
|
||||
@ -88,8 +88,8 @@ Command Line Options
|
||||
pp-trace Output Format
|
||||
======================
|
||||
|
||||
The pp-trace output is formatted as YAML. See http://yaml.org/ for general
|
||||
YAML information. It's arranged as a sequence of information about the
|
||||
The pp-trace output is formatted as YAML. See http://yaml.org/ for general
|
||||
YAML information. It's arranged as a sequence of information about the
|
||||
callback call, including the callback name and argument information, for
|
||||
example:::
|
||||
|
||||
@ -135,9 +135,9 @@ The Argument Name field in most (but not all) cases is the same name as the
|
||||
callback function parameter.
|
||||
|
||||
The Argument Value Syntax field describes the values that will be displayed
|
||||
for the argument value. It uses an ad hoc representation that mixes literal
|
||||
and symbolic representations. Enumeration member symbols are shown as the
|
||||
actual enum member in a (member1|member2|...) form. A name in parentheses
|
||||
for the argument value. It uses an ad hoc representation that mixes literal
|
||||
and symbolic representations. Enumeration member symbols are shown as the
|
||||
actual enum member in a (member1|member2|...) form. A name in parentheses
|
||||
can either represent a place holder for the described value, or confusingly,
|
||||
it might be a literal, such as (null), for a null pointer.
|
||||
Locations are shown as quoted only to avoid confusing the documentation generator.
|
||||
@ -154,7 +154,7 @@ instead of trying to display all members of the structure.
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
FileChanged is called when the preprocessor enters or exits a file, both the
|
||||
top level file being compiled, as well as any #include directives. It will
|
||||
top level file being compiled, as well as any #include directives. It will
|
||||
also be called as a result of a system header pragma or in internal renaming
|
||||
of a file.
|
||||
|
||||
@ -163,9 +163,9 @@ Argument descriptions:
|
||||
============== ================================================== ============================== ==============================
|
||||
Argument Name Argument Value Syntax Clang C++ Type Description
|
||||
============== ================================================== ============================== ==============================
|
||||
Loc "(file):(line):(col)" SourceLocation The location of the directive.
|
||||
Reason (EnterFile|ExitFile|SystemHeaderPragma|RenameFile) PPCallbacks::FileChangeReason Reason for change.
|
||||
FileType (C_User|C_System|C_ExternCSystem) SrcMgr::CharacteristicKind Include type.
|
||||
Loc "(file):(line):(col)" SourceLocation The location of the directive.
|
||||
Reason (EnterFile|ExitFile|SystemHeaderPragma|RenameFile) PPCallbacks::FileChangeReason Reason for change.
|
||||
FileType (C_User|C_System|C_ExternCSystem) SrcMgr::CharacteristicKind Include type.
|
||||
PrevFID ((file)|(invalid)) FileID Previous file, if any.
|
||||
============== ================================================== ============================== ==============================
|
||||
|
||||
@ -189,7 +189,7 @@ Argument descriptions:
|
||||
Argument Name Argument Value Syntax Clang C++ Type Description
|
||||
============== ================================================== ============================== ========================================================
|
||||
ParentFile ("(file)" or (null)) const FileEntry The file that #included the skipped file.
|
||||
FilenameTok (token) const Token The token in ParentFile that indicates the skipped file.
|
||||
FilenameTok (token) const Token The token in ParentFile that indicates the skipped file.
|
||||
FileType (C_User|C_System|C_ExternCSystem) SrcMgr::CharacteristicKind The file type.
|
||||
============== ================================================== ============================== ========================================================
|
||||
|
||||
@ -238,7 +238,7 @@ FilenameRange "(file)" CharSource
|
||||
File "(file)" const FileEntry The actual file that may be included by this inclusion directive.
|
||||
SearchPath "(path)" StringRef Contains the search path which was used to find the file in the file system.
|
||||
RelativePath "(path)" StringRef The path relative to SearchPath, at which the include file was found.
|
||||
Imported ((module name)|(null)) const Module The module, whenever an inclusion directive was automatically turned into a module import or null otherwise.
|
||||
Imported ((module name)|(null)) const Module The module, whenever an inclusion directive was automatically turned into a module import or null otherwise.
|
||||
============== ================================================== ============================== ============================================================================================================
|
||||
|
||||
Example:::
|
||||
@ -265,7 +265,7 @@ Argument Name Argument Value Syntax Clang C++
|
||||
============== ================================================== ============================== ===========================================================
|
||||
ImportLoc "(file):(line):(col)" SourceLocation The location of import directive token.
|
||||
Path "(path)" ModuleIdPath The identifiers (and their locations) of the module "path".
|
||||
Imported ((module name)|(null)) const Module The imported module; can be null if importing failed.
|
||||
Imported ((module name)|(null)) const Module The imported module; can be null if importing failed.
|
||||
============== ================================================== ============================== ===========================================================
|
||||
|
||||
Example:::
|
||||
@ -302,8 +302,8 @@ Argument descriptions:
|
||||
============== ================================================== ============================== ==============================
|
||||
Argument Name Argument Value Syntax Clang C++ Type Description
|
||||
============== ================================================== ============================== ==============================
|
||||
Loc "(file):(line):(col)" SourceLocation The location of the directive.
|
||||
str (name) const std::string The text of the directive.
|
||||
Loc "(file):(line):(col)" SourceLocation The location of the directive.
|
||||
str (name) const std::string The text of the directive.
|
||||
============== ================================================== ============================== ==============================
|
||||
|
||||
Example:::
|
||||
@ -322,7 +322,7 @@ Argument descriptions:
|
||||
============== ================================================== ============================== =================================
|
||||
Argument Name Argument Value Syntax Clang C++ Type Description
|
||||
============== ================================================== ============================== =================================
|
||||
Loc "(file):(line):(col)" SourceLocation The location of the directive.
|
||||
Loc "(file):(line):(col)" SourceLocation The location of the directive.
|
||||
Introducer (PIK_HashPragma|PIK__Pragma|PIK___pragma) PragmaIntroducerKind The type of the pragma directive.
|
||||
============== ================================================== ============================== =================================
|
||||
|
||||
@ -407,9 +407,9 @@ Argument descriptions:
|
||||
Argument Name Argument Value Syntax Clang C++ Type Description
|
||||
============== ================================================== ============================== =======================================
|
||||
Loc "(file):(line):(col)" SourceLocation The location of the directive.
|
||||
Namespace (name) StringRef The namespace of the message directive.
|
||||
Kind (PMK_Message|PMK_Warning|PMK_Error) PPCallbacks::PragmaMessageKind The type of the message directive.
|
||||
Str (string) StringRef The text of the message directive.
|
||||
Namespace (name) StringRef The namespace of the message directive.
|
||||
Kind (PMK_Message|PMK_Warning|PMK_Error) PPCallbacks::PragmaMessageKind The type of the message directive.
|
||||
Str (string) StringRef The text of the message directive.
|
||||
============== ================================================== ============================== =======================================
|
||||
|
||||
Example:::
|
||||
@ -581,7 +581,7 @@ Argument Name Argument Value Syntax Clang C++
|
||||
MacroNameTok (token) const Token The macro name token.
|
||||
MacroDirective (MD_Define|MD_Undefine|MD_Visibility) const MacroDirective The kind of macro directive from the MacroDirective structure.
|
||||
Range ["(file):(line):(col)", "(file):(line):(col)"] SourceRange The source range for the expansion.
|
||||
Args [(name)|(number)|<(token name)>[, ...]] const MacroArgs The argument tokens. Names and numbers are literal, everything else is of the form '<' tokenName '>'.
|
||||
Args [(name)|(number)|<(token name)>[, ...]] const MacroArgs The argument tokens. Names and numbers are literal, everything else is of the form '<' tokenName '>'.
|
||||
============== ================================================== ============================== ======================================================================================================
|
||||
|
||||
Example:::
|
||||
|
Loading…
x
Reference in New Issue
Block a user