diff options
Diffstat (limited to 'clang/docs')
-rw-r--r-- | clang/docs/ClangFormatStyleOptions.rst | 4 | ||||
-rw-r--r-- | clang/docs/ClangTools.rst | 43 | ||||
-rw-r--r-- | clang/docs/LanguageExtensions.rst | 18 | ||||
-rw-r--r-- | clang/docs/ReleaseNotes.rst | 4 | ||||
-rw-r--r-- | clang/docs/StandardCPlusPlusModules.rst | 16 | ||||
-rw-r--r-- | clang/docs/UsersManual.rst | 16 |
6 files changed, 69 insertions, 32 deletions
diff --git a/clang/docs/ClangFormatStyleOptions.rst b/clang/docs/ClangFormatStyleOptions.rst index bfc8094..d39ee49 100644 --- a/clang/docs/ClangFormatStyleOptions.rst +++ b/clang/docs/ClangFormatStyleOptions.rst @@ -4201,8 +4201,8 @@ the configuration (without a prefix: ``Auto``). * ``""`` means "arbitrary suffix" * ``"$"`` means "no suffix" - For example, if configured to ``"(_test)?$"``, then a header a.h would be seen - as the "main" include in both a.cc and a_test.cc. + For example, if configured to ``"(_test)?$"``, then a header a.h would be + seen as the "main" include in both a.cc and a_test.cc. .. _IncludeIsMainSourceRegex: diff --git a/clang/docs/ClangTools.rst b/clang/docs/ClangTools.rst index 60e2159..3216328 100644 --- a/clang/docs/ClangTools.rst +++ b/clang/docs/ClangTools.rst @@ -89,13 +89,50 @@ they'll be tracked here. The focus of this documentation is on the scope and features of the tools for other tool developers; each tool should provide its own user-focused documentation. -``clang-tidy`` +``Clang-Doc`` +------------- + +`Clang-Doc <https://clang.llvm.org/extra/clang-doc.html>`_ is a tool for +generating C and C++ documentation from source code and comments. + +``Clang-Include-Fixer`` +----------------------- + +`Clang-Include-Fixer <https://clang.llvm.org/extra/clang-include-fixer.html>`_ +is a tool to automate the addition of missing ``#include`` directives in a C++ +file. It adds missing namespace qualifiers to unidentified symbols when +necessary and also removes unused headers. + +``Clang-Tidy`` -------------- -`clang-tidy <https://clang.llvm.org/extra/clang-tidy/>`_ is a clang-based C++ +`Clang-Tidy <https://clang.llvm.org/extra/clang-tidy/>`_ is a Clang-based C++ linter tool. It provides an extensible framework for building compiler-based static analyses detecting and fixing bug-prone patterns, performance, -portability and maintainability issues. +portability and maintainability issues. It also has checks for modernizing code +to newer language standards. + +``Clangd`` +---------- + +`Clangd <https://clangd.llvm.org/>`_ is a language server that can work with +many editors via a plugin. It understands your C++ code and adds smart +features to your editor: code completion, compile errors, go-to-definition and +more. + +``Modularize`` +-------------- + +`Modularize <https://clang.llvm.org/extra/modularize.html>`_ is a standalone +tool that checks whether a set of headers provides the consistent definitions +required to use modules. + +``pp-trace`` +------------ + +`pp-trace <https://clang.llvm.org/extra/pp-trace.html>`_ is a standalone tool +that traces preprocessor activity. It’s also used as a test of Clang’s +``PPCallbacks`` interface. Ideas for new Tools diff --git a/clang/docs/LanguageExtensions.rst b/clang/docs/LanguageExtensions.rst index f448a9a..b334e25 100644 --- a/clang/docs/LanguageExtensions.rst +++ b/clang/docs/LanguageExtensions.rst @@ -138,7 +138,7 @@ for support for non-standardized features, i.e. features not prefixed ``c_``, ``cxx_`` or ``objc_``. Another use of ``__has_feature`` is to check for compiler features not related -to the language standard, such as e.g. :doc:`AddressSanitizer +to the language standard, such as :doc:`AddressSanitizer <AddressSanitizer>`. If the ``-pedantic-errors`` option is given, ``__has_extension`` is equivalent @@ -377,8 +377,8 @@ Builtin Macros ``__FILE_NAME__`` Clang-specific extension that functions similar to ``__FILE__`` but only - renders the last path component (the filename) instead of an invocation - dependent full path to that file. + renders the last path component (the filename) instead of an + invocation-dependent full path to that file. ``__COUNTER__`` Defined to an integer value that starts at zero and is incremented each time @@ -716,7 +716,7 @@ See also :ref:`langext-__builtin_shufflevector`, :ref:`langext-__builtin_convert a NEON vector or an SVE vector, it's only available in C++ and uses normal bool conversions (that is, != 0). If it's an extension (OpenCL) vector, it's only available in C and OpenCL C. - And it selects base on signedness of the condition operands (OpenCL v1.1 s6.3.9). + And it selects based on signedness of the condition operands (OpenCL v1.1 s6.3.9). .. [#] sizeof can only be used on vector length specific SVE types. .. [#] Clang does not allow the address of an element to be taken while GCC allows this. This is intentional for vectors with a boolean element type and @@ -857,7 +857,7 @@ Each builtin returns a scalar equivalent to applying the specified operation(x, y) as recursive even-odd pairwise reduction to all vector elements. ``operation(x, y)`` is repeatedly applied to each non-overlapping even-odd element pair with indices ``i * 2`` and ``i * 2 + 1`` with -``i in [0, Number of elements / 2)``. If the numbers of elements is not a +``i in [0, Number of elements / 2)``. If the number of elements is not a power of 2, the vector is widened with neutral elements for the reduction at the end to the next power of 2. @@ -1491,7 +1491,7 @@ C++14 digit separators Use ``__cpp_digit_separators`` to determine if support for digit separators using single quotes (for instance, ``10'000``) is enabled. At this time, there -is no corresponding ``__has_feature`` name +is no corresponding ``__has_feature`` name. C++14 generalized lambda capture ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -1545,7 +1545,7 @@ C++ type aware allocators ^^^^^^^^^^^^^^^^^^^^^^^^^ Use ``__has_extension(cxx_type_aware_allocators)`` to determine the existence of -support for the future C++2d type aware allocator feature. For full details see +support for the future C++2d type aware allocator feature. For full details, see :doc:`C++ Type Aware Allocators <CXXTypeAwareAllocators>` for additional details. C11 @@ -1643,7 +1643,7 @@ Modules Use ``__has_feature(modules)`` to determine if Modules have been enabled. For example, compiling code with ``-fmodules`` enables the use of Modules. -More information could be found `here <https://clang.llvm.org/docs/Modules.html>`_. +More information can be found `here <https://clang.llvm.org/docs/Modules.html>`_. Language Extensions Back-ported to Previous Standards ===================================================== @@ -1878,7 +1878,7 @@ The following type trait primitives are supported by Clang. Those traits marked C++26 relocatable types, and types which were made trivially relocatable via the ``clang::trivial_abi`` attribute. This trait is deprecated and should be replaced by - ``__builtin_is_cpp_trivially_relocatable``. Note however that it is generally + ``__builtin_is_cpp_trivially_relocatable``. Note, however, that it is generally unsafe to relocate a C++-relocatable type with ``memcpy`` or ``memmove``; use ``__builtin_trivially_relocate``. * ``__builtin_is_cpp_trivially_relocatable`` (C++): Returns true if an object diff --git a/clang/docs/ReleaseNotes.rst b/clang/docs/ReleaseNotes.rst index 46a7767..81483c1 100644 --- a/clang/docs/ReleaseNotes.rst +++ b/clang/docs/ReleaseNotes.rst @@ -77,6 +77,10 @@ C++ Specific Potentially Breaking Changes whose nested-name-specifier doesn't refer to a base class such as ``using CurrentClass::Foo;`` is now rejected in C++98 mode. +- For C++20 modules, the Reduced BMI mode will be the default option. This may introduce + regressions if your build system supports two-phase compilation model but haven't support + reduced BMI or it is a compiler bug or a bug in users code. + ABI Changes in This Version --------------------------- diff --git a/clang/docs/StandardCPlusPlusModules.rst b/clang/docs/StandardCPlusPlusModules.rst index 933a57f..31d0a5e 100644 --- a/clang/docs/StandardCPlusPlusModules.rst +++ b/clang/docs/StandardCPlusPlusModules.rst @@ -687,16 +687,12 @@ fails to instantiate. For such issues, users can add references to ``N::g`` in the `module purview <https://eel.is/c++draft/module.unit#5>`_ of ``M.cppm`` to ensure it is reachable, e.g. ``using N::g;``. -Support for Reduced BMIs is still experimental, but it may become the default -in the future. The expected roadmap for Reduced BMIs as of Clang 19.x is: - -1. ``-fexperimental-modules-reduced-bmi`` was introduced in v19.x -2. For v20.x, ``-fmodules-reduced-bmi`` is introduced as an equivalent non-experimental - option. It is expected to stay opt-in for 1~2 releases, though the period depends - on user feedback and may be extended. -3. Finally, ``-fmodules-reduced-bmi`` will be the default. When that time - comes, the term BMI will refer to the Reduced BMI and the Full BMI will only - be meaningful to build systems which elect to support two-phase compilation. +As of Clang 22.x, the Reduced BMI is enabled by default. You may still want to +use Full BMI with ``-fno-modules-reduced-bmi`` in the following case: +1. Your build system uses two-phase compilation but it haven't adjusted the +implementation for reduced BMI. +2. You meet a regression with Reduced BMI that you cannot work around. Please +report an issue for this case. Experimental Non-Cascading Changes ---------------------------------- diff --git a/clang/docs/UsersManual.rst b/clang/docs/UsersManual.rst index 284a404..af0a874 100644 --- a/clang/docs/UsersManual.rst +++ b/clang/docs/UsersManual.rst @@ -319,7 +319,7 @@ output format of the diagnostics that it generates. This option, which defaults to "none", controls whether or not Clang prints the category associated with a diagnostic when emitting it. - Each diagnostic may or many not have an associated category, if it + Each diagnostic may or may not have an associated category, if it has one, it is listed in the diagnostic categorization field of the diagnostic line (in the []'s). @@ -737,7 +737,7 @@ control the crash diagnostics. crash diagnostics files, but with lower precedence than the option. Clang is also capable of generating preprocessed source file(s) and associated -run script(s) even without a crash. This is specially useful when trying to +run script(s) even without a crash. This is especially useful when trying to generate a reproducer for warnings or errors while using modules. .. option:: -gen-reproducer @@ -1061,7 +1061,7 @@ In this way, the user may only need to specify a root configuration file with Usually, config file options are placed before command-line options, regardless of the actual operation to be performed. The exception is being made for the -options prefixed with the ``$`` character. These will be used only when linker +options prefixed with the ``$`` character. These will be used only when the linker is being invoked, and added after all of the command-line specified linker inputs. Here is some example of ``$``-prefixed options: @@ -1222,7 +1222,7 @@ existed. The push and pop pragmas will save and restore the full diagnostic state of the compiler, regardless of how it was set. It should be noted that while Clang supports the GCC pragma, Clang and GCC do not support the exact same set -of warnings, so even when using GCC compatible #pragmas there is no +of warnings, so even when using GCC-compatible #pragmas there is no guarantee that they will have identical behaviour on both compilers. Clang also doesn't yet support GCC behavior for ``#pragma diagnostic pop`` @@ -1681,7 +1681,7 @@ for more details. * ``preserve-sign`` - the sign of a flushed-to-zero number is preserved in the sign of 0 * ``positive-zero`` - denormals are flushed to positive zero - The default value depends on the target. For most targets, defaults to + The default value depends on the target. For most targets, it defaults to ``ieee``. .. option:: -f[no-]strict-float-cast-overflow @@ -1730,7 +1730,7 @@ for more details. the C and C++ standards but can be enabled using ``-ffp-contract=fast``. Fusion can be controlled with the ``FP_CONTRACT`` and ``clang fp contract`` - pragmas. Please note that pragmas will be ingored with + pragmas. Please note that pragmas will be ignored with ``-ffp-contract=fast``, and refer to the pragma documentation for a description of how the pragmas interact with the different ``-ffp-contract`` option values. @@ -1984,11 +1984,11 @@ for more details. call to runtime library functions (generally the case, but the BE might sometimes replace the library call if it knows enough about the potential range of the inputs). Overflow and non-finite values are handled by the - library implementation. For the case of multiplication overflow will occur in + library implementation. For the case of multiplication, overflow will occur in accordance with normal floating-point rules. This is the default value. * ``promoted`` Implementation of complex division using algebraic formulas at higher precision. Overflow is handled. Non-finite values are handled in some - cases. If the target does not have native support for a higher precision + cases. If the target does not have native support for a higher-precision data type, the implementation for the complex operation using the Smith algorithm will be used. Overflow may still occur in some cases. NaN and infinite values are not handled. |