Skip to content

Commit 1c50b49

Browse files
author
git apple-llvm automerger
committed
Merge commit 'b4d11c98917c' from llvm.org/main into next
2 parents 93930d8 + b4d11c9 commit 1c50b49

File tree

1 file changed

+30
-30
lines changed

1 file changed

+30
-30
lines changed

clang/docs/UsersManual.rst

Lines changed: 30 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ Introduction
1111
============
1212

1313
The Clang Compiler is an open-source compiler for the C family of
14-
programming languages, aiming to be the best in class implementation of
14+
programming languages, aiming to be the best-in-class implementation of
1515
these languages. Clang builds on the LLVM optimizer and code generator,
1616
allowing it to provide high-quality optimization and code generation
1717
support for many targets. For more general information, please see the
@@ -56,7 +56,7 @@ migration from GCC to Clang. In most cases, code "just works".
5656
Clang also provides an alternative driver, :ref:`clang-cl`, that is designed
5757
to be compatible with the Visual C++ compiler, cl.exe.
5858

59-
In addition to language specific features, Clang has a variety of
59+
In addition to language-specific features, Clang has a variety of
6060
features that depend on what CPU architecture or operating system is
6161
being compiled for. Please see the :ref:`Target-Specific Features and
6262
Limitations <target_features>` section for more details.
@@ -299,7 +299,7 @@ output format of the diagnostics that it generates.
299299

300300
This option controls the output format of the filename, line number,
301301
and column printed in diagnostic messages. The options, and their
302-
affect on formatting a simple conversion diagnostic, follow:
302+
effect on formatting a simple conversion diagnostic, follow:
303303

304304
**clang** (default)
305305
::
@@ -360,7 +360,7 @@ output format of the diagnostics that it generates.
360360
t.c:3:11: warning: conversion specifies type 'char *' but the argument has type 'int' [-Wformat,Format String]
361361

362362
This category can be used by clients that want to group diagnostics
363-
by category, so it should be a high level category. We want dozens
363+
by category, so it should be a high-level category. We want dozens
364364
of these, not hundreds or thousands of them.
365365

366366
.. _opt_fsave-optimization-record:
@@ -750,7 +750,7 @@ control the crash diagnostics.
750750

751751
Disable auto-generation of preprocessed source files during a clang crash.
752752

753-
The -fno-crash-diagnostics flag can be helpful for speeding the process
753+
The ``-fno-crash-diagnostics`` flag can be helpful for speeding the process
754754
of generating a delta reduced test case.
755755

756756
.. option:: -fcrash-diagnostics-dir=<dir>
@@ -779,7 +779,7 @@ Options to Emit Optimization Reports
779779
------------------------------------
780780

781781
Optimization reports trace, at a high-level, all the major decisions
782-
done by compiler transformations. For instance, when the inliner
782+
made by compiler transformations. For instance, when the inliner
783783
decides to inline function ``foo()`` into ``bar()``, or the loop unroller
784784
decides to unroll a loop N times, or the vectorizer decides to
785785
vectorize a loop body.
@@ -845,11 +845,11 @@ compilations steps.
845845

846846
.. option:: -fproc-stat-report=
847847

848-
This option requests driver to print used memory and execution time of each
848+
This option requests the driver to print used memory and execution time of each
849849
compilation step. The ``clang`` driver during execution calls different tools,
850850
like compiler, assembler, linker etc. With this option the driver reports
851851
total execution time, the execution time spent in user mode and peak memory
852-
usage of each the called tool. Value of the option specifies where the report
852+
usage of each called tool. Value of the option specifies where the report
853853
is sent to. If it specifies a regular file, the data are saved to this file in
854854
CSV format:
855855

@@ -869,7 +869,7 @@ compilations steps.
869869
* peak memory usage in Kb.
870870

871871
It is possible to specify this option without any value. In this case statistics
872-
are printed on standard output in human readable format:
872+
are printed on standard output in human-readable format:
873873

874874
.. code-block:: console
875875
@@ -884,7 +884,7 @@ compilations steps.
884884

885885
You can also use environment variables to control the process statistics reporting.
886886
Setting ``CC_PRINT_PROC_STAT`` to ``1`` enables the feature, the report goes to
887-
stdout in human readable format.
887+
stdout in human-readable format.
888888
Setting ``CC_PRINT_PROC_STAT_FILE`` to a fully qualified file path makes it report
889889
process statistics to the given file in the CSV format. Specifying a relative
890890
path will likely lead to multiple files with the same name created in different
@@ -922,7 +922,7 @@ Clang options that don't fit neatly into other categories.
922922
most filenames can be written to the file without any special formatting.
923923
Different Make tools will treat different sets of characters as "special"
924924
and use different conventions for telling the Make tool that the character
925-
is actually part of the filename. Normally Clang uses backslash to "escape"
925+
is actually part of the filename. Normally, Clang uses backslash to "escape"
926926
a special character, which is the convention used by GNU Make. The -MV
927927
option tells Clang to put double-quotes around the entire filename, which
928928
is the convention used by NMake and Jom.
@@ -957,7 +957,7 @@ Configuration files
957957

