[LLVM][utils] Add script which clears release notes (#153593)

The script copies `ReleaseNotesTemplate.txt` to corresponding
`ReleaseNotes.rst`/`.md` to clear release notes.

The suffix of `ReleaseNotesTemplate.txt` must be `.txt`. If it is
`.rst`/`.md`, it will be treated as a documentation source file when
building documentation.
This commit is contained in:
Yanzuo Liu 2025-08-15 19:00:08 +08:00 committed by GitHub
parent 3db17429da
commit 3b27d50cc7
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
12 changed files with 703 additions and 10 deletions

View File

@ -1,3 +1,6 @@
.. If you want to modify sections/contents permanently, you should modify both
ReleaseNotes.rst and ReleaseNotesTemplate.txt.
====================================================
Extra Clang Tools |release| |ReleaseNotesTitle|
====================================================

View File

@ -0,0 +1,122 @@
.. 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
------------------
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 check aliases
^^^^^^^^^^^^^^^^^
Changes in existing checks
^^^^^^^^^^^^^^^^^^^^^^^^^^
Removed checks
^^^^^^^^^^^^^^
Miscellaneous
^^^^^^^^^^^^^
Improvements to include-fixer
-----------------------------
Improvements to clang-include-fixer
-----------------------------------
Improvements to modularize
--------------------------
Improvements to pp-trace
------------------------
Clang-tidy Visual Studio plugin
-------------------------------

View File

@ -1,3 +1,6 @@
.. If you want to modify sections/contents permanently, you should modify both
ReleaseNotes.rst and ReleaseNotesTemplate.txt.
===========================================
Clang |release| |ReleaseNotesTitle|
===========================================

View File

@ -0,0 +1,246 @@
.. If you want to modify sections/contents permanently, you should modify both
ReleaseNotes.rst and ReleaseNotesTemplate.txt.
===========================================
Clang |release| |ReleaseNotesTitle|
===========================================
.. contents::
:local:
:depth: 2
Written by the `LLVM Team <https://llvm.org/>`_
.. only:: PreRelease
.. warning::
These are in-progress notes for the upcoming Clang |version| release.
Release notes for previous releases can be found on
`the Releases Page <https://llvm.org/releases/>`_.
Introduction
============
This document contains the release notes for the Clang C/C++/Objective-C
frontend, part of the LLVM Compiler Infrastructure, release |release|. Here we
describe the status of Clang in some detail, including major
improvements from the previous release and new feature work. For the
general LLVM release notes, see `the LLVM
documentation <https://llvm.org/docs/ReleaseNotes.html>`_. For the libc++ release notes,
see `this page <https://libcxx.llvm.org/ReleaseNotes.html>`_. 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>`_.
Potentially Breaking Changes
============================
C/C++ Language Potentially Breaking Changes
-------------------------------------------
C++ Specific Potentially Breaking Changes
-----------------------------------------
ABI Changes in This Version
---------------------------
AST Dumping Potentially Breaking Changes
----------------------------------------
Clang Frontend Potentially Breaking Changes
-------------------------------------------
Clang Python Bindings Potentially Breaking Changes
--------------------------------------------------
What's New in Clang |release|?
==============================
C++ Language Changes
--------------------
C++2c Feature Support
^^^^^^^^^^^^^^^^^^^^^
C++23 Feature Support
^^^^^^^^^^^^^^^^^^^^^
C++20 Feature Support
^^^^^^^^^^^^^^^^^^^^^
C++17 Feature Support
^^^^^^^^^^^^^^^^^^^^^
Resolutions to C++ Defect Reports
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
C Language Changes
------------------
C2y Feature Support
^^^^^^^^^^^^^^^^^^^
C23 Feature Support
^^^^^^^^^^^^^^^^^^^
Non-comprehensive list of changes in this release
-------------------------------------------------
New Compiler Flags
------------------
Deprecated Compiler Flags
-------------------------
Modified Compiler Flags
-----------------------
Removed Compiler Flags
----------------------
Attribute Changes in Clang
--------------------------
Improvements to Clang's diagnostics
-----------------------------------
Improvements to Clang's time-trace
----------------------------------
Improvements to Coverage Mapping
--------------------------------
Bug Fixes in This Version
-------------------------
Bug Fixes to Compiler Builtins
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Bug Fixes to Attribute Support
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Bug Fixes to C++ Support
^^^^^^^^^^^^^^^^^^^^^^^^
Bug Fixes to AST Handling
^^^^^^^^^^^^^^^^^^^^^^^^^
Miscellaneous Bug Fixes
^^^^^^^^^^^^^^^^^^^^^^^
Miscellaneous Clang Crashes Fixed
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
OpenACC Specific Changes
------------------------
Target Specific Changes
-----------------------
AMDGPU Support
^^^^^^^^^^^^^^
NVPTX Support
^^^^^^^^^^^^^^
X86 Support
^^^^^^^^^^^
Arm and AArch64 Support
^^^^^^^^^^^^^^^^^^^^^^^
Android Support
^^^^^^^^^^^^^^^
Windows Support
^^^^^^^^^^^^^^^
LoongArch Support
^^^^^^^^^^^^^^^^^
RISC-V Support
^^^^^^^^^^^^^^
CUDA/HIP Language Changes
^^^^^^^^^^^^^^^^^^^^^^^^^
CUDA Support
^^^^^^^^^^^^
AIX Support
^^^^^^^^^^^
NetBSD Support
^^^^^^^^^^^^^^
WebAssembly Support
^^^^^^^^^^^^^^^^^^^
AVR Support
^^^^^^^^^^^
DWARF Support in Clang
----------------------
Floating Point Support in Clang
-------------------------------
Fixed Point Support in Clang
----------------------------
AST Matchers
------------
clang-format
------------
libclang
--------
Code Completion
---------------
Static Analyzer
---------------
New features
^^^^^^^^^^^^
Crash and bug fixes
^^^^^^^^^^^^^^^^^^^
Improvements
^^^^^^^^^^^^
Moved checkers
^^^^^^^^^^^^^^
.. _release-notes-sanitizers:
Sanitizers
----------
Python Binding Changes
----------------------
OpenMP Support
--------------
Improvements
^^^^^^^^^^^^
Additional Information
======================
A wide variety of additional information is available on the `Clang web
page <https://clang.llvm.org/>`_. The web page contains versions of the
API documentation which are up-to-date with the Git version of
the source code. You can access versions of these documents specific to
this release by going into the "``clang/docs/``" directory in the Clang
tree.
If you have any questions or comments about Clang, please feel free to
contact us on the `Discourse forums (Clang Frontend category)
<https://discourse.llvm.org/c/clang/6>`_.

View File

@ -1,3 +1,6 @@
<!-- If you want to modify sections/contents permanently, you should modify both
ReleaseNotes.md and ReleaseNotesTemplate.txt. -->
# Flang |version| (In-Progress) Release Notes
> **warning**

View File

@ -0,0 +1,51 @@
<!-- If you want to modify sections/contents permanently, you should modify both
ReleaseNotes.md and ReleaseNotesTemplate.txt. -->
# Flang |version| (In-Progress) Release Notes
> **warning**
>
> These are in-progress notes for the upcoming LLVM |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 Flang Fortran frontend,
part of the LLVM Compiler Infrastructure, release |version|. Here we
describe the status of Flang in some detail, including major
improvements from the previous release and new feature work. For the
general LLVM release notes, see [the LLVM
documentation](https://llvm.org/docs/ReleaseNotes.html). All LLVM
releases may be downloaded from the [LLVM releases web
site](https://llvm.org/releases/).
Note that if you are reading this file from a Git checkout, 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/).
## Major New Features
## Bug Fixes
## Non-comprehensive list of changes in this release
## New Compiler Flags
## Windows Support
## Fortran Language Changes in Flang
## Build System Changes
## New Issues Found
## Additional Information
Flang's documentation is located in the `flang/docs/` directory in the
LLVM monorepo.
If you have any questions or comments about Flang, please feel free to
contact us on the [Discourse
forums](https://discourse.llvm.org/c/subprojects/flang/33).

View File

@ -1,3 +1,6 @@
.. If you want to modify sections/contents permanently, you should modify both
ReleaseNotes.rst and ReleaseNotesTemplate.txt.
===========================
lld |release| Release Notes
===========================

View File

@ -0,0 +1,48 @@
.. If you want to modify sections/contents permanently, you should modify both
ReleaseNotes.rst and ReleaseNotesTemplate.txt.
===========================
lld |release| Release Notes
===========================
.. contents::
:local:
.. only:: PreRelease
.. warning::
These are in-progress notes for the upcoming LLVM |release| 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 lld linker, release |release|.
Here we describe the status of lld, including major improvements
from the previous release. All lld releases may be downloaded
from the `LLVM releases web site <https://llvm.org/releases/>`_.
Non-comprehensive list of changes in this release
=================================================
ELF Improvements
----------------
Breaking changes
----------------
COFF Improvements
-----------------
MinGW Improvements
------------------
MachO Improvements
------------------
WebAssembly Improvements
------------------------
Fixes
#####

View File

@ -101,8 +101,8 @@ release process to begin. Specifically, it involves:
* Tagging release candidates for the release team to begin testing.
Create Release Branch
^^^^^^^^^^^^^^^^^^^^^
Create Release Branch and Update LLVM Version
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Branch the Git trunk using the following procedure:
@ -114,14 +114,16 @@ Branch the Git trunk using the following procedure:
#. Verify that the current git trunk is in decent shape by
examining nightly tester and buildbot results.
#. Bump the version in trunk to N.0.0git and tag the commit with llvmorg-N-init.
#. Bump the version in trunk to N.0.0git with the script in
``llvm/utils/release/bump-version.py``, and tag the commit with llvmorg-N-init.
If ``X`` is the version to be released, then ``N`` is ``X + 1``.
::
$ git tag -sa llvmorg-N-init
#. Clear the release notes in trunk.
4. Clear the release notes in trunk with the script in
``llvm/utils/release/clear-release-notes.py``.
#. Create the release branch from the last known good revision from before the
version bump. The branch's name is release/X.x where ``X`` is the major version
@ -133,12 +135,6 @@ Branch the Git trunk using the following procedure:
#. All tags and branches need to be created in both the llvm/llvm-project and
llvm/llvm-test-suite repos.
Update LLVM Version
^^^^^^^^^^^^^^^^^^^
After creating the LLVM release branch, update the release branches'
version with the script in ``llvm/utils/release/bump-version.py``.
Tagging the LLVM Release Candidates
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

View File

@ -1,6 +1,9 @@
<!-- This document is written in Markdown and uses extra directives provided by
MyST (https://myst-parser.readthedocs.io/en/latest/). -->
<!-- If you want to modify sections/contents permanently, you should modify both
ReleaseNotes.md and ReleaseNotesTemplate.txt. -->
LLVM {{env.config.release}} Release Notes
=========================================

View File

@ -0,0 +1,163 @@
<!-- This document is written in Markdown and uses extra directives provided by
MyST (https://myst-parser.readthedocs.io/en/latest/). -->
<!-- If you want to modify sections/contents permanently, you should modify both
ReleaseNotes.md and ReleaseNotesTemplate.txt. -->
LLVM {{env.config.release}} Release Notes
=========================================
```{contents}
```
````{only} PreRelease
```{warning} These are in-progress notes for the upcoming LLVM {{env.config.release}}
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 LLVM Compiler Infrastructure,
release {{env.config.release}}. Here we describe the status of LLVM, including
major improvements from the previous release, improvements in various subprojects
of LLVM, and some of the current users of the code. All LLVM releases may be
downloaded from the [LLVM releases web site](https://llvm.org/releases/).
For more information about LLVM, including information about the latest
release, please check out the [main LLVM web site](https://llvm.org/). If you
have questions or comments, the [Discourse forums](https://discourse.llvm.org)
is a good place to ask them.
Note that if you are reading this file from a Git checkout or the main
LLVM 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/).
Non-comprehensive list of changes in this release
=================================================
<!-- For small 1-3 sentence descriptions, just add an entry at the end of
this list. If your description won't fit comfortably in one bullet
point (e.g. maybe you would like to give an example of the
functionality, or simply have a lot to talk about), see the comment below
for adding a new subsection. -->
* ...
<!-- If you would like to document a larger change, then you can add a
subsection about it right here. You can copy the following boilerplate:
Special New Feature
-------------------
Makes programs 10x faster by doing Special New Thing.
-->
Changes to the LLVM IR
----------------------
Changes to LLVM infrastructure
------------------------------
Changes to building LLVM
------------------------
Changes to TableGen
-------------------
Changes to Interprocedural Optimizations
----------------------------------------
Changes to Vectorizers
----------------------
Changes to the AArch64 Backend
------------------------------
Changes to the AMDGPU Backend
-----------------------------
Changes to the ARM Backend
--------------------------
Changes to the AVR Backend
--------------------------
Changes to the DirectX Backend
------------------------------
Changes to the Hexagon Backend
------------------------------
Changes to the LoongArch Backend
--------------------------------
Changes to the MIPS Backend
---------------------------
Changes to the PowerPC Backend
------------------------------
Changes to the RISC-V Backend
-----------------------------
Changes to the WebAssembly Backend
----------------------------------
Changes to the Windows Target
-----------------------------
Changes to the X86 Backend
--------------------------
Changes to the OCaml bindings
-----------------------------
Changes to the Python bindings
------------------------------
Changes to the C API
--------------------
Changes to the CodeGen infrastructure
-------------------------------------
Changes to the Metadata Info
----------------------------
Changes to the Debug Info
-------------------------
Changes to the LLVM tools
-------------------------
Changes to LLDB
---------------
Changes to BOLT
---------------
Changes to Sanitizers
---------------------
Other Changes
-------------
External Open Source Projects Using LLVM {{env.config.release}}
===============================================================
Additional Information
======================
A wide variety of additional information is available on the
[LLVM web page](https://llvm.org/), in particular in the
[documentation](https://llvm.org/docs/) section. The web page also contains
versions of the API documentation which is up-to-date with the Git version of
the source code. You can access versions of these documents specific to this
release by going into the `llvm/docs/` directory in the LLVM tree.
If you have any questions or comments about LLVM, please feel free to contact
us via the [Discourse forums](https://discourse.llvm.org).

View File

@ -0,0 +1,52 @@
#!/usr/bin/env python3
# ===-- clear-release-notes.py ---------------------------------------------===#
#
# Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
# See https://llvm.org/LICENSE.txt for license information.
# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
#
# ===------------------------------------------------------------------------===#
#
# Clear release notes, which is needed when bumping trunk version.
#
# ===------------------------------------------------------------------------===#
import argparse
from pathlib import Path
def process_file(fpath: Path) -> None:
# ReleaseNotes.rst/.md -> ReleaseNotesTemplate.txt
template_path = fpath.with_name(f"{fpath.stem}Template.txt")
fpath.write_text(template_path.read_text(), newline="\n")
print(f"{fpath} updated.")
if __name__ == "__main__":
parser = argparse.ArgumentParser()
parser.add_argument(
"-s",
"--source-root",
default=None,
help="LLVM source root (/path/llvm-project). Defaults to the "
"llvm-project the script is located in.",
)
args = parser.parse_args()
# Find llvm-project root
source_root = Path(__file__).resolve().parents[3]
if args.source_root:
source_root = Path(args.source_root).resolve()
files_to_update = (
"clang/docs/ReleaseNotes.rst",
"clang-tools-extra/docs/ReleaseNotes.rst",
"flang/docs/ReleaseNotes.md",
"lld/docs/ReleaseNotes.rst",
"llvm/docs/ReleaseNotes.md",
)
for f in files_to_update:
process_file(source_root / f)