[clang] Add support for referencable labels for attribute documentation (PR #118428)

2024-12-04 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman closed https://github.com/llvm/llvm-project/pull/118428 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Add support for referencable labels for attribute documentation (PR #118428)

2024-12-04 Thread Oliver Hunt via cfe-commits
https://github.com/ojhunt updated https://github.com/llvm/llvm-project/pull/118428 >From aea2b4001aa8e9239909875153152083b56a6a59 Mon Sep 17 00:00:00 2001 From: Oliver Hunt Date: Mon, 2 Dec 2024 21:25:54 -0800 Subject: [PATCH 1/3] Add support for referencable labels for attribute documentation

[clang] Add support for referencable labels for attribute documentation (PR #118428)

2024-12-04 Thread Erich Keane via cfe-commits
erichkeane wrote: Yeah, agreed, thanks for the ELI5. When it comes to RST/HTML, I'm roughly 5 :) LGTM as well. https://github.com/llvm/llvm-project/pull/118428 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/ma

[clang] Add support for referencable labels for attribute documentation (PR #118428)

2024-12-04 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman approved this pull request. Ah thank you for the more detailed explanation, this makes sense to me. LG! https://github.com/llvm/llvm-project/pull/118428 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lis

[clang] Add support for referencable labels for attribute documentation (PR #118428)

2024-12-04 Thread via cfe-commits
Sirraide wrote: > is `const StringRef` a style violation Yeah, we generally don’t use top-level `const` for variables that are value types. https://github.com/llvm/llvm-project/pull/118428 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https

[clang] Add support for referencable labels for attribute documentation (PR #118428)

2024-12-04 Thread Oliver Hunt via cfe-commits
ojhunt wrote: > LGTM after fixing one more thing. > > I personally think this is a reasonable addition now, but please wait for > Aaron or Erich to approve this too before merging. Righto, I've committed the change, is `const StringRef` a style violation (I recognize StringRef is a constant t

[clang] Add support for referencable labels for attribute documentation (PR #118428)

2024-12-04 Thread Oliver Hunt via cfe-commits
https://github.com/ojhunt updated https://github.com/llvm/llvm-project/pull/118428 >From aea2b4001aa8e9239909875153152083b56a6a59 Mon Sep 17 00:00:00 2001 From: Oliver Hunt Date: Mon, 2 Dec 2024 21:25:54 -0800 Subject: [PATCH 1/3] Add support for referencable labels for attribute documentation

[clang] Add support for referencable labels for attribute documentation (PR #118428)

2024-12-04 Thread Oliver Hunt via cfe-commits
ojhunt wrote: > Also, if/when this is merged, it would be nice if someone could go through > the rest of the docs and apply this wherever possible (assuming there are any > other places where we still need to do that). yeah, I wanted to isolate this for now to just the attribute docs as these

[clang] Add support for referencable labels for attribute documentation (PR #118428)

2024-12-03 Thread Oliver Hunt via cfe-commits
https://github.com/ojhunt updated https://github.com/llvm/llvm-project/pull/118428 >From aea2b4001aa8e9239909875153152083b56a6a59 Mon Sep 17 00:00:00 2001 From: Oliver Hunt Date: Mon, 2 Dec 2024 21:25:54 -0800 Subject: [PATCH 1/2] Add support for referencable labels for attribute documentation

[clang] Add support for referencable labels for attribute documentation (PR #118428)

2024-12-03 Thread Oliver Hunt via cfe-commits
ojhunt wrote: > I have no idea what is going on here... @AaronBallman probably needs to take > a better look. Else, could the author please give me an ELI5 sorta thing here > or show me what the change looks like on the generated stuff? Sure! This example will cover the docs used in the [above

[clang] Add support for referencable labels for attribute documentation (PR #118428)

2024-12-03 Thread Oliver Hunt via cfe-commits
ojhunt wrote: > Out of curiosity, why does the existing mechanism not suffice? it "works" but creates the tag at the beginning of the text rather than the beginning of the attribute documentation. The result is that the scroll target for linking is the beginning of the text rather than the doc

[clang] Add support for referencable labels for attribute documentation (PR #118428)

2024-12-03 Thread Aaron Ballman via cfe-commits
@@ -5178,6 +5178,9 @@ GetAttributeHeadingAndSpellings(const Record &Documentation, static void WriteDocumentation(const RecordKeeper &Records, const DocumentationData &Doc, raw_ostream &OS) { + if (const StringRef label = Doc.Documentation->get

[clang] Add support for referencable labels for attribute documentation (PR #118428)

2024-12-03 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman edited https://github.com/llvm/llvm-project/pull/118428 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Add support for referencable labels for attribute documentation (PR #118428)

2024-12-03 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman commented: Out of curiosity, why does the existing mechanism not suffice? https://github.com/llvm/llvm-project/pull/118428 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/li

[clang] Add support for referencable labels for attribute documentation (PR #118428)

2024-12-03 Thread Aaron Ballman via cfe-commits
@@ -55,6 +55,9 @@ class Documentation { // When set, specifies that the attribute is deprecated and can optionally // specify a replacement attribute. DocDeprecated Deprecated; + + // When set, specifies a label that can be used to reference the documentation --

[clang] Add support for referencable labels for attribute documentation (PR #118428)

2024-12-03 Thread Erich Keane via cfe-commits
erichkeane wrote: I have no idea what is going on here... @AaronBallman probably needs to take a better look. Else, could the author please give me an ELI5 sorta thing here or show me what the change looks like on the generated stuff? https://github.com/llvm/llvm-project/pull/118428

[clang] Add support for referencable labels for attribute documentation (PR #118428)

2024-12-03 Thread Oliver Hunt via cfe-commits
https://github.com/ojhunt updated https://github.com/llvm/llvm-project/pull/118428 >From aea2b4001aa8e9239909875153152083b56a6a59 Mon Sep 17 00:00:00 2001 From: Oliver Hunt Date: Mon, 2 Dec 2024 21:25:54 -0800 Subject: [PATCH] Add support for referencable labels for attribute documentation Th

[clang] Add support for referencable labels for attribute documentation (PR #118428)

2024-12-02 Thread via cfe-commits
@@ -5178,6 +5178,9 @@ GetAttributeHeadingAndSpellings(const Record &Documentation, static void WriteDocumentation(const RecordKeeper &Records, const DocumentationData &Doc, raw_ostream &OS) { + if (const StringRef label = Doc.Documentation->get

[clang] Add support for referencable labels for attribute documentation (PR #118428)

2024-12-02 Thread via cfe-commits
https://github.com/Sirraide edited https://github.com/llvm/llvm-project/pull/118428 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Add support for referencable labels for attribute documentation (PR #118428)

2024-12-02 Thread via cfe-commits
https://github.com/Sirraide commented: Implementation seems fine to me; I can’t speak as to whether this is a necessary addition though. https://github.com/llvm/llvm-project/pull/118428 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://l

[clang] Add support for referencable labels for attribute documentation (PR #118428)

2024-12-02 Thread Oliver Hunt via cfe-commits
https://github.com/ojhunt updated https://github.com/llvm/llvm-project/pull/118428 >From aea2b4001aa8e9239909875153152083b56a6a59 Mon Sep 17 00:00:00 2001 From: Oliver Hunt Date: Mon, 2 Dec 2024 21:25:54 -0800 Subject: [PATCH] Add support for referencable labels for attribute documentation Th

[clang] Add support for referencable labels for attribute documentation (PR #118428)

2024-12-02 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Oliver Hunt (ojhunt) Changes The existing mechanism being used is to manually add a reference in the documentation. These references link to the beginning of the text rather than the heading for the attribute which is what this PR allows.

[clang] Add support for referencable labels for attribute documentation (PR #118428)

2024-12-02 Thread Oliver Hunt via cfe-commits
https://github.com/ojhunt created https://github.com/llvm/llvm-project/pull/118428 The existing mechanism being used is to manually add a reference in the documentation. These references link to the beginning of the text rather than the heading for the attribute which is what this PR allows.