958958
Configuration files group command-line options and allow all of them to be
959959
specified just by referencing the configuration file. They may be used, for
960-
example, to collect options required to tune compilation for particular
960+
example, to collect options required to tune compilation for a particular
961961
target, such as ``-L``, ``-I``, ``-l``, ``--sysroot``, codegen options, etc.
962962

963963
Configuration files can be either specified on the command line or loaded
@@ -986,7 +986,7 @@ either during build or during runtime. At build time, use
986986
``CLANG_CONFIG_FILE_USER_DIR`` and ``CLANG_CONFIG_FILE_SYSTEM_DIR``. At run
987987
time use the ``--config-user-dir=`` and ``--config-system-dir=`` command line
988988
options. Specifying config directories at runtime overrides the config
989-
directories set at build time The first file found is used. It is an error if
989+
directories set at build time. The first file found is used. It is an error if
990990
the required file cannot be found.
991991

992992
The default configuration files are searched for in the same directories
@@ -996,7 +996,7 @@ the ``--no-default-config`` flag.
996996

997997
First, the algorithm searches for a configuration file named
998998
``<triple>-<driver>.cfg`` where `triple` is the triple for the target being
999-
built for, and `driver` is the name of the currently used driver. The algorithm
999+
built, and `driver` is the name of the currently used driver. The algorithm
10001000
first attempts to use the canonical name for the driver used, then falls back
10011001
to the one found in the executable name.
10021002

@@ -1047,7 +1047,7 @@ It is not an error if either of these files is not found.
10471047
The configuration file consists of command-line options specified on one or
10481048
more lines. Lines composed of whitespace characters only are ignored as well as
10491049
lines in which the first non-blank character is ``#``. Long options may be split
1050-
between several lines by a trailing backslash. Here is example of a
1050+
between several lines by a trailing backslash. Here is an example of a
10511051
configuration file:
10521052

10531053
::
@@ -1229,7 +1229,7 @@ Clang also allows you to push and pop the current warning state. This is
12291229
particularly useful when writing a header file that will be compiled by
12301230
other people, because you don't know what warning flags they build with.
12311231

1232-
In the below example :option:`-Wextra-tokens` is ignored for only a single line
1232+
In the example below, :option:`-Wextra-tokens` is ignored for only a single line
12331233
of code, after which the diagnostics return to whatever state had previously
12341234
existed.
12351235

@@ -1253,7 +1253,7 @@ of warnings, so even when using GCC-compatible #pragmas there is no
12531253
guarantee that they will have identical behaviour on both compilers.
12541254

12551255
Clang also doesn't yet support GCC behavior for ``#pragma diagnostic pop``
1256-
that doesn't have a corresponding ``#pragma diagnostic push``. In this case
1256+
that doesn't have a corresponding ``#pragma diagnostic push``. In this case,
12571257
GCC pretends that there is a ``#pragma diagnostic push`` at the very beginning
12581258
of the source file, so "unpaired" ``#pragma diagnostic pop`` matches that
12591259
implicit push. This makes a difference for ``#pragma GCC diagnostic ignored``
@@ -1406,7 +1406,7 @@ project even if there are violations in some headers.
14061406
# directory. But it'll still complain for all the other sources, e.g:
14071407
$ cat foo/bar.cc
14081408
#include "dir/include.h" // Clang flags unused declarations here.
1409-
#include "foo/include.h" // but unused warnings under this source is omitted.
1409+
#include "foo/include.h" // but unused warnings under this source are omitted.
14101410
#include "next_to_bar_cc.h" // as are unused warnings from this header file.
14111411
// Further, unused warnings in the remainder of bar.cc are also omitted.
14121412
@@ -1648,7 +1648,7 @@ for more details.
16481648

16491649
.. option:: -fno-fast-math
16501650

1651-
Disable fast-math mode. This options disables unsafe floating-point
1651+
Disable fast-math mode. This option disables unsafe floating-point
16521652
optimizations by preventing the compiler from making any transformations that
16531653
could affect the results.
16541654

@@ -1766,7 +1766,7 @@ for more details.
17661766

