Fix two bugs in readability-use-std-min-max when the if body has no braces. For brace-less if bodies, If->getEndLoc() points to the expression end rather than the trailing semicolon, truncating replacements and losing comments. We find the semicolon via findNextToken and extend the range consistent with compound statement logic. Before: if (n < -1) n = -1 ; -> n = std::max(n, -1); ; if (n > 1) n = 1/*comment*/; -> n = std::min(n, 1);; After: if (n < -1) n = -1 ; -> n = std::max(n, -1); if (n > 1) n = 1/*comment*/; -> n = std::min(n, 1); /*comment*/ Fixes #208708. AI Usage: This patch is AI-assisted, reviewed and verified by me.
147 lines
3.8 KiB
ReStructuredText
147 lines
3.8 KiB
ReStructuredText
.. If you want to modify sections/contents permanently, you should modify both
|
|
ReleaseNotes.rst and ReleaseNotesTemplate.txt.
|
|
|
|
====================================================
|
|
Extra Clang Tools |release| |ReleaseNotesTitle|
|
|
====================================================
|
|
|
|
.. contents::
|
|
:local:
|
|
:depth: 3
|
|
|
|
Written by the `LLVM Team <https://llvm.org/>`_
|
|
|
|
.. only:: PreRelease
|
|
|
|
.. warning::
|
|
These are in-progress notes for the upcoming Extra Clang Tools |version| release.
|
|
Release notes for previous releases can be found on
|
|
`the Download Page <https://releases.llvm.org/download.html>`_.
|
|
|
|
Introduction
|
|
============
|
|
|
|
This document contains the release notes for the Extra Clang Tools, part of the
|
|
Clang release |release|. Here we describe the status of the Extra Clang Tools in
|
|
some detail, including major improvements from the previous release and new
|
|
feature work. All LLVM releases may be downloaded from the `LLVM releases web
|
|
site <https://llvm.org/releases/>`_.
|
|
|
|
For more information about Clang or LLVM, including information about
|
|
the latest release, please see the `Clang Web Site <https://clang.llvm.org>`_ or
|
|
the `LLVM Web Site <https://llvm.org>`_.
|
|
|
|
Note that if you are reading this file from a Git checkout or the
|
|
main Clang web page, this document applies to the *next* release, not
|
|
the current one. To see the release notes for a specific release, please
|
|
see the `releases page <https://llvm.org/releases/>`_.
|
|
|
|
What's New in Extra Clang Tools |release|?
|
|
==========================================
|
|
|
|
Some of the major new features and improvements to Extra Clang Tools are listed
|
|
here. Generic improvements to Extra Clang Tools as a whole or to its underlying
|
|
infrastructure are described first, followed by tool-specific sections.
|
|
|
|
Major New Features
|
|
------------------
|
|
|
|
Potentially Breaking Changes
|
|
----------------------------
|
|
|
|
Improvements to clangd
|
|
----------------------
|
|
|
|
Inlay hints
|
|
^^^^^^^^^^^
|
|
|
|
Diagnostics
|
|
^^^^^^^^^^^
|
|
|
|
Semantic Highlighting
|
|
^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
Compile flags
|
|
^^^^^^^^^^^^^
|
|
|
|
Hover
|
|
^^^^^
|
|
|
|
Code completion
|
|
^^^^^^^^^^^^^^^
|
|
|
|
Code actions
|
|
^^^^^^^^^^^^
|
|
|
|
Signature help
|
|
^^^^^^^^^^^^^^
|
|
|
|
Cross-references
|
|
^^^^^^^^^^^^^^^^
|
|
|
|
Objective-C
|
|
^^^^^^^^^^^
|
|
|
|
Miscellaneous
|
|
^^^^^^^^^^^^^
|
|
|
|
Improvements to clang-doc
|
|
-------------------------
|
|
|
|
Improvements to clang-query
|
|
---------------------------
|
|
|
|
Improvements to clang-tidy
|
|
--------------------------
|
|
|
|
New checks
|
|
^^^^^^^^^^
|
|
|
|
- New :doc:`performance-expensive-value-or
|
|
<clang-tidy/checks/performance/expensive-value-or>` check.
|
|
|
|
Finds calls to ``value_or`` (and alternative spellings ``valueOr``,
|
|
``ValueOr``) on optional types where the return type is expensive to copy.
|
|
|
|
New check aliases
|
|
^^^^^^^^^^^^^^^^^
|
|
|
|
Changes in existing checks
|
|
^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
- Improved :doc:`misc-redundant-expression
|
|
<clang-tidy/checks/misc/redundant-expression>` by fixing false positives in
|
|
nested expressions involving different macros or a mix of macro and
|
|
non-macro operands.
|
|
|
|
- Improved :doc:`readability-named-parameter
|
|
<clang-tidy/checks/readability/named-parameter>` check by ignoring
|
|
standard tag types (e.g. ``std::in_place_t``, ``std::allocator_arg_t``,
|
|
``std::nothrow_t``, iterator tags, lock tags, etc.) that are used
|
|
exclusively for overload resolution. Added the :option:`IgnoredTypes`
|
|
option to allow customizing the set of ignored types.
|
|
|
|
- Improved :doc:`readability-use-std-min-max
|
|
<clang-tidy/checks/readability/use-std-min-max>` check by fixing spurious
|
|
trailing semicolons and lost comments when the ``if`` body has no braces.
|
|
|
|
Removed checks
|
|
^^^^^^^^^^^^^^
|
|
|
|
Miscellaneous
|
|
^^^^^^^^^^^^^
|
|
|
|
Improvements to include-fixer
|
|
-----------------------------
|
|
|
|
Improvements to clang-include-fixer
|
|
-----------------------------------
|
|
|
|
Improvements to modularize
|
|
--------------------------
|
|
|
|
Improvements to pp-trace
|
|
------------------------
|
|
|
|
Clang-tidy Visual Studio plugin
|
|
-------------------------------
|