[clang] [Clang][Docs] Simpler syntax for Github links. (PR #82746)

2024-03-04 Thread via cfe-commits

https://github.com/cor3ntin closed 
https://github.com/llvm/llvm-project/pull/82746
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[clang] [Clang][Docs] Simpler syntax for Github links. (PR #82746)

2024-03-04 Thread via cfe-commits

https://github.com/cor3ntin updated 
https://github.com/llvm/llvm-project/pull/82746

>From 2e37c94e37aa367b77a61fc0ab62aa0845a7f8f0 Mon Sep 17 00:00:00 2001
From: Corentin Jabot 
Date: Fri, 23 Feb 2024 10:39:46 +0100
Subject: [PATCH] [Clang][Docs] Simpler syntax for Github links.

Github links in release notes are often invalid rST,
clutter the release notes and are annoying to write.

This introduces a sphynx plugin that rewrites
 `#GH` to a link to the corresponding issue.

While this could be introduced globally on all of LLVM,
the PR only modifies Clang for now.
---
 clang/docs/ReleaseNotes.rst | 91 +++--
 clang/docs/conf.py  |  4 +-
 clang/docs/ghlinks.py   | 19 
 3 files changed, 58 insertions(+), 56 deletions(-)
 create mode 100644 clang/docs/ghlinks.py

diff --git a/clang/docs/ReleaseNotes.rst b/clang/docs/ReleaseNotes.rst
index 6f6ce7c68a7a71..b5f4c10068798f 100644
--- a/clang/docs/ReleaseNotes.rst
+++ b/clang/docs/ReleaseNotes.rst
@@ -79,7 +79,7 @@ C++20 Feature Support
   more to ease the implementation and improve the user's using experience.
   This follows the MSVC's behavior. Users interested in testing the more strict
   behavior can use the flag '-Xclang -fno-skip-odr-check-in-gmf'.
-  (`#79240 `_).
+  (#GH79240).
 
 - Implemented the `__is_layout_compatible` intrinsic to support
   `P0466R5: Layout-compatibility and Pointer-interconvertibility Traits 
`_.
@@ -116,7 +116,7 @@ C Language Changes
 C23 Feature Support
 ^^^
 - No longer diagnose use of binary literals as an extension in C23 mode. Fixes
-  `#72017 `_.
+  #GH72017.
 
 - Corrected parsing behavior for the ``alignas`` specifier/qualifier in C23. We
   previously handled it as an attribute as in C++, but there are parsing
@@ -129,7 +129,7 @@ C23 Feature Support
  };
  int i alignas(8) /* was accepted, now rejected */ ;
 
-  Fixes (`#81472 `_).
+  Fixes (#GH81472).
 
 - Clang now generates predefined macros of the form ``__TYPE_FMTB__`` and
   ``__TYPE_FMTb__`` (e.g., ``__UINT_FAST64_FMTB__``) in C23 mode for use with
@@ -173,7 +173,7 @@ Improvements to Clang's diagnostics
   name specifiers.
 
 - The ``-Wshorten-64-to-32`` diagnostic is now grouped under 
``-Wimplicit-int-conversion`` instead
-   of ``-Wconversion``. Fixes `#69444 
`_.
+   of ``-Wconversion``. Fixes #GH69444.
 
 - Clang now diagnoses friend declarations with an ``enum`` 
elaborated-type-specifier in language modes after C++98.
 
@@ -186,14 +186,14 @@ Improvements to Clang's diagnostics
   ``unsigned long long``, but this behavior may change in the future when Clang
   implements
   `WG14 N3029 `_.
-  Fixes `#69352 `_.
+  (#GH69352).
 
 - Clang now diagnoses extraneous template parameter lists as a language 
extension.
 
 - Clang now diagnoses declarative nested name specifiers that name alias 
templates.
 
 - Clang now diagnoses lambda function expressions being implicitly cast to 
boolean values, under ``-Wpointer-bool-conversion``.
-  Fixes `#82512 `_.
+  Fixes #GH82512.
 
 Improvements to Clang's time-trace
 --
@@ -206,21 +206,21 @@ Bug Fixes in This Version
 - Clang now accepts elaborated-type-specifiers that explicitly specialize
   a member class template for an implicit instantiation of a class template.
 
-- Fixed missing warnings when doing bool-like conversions in C23 (`#79435 
`_).
+- Fixed missing warnings when doing bool-like conversions in C23 (#GH79435).
 - Clang's ``-Wshadow`` no longer warns when an init-capture is named the same 
as
   a class field unless the lambda can capture this.
-  Fixes (`#71976 `_)
+  Fixes (#GH71976)
 
 - Clang now accepts qualified partial/explicit specializations of variable 
templates that
   are not nominable in the lookup context of the specialization.
 
 - Clang now doesn't produce false-positive warning `-Wconstant-logical-operand`
   for logical operators in C23.
-  Fixes (`#64356 `_).
+  Fixes (#GH64356).
 
 - Clang no longer produces a false-positive `-Wunused-variable` warning
   for variables created through copy initialization having side-effects in 
C++17 and later.
-  Fixes (`#79518 `_).
+  Fixes (#GH64356) (#GH79518).
 
 Bug Fixes to Compiler Builtins
 ^^
@@ -232,84 +232,67 @@ Bug Fixes to C++ Support
 
 
 - Fix crash when calling the constructor of an invalid 

[clang] [Clang][Docs] Simpler syntax for Github links. (PR #82746)

2024-03-04 Thread Aaron Ballman via cfe-commits

https://github.com/AaronBallman approved this pull request.

LGTM, thank you, this is a nice usability improvement!

https://github.com/llvm/llvm-project/pull/82746
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[clang] [Clang][Docs] Simpler syntax for Github links. (PR #82746)

2024-03-04 Thread via cfe-commits

cor3ntin wrote:

@AaronBallman ping

https://github.com/llvm/llvm-project/pull/82746
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[clang] [Clang][Docs] Simpler syntax for Github links. (PR #82746)

2024-02-23 Thread Timm Baeder via cfe-commits

tbaederr wrote:

Love it, but I'm slightly worried about "Fixes #" vs. "see also #" etc. 
being the same now, since you removed the "Fixes" prefix. 

https://github.com/llvm/llvm-project/pull/82746
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[clang] [Clang][Docs] Simpler syntax for Github links. (PR #82746)

2024-02-23 Thread via cfe-commits

cor3ntin wrote:

https://github.com/llvm/llvm-project/pull/82739 is a good example of why I 
think this is an improvement

https://github.com/llvm/llvm-project/pull/82746
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[clang] [Clang][Docs] Simpler syntax for Github links. (PR #82746)

2024-02-23 Thread via cfe-commits

llvmbot wrote:




@llvm/pr-subscribers-clang

Author: cor3ntin (cor3ntin)


Changes

Github links in release notes are often invalid rST, clutter the release notes 
and are annoying to write.

This introduces a sphynx plugin that rewrites
 `#GHNUMBER` to a link to the corresponding issue.

While this could be introduced globally on all of LLVM, the PR only modifies 
Clang for now.

---
Full diff: https://github.com/llvm/llvm-project/pull/82746.diff


3 Files Affected:

- (modified) clang/docs/ReleaseNotes.rst (+31-45) 
- (modified) clang/docs/conf.py (+2-2) 
- (added) clang/docs/ghlinks.py (+19) 


``diff
diff --git a/clang/docs/ReleaseNotes.rst b/clang/docs/ReleaseNotes.rst
index 529dd783ab7382..9e9b0cc23a7cac 100644
--- a/clang/docs/ReleaseNotes.rst
+++ b/clang/docs/ReleaseNotes.rst
@@ -79,7 +79,7 @@ C++20 Feature Support
   more to ease the implementation and improve the user's using experience.
   This follows the MSVC's behavior. Users interested in testing the more strict
   behavior can use the flag '-Xclang -fno-skip-odr-check-in-gmf'.
-  (`#79240 `_).
+  (#GH79240).
 
 - Implemented the `__is_layout_compatible` intrinsic to support
   `P0466R5: Layout-compatibility and Pointer-interconvertibility Traits 
`_.
@@ -116,7 +116,7 @@ C Language Changes
 C23 Feature Support
 ^^^
 - No longer diagnose use of binary literals as an extension in C23 mode. Fixes
-  `#72017 `_.
+  #GH72017.
 
 - Corrected parsing behavior for the ``alignas`` specifier/qualifier in C23. We
   previously handled it as an attribute as in C++, but there are parsing
@@ -129,7 +129,7 @@ C23 Feature Support
  };
  int i alignas(8) /* was accepted, now rejected */ ;
 
-  Fixes (`#81472 `_).
+  Fixes (#GH81472).
 
 - Clang now generates predefined macros of the form ``__TYPE_FMTB__`` and
   ``__TYPE_FMTb__`` (e.g., ``__UINT_FAST64_FMTB__``) in C23 mode for use with
@@ -173,7 +173,7 @@ Improvements to Clang's diagnostics
   name specifiers.
 
 - The ``-Wshorten-64-to-32`` diagnostic is now grouped under 
``-Wimplicit-int-conversion`` instead
-   of ``-Wconversion``. Fixes `#69444 
`_.
+   of ``-Wconversion``. Fixes #GH69444.
 
 - Clang now diagnoses friend declarations with an ``enum`` 
elaborated-type-specifier in language modes after C++98.
 
@@ -186,7 +186,7 @@ Improvements to Clang's diagnostics
   ``unsigned long long``, but this behavior may change in the future when Clang
   implements
   `WG14 N3029 `_.
-  Fixes `#69352 `_.
+  (#GH69352).
 
 - Clang now diagnoses extraneous template parameter lists as a language 
extension.
 
@@ -200,17 +200,17 @@ Bug Fixes in This Version
 - Clang now accepts elaborated-type-specifiers that explicitly specialize
   a member class template for an implicit instantiation of a class template.
 
-- Fixed missing warnings when doing bool-like conversions in C23 (`#79435 
`_).
+- Fixed missing warnings when doing bool-like conversions in C23 (#GH79435).
 - Clang's ``-Wshadow`` no longer warns when an init-capture is named the same 
as
   a class field unless the lambda can capture this.
-  Fixes (`#71976 `_)
+  Fixes (#GH71976)
 
 - Clang now accepts qualified partial/explicit specializations of variable 
templates that
   are not nominable in the lookup context of the specialization.
 
 - Clang now doesn't produce false-positive warning `-Wconstant-logical-operand`
   for logical operators in C23.
-  Fixes (`#64356 `_).
+  Fixes (#GH64356).
 
 Bug Fixes to Compiler Builtins
 ^^
@@ -222,65 +222,51 @@ Bug Fixes to C++ Support
 
 
 - Fix crash when calling the constructor of an invalid class.
-  Fixes (`#10518 `_),
-  (`#67914 `_),
-  and (`#78388 `_)
+  (#GH10518) (#GH67914) (#GH78388)
 - Fix crash when using lifetimebound attribute in function with trailing 
return.
-  Fixes (`#73619 `_)
+  (#GH73619)
 - Addressed an issue where constraints involving injected class types are 
perceived
-  distinct from its specialization types.
-  (`#56482 `_)
+  distinct from its specialization types. (#GH56482)
 - Fixed a bug where variables referenced by requires-clauses inside
-  nested generic lambdas were not properly injected into the constraint scope.
-  (`#73418 

[clang] [Clang][Docs] Simpler syntax for Github links. (PR #82746)

2024-02-23 Thread via cfe-commits

https://github.com/cor3ntin created 
https://github.com/llvm/llvm-project/pull/82746

Github links in release notes are often invalid rST, clutter the release notes 
and are annoying to write.

This introduces a sphynx plugin that rewrites
 `#GH` to a link to the corresponding issue.

While this could be introduced globally on all of LLVM, the PR only modifies 
Clang for now.

>From 4d3ec23e51c61398077ecb5814936f7a5227805a Mon Sep 17 00:00:00 2001
From: Corentin Jabot 
Date: Fri, 23 Feb 2024 10:39:46 +0100
Subject: [PATCH] [Clang][Docs] Simpler syntax for Github links.

Github links in release notes are often invalid rST,
clutter the release notes and are annoying to write.

This introduces a sphynx plugin that rewrites
 `#GH` to a link to the corresponding issue.

While this could be introduced globally on all of LLVM,
the PR only modifies Clang for now.
---
 clang/docs/ReleaseNotes.rst | 76 +++--
 clang/docs/conf.py  |  4 +-
 clang/docs/ghlinks.py   | 19 ++
 3 files changed, 52 insertions(+), 47 deletions(-)
 create mode 100644 clang/docs/ghlinks.py

diff --git a/clang/docs/ReleaseNotes.rst b/clang/docs/ReleaseNotes.rst
index 529dd783ab7382..9e9b0cc23a7cac 100644
--- a/clang/docs/ReleaseNotes.rst
+++ b/clang/docs/ReleaseNotes.rst
@@ -79,7 +79,7 @@ C++20 Feature Support
   more to ease the implementation and improve the user's using experience.
   This follows the MSVC's behavior. Users interested in testing the more strict
   behavior can use the flag '-Xclang -fno-skip-odr-check-in-gmf'.
-  (`#79240 `_).
+  (#GH79240).
 
 - Implemented the `__is_layout_compatible` intrinsic to support
   `P0466R5: Layout-compatibility and Pointer-interconvertibility Traits 
`_.
@@ -116,7 +116,7 @@ C Language Changes
 C23 Feature Support
 ^^^
 - No longer diagnose use of binary literals as an extension in C23 mode. Fixes
-  `#72017 `_.
+  #GH72017.
 
 - Corrected parsing behavior for the ``alignas`` specifier/qualifier in C23. We
   previously handled it as an attribute as in C++, but there are parsing
@@ -129,7 +129,7 @@ C23 Feature Support
  };
  int i alignas(8) /* was accepted, now rejected */ ;
 
-  Fixes (`#81472 `_).
+  Fixes (#GH81472).
 
 - Clang now generates predefined macros of the form ``__TYPE_FMTB__`` and
   ``__TYPE_FMTb__`` (e.g., ``__UINT_FAST64_FMTB__``) in C23 mode for use with
@@ -173,7 +173,7 @@ Improvements to Clang's diagnostics
   name specifiers.
 
 - The ``-Wshorten-64-to-32`` diagnostic is now grouped under 
``-Wimplicit-int-conversion`` instead
-   of ``-Wconversion``. Fixes `#69444 
`_.
+   of ``-Wconversion``. Fixes #GH69444.
 
 - Clang now diagnoses friend declarations with an ``enum`` 
elaborated-type-specifier in language modes after C++98.
 
@@ -186,7 +186,7 @@ Improvements to Clang's diagnostics
   ``unsigned long long``, but this behavior may change in the future when Clang
   implements
   `WG14 N3029 `_.
-  Fixes `#69352 `_.
+  (#GH69352).
 
 - Clang now diagnoses extraneous template parameter lists as a language 
extension.
 
@@ -200,17 +200,17 @@ Bug Fixes in This Version
 - Clang now accepts elaborated-type-specifiers that explicitly specialize
   a member class template for an implicit instantiation of a class template.
 
-- Fixed missing warnings when doing bool-like conversions in C23 (`#79435 
`_).
+- Fixed missing warnings when doing bool-like conversions in C23 (#GH79435).
 - Clang's ``-Wshadow`` no longer warns when an init-capture is named the same 
as
   a class field unless the lambda can capture this.
-  Fixes (`#71976 `_)
+  Fixes (#GH71976)
 
 - Clang now accepts qualified partial/explicit specializations of variable 
templates that
   are not nominable in the lookup context of the specialization.
 
 - Clang now doesn't produce false-positive warning `-Wconstant-logical-operand`
   for logical operators in C23.
-  Fixes (`#64356 `_).
+  Fixes (#GH64356).
 
 Bug Fixes to Compiler Builtins
 ^^
@@ -222,65 +222,51 @@ Bug Fixes to C++ Support
 
 
 - Fix crash when calling the constructor of an invalid class.
-  Fixes (`#10518 `_),
-  (`#67914 `_),
-  and (`#78388 `_)
+  (#GH10518) (#GH67914) (#GH78388)
 - Fix crash when using lifetimebound attribute in function with trailing 
return.
-  Fixes (`#73619