17671767
* ``fast``: enable fusion across statements disregarding pragmas, breaking
17681768
compliance with the C and C++ standards (default for CUDA).
1769-
* ``on``: enable C and C++ standard complaint fusion in the same statement
1769+
* ``on``: enable C and C++ standard compliant fusion in the same statement
17701770
unless dictated by pragmas (default for languages other than CUDA/HIP)
17711771
* ``off``: disable fusion
17721772
* ``fast-honor-pragmas``: fuse across statements unless dictated by pragmas
@@ -1919,7 +1919,7 @@ for more details.
19191919
a single expression of the code.
19201920

19211921
Valid values are: ``source``, ``double``, and ``extended``.
1922-
For 64-bit targets, the default value is ``source``. For 32-bit x86 targets
1922+
For 64-bit targets, the default value is ``source``. For 32-bit x86 targets,
19231923
however, in the case of NETBSD 6.99.26 and under, the default value is
19241924
``double``; in the case of NETBSD greater than 6.99.26, with NoSSE, the
19251925
default value is ``extended``, with SSE the default value is ``source``.
@@ -3881,9 +3881,9 @@ See :doc:`LanguageExtensions`.
38813881
Differences between various standard modes
38823882
------------------------------------------
38833883

3884-
clang supports the -std option, which changes what language mode clang uses.
3884+
clang supports the ``-std`` option, which changes what language mode clang uses.
38853885
The supported modes for C are c89, gnu89, c94, c99, gnu99, c11, gnu11, c17,
3886-
gnu17, c23, gnu23, c2y, gnu2y, and various aliases for those modes. If no -std
3886+
gnu17, c23, gnu23, c2y, gnu2y, and various aliases for those modes. If no ``-std``
38873887
option is specified, clang defaults to gnu17 mode. Many C99 and C11 features
38883888
are supported in earlier modes as a conforming extension, with a warning. Use
38893889
``-pedantic-errors`` to request an error if a feature from a later standard
@@ -4609,7 +4609,7 @@ codebases.
46094609

46104610
On ``x86_64-mingw32``, passing i128(by value) is incompatible with the
46114611
Microsoft x64 calling convention. You might need to tweak
4612-
``WinX86_64ABIInfo::classify()`` in lib/CodeGen/Targets/X86.cpp.
4612+
``WinX86_64ABIInfo::classify()`` in ``lib/CodeGen/Targets/X86.cpp``.
46134613

46144614
For the X86 target, clang supports the `-m16` command line
46154615
argument which enables 16-bit code output. This is broadly similar to
@@ -4760,8 +4760,8 @@ is imported, the linker will generate fixup code for reading or writing to the
47604760
variable.
47614761

47624762
When multiple toc-data options are used, the last option used has the affect.
4763-
For example: -mno-tocdata=g5,g1 -mtocdata=g1,g2 -mno-tocdata=g2 -mtocdata=g3,g4
4764-
results in -mtocdata=g1,g3,g4
4763+
For example: ``-mno-tocdata=g5,g1 -mtocdata=g1,g2 -mno-tocdata=g2 -mtocdata=g3,g4``
4764+
results in ``-mtocdata=g1,g3,g4``
47654765

47664766
Names of variables not having external linkage will be ignored.
47674767

@@ -5143,16 +5143,16 @@ Execute ``clang-cl /?`` to see a list of supported options:
51435143
Instrument only functions from files where names match any regex separated by a semi-colon
51445144
-fprofile-generate=<dirname>
51455145
Generate instrumented code to collect execution counts into a raw profile file in the directory specified by the argument. The filename uses default_%m.profraw pattern
5146-
(overridden by LLVM_PROFILE_FILE env var)
5146+
(overridden by ``LLVM_PROFILE_FILE`` env var)
51475147
-fprofile-generate
51485148
Generate instrumented code to collect execution counts into default_%m.profraw file
5149-
(overridden by '=' form of option or LLVM_PROFILE_FILE env var)
5149+
(overridden by '=' form of option or ``LLVM_PROFILE_FILE`` env var)
51505150
-fprofile-instr-generate=<file_name_pattern>
51515151
Generate instrumented code to collect execution counts into the file whose name pattern is specified as the argument
5152-
(overridden by LLVM_PROFILE_FILE env var)
5152+
(overridden by ``LLVM_PROFILE_FILE`` env var)
51535153
-fprofile-instr-generate
51545154
Generate instrumented code to collect execution counts into default.profraw file
5155-
(overridden by '=' form of option or LLVM_PROFILE_FILE env var)
5155+
(overridden by '=' form of option or ``LLVM_PROFILE_FILE`` env var)
51565156
-fprofile-instr-use=<value>
51575157
Use instrumentation data for coverage testing or profile-guided optimization
51585158
-fprofile-use=<value>

0 commit comments

Comments
 (0)