[clang-tools-extra] Refactor clang doc comment structure (PR #142273)

2025-06-08 Thread Samarth Narang via cfe-commits
snarang181 wrote: Sounds good, @ilovepi. I also raised an issue to get commit access and you might have gotten a notification. It'd be great if you can take a look at that too :) https://github.com/llvm/llvm-project/pull/142273 ___ cfe-commits mailin

[clang-tools-extra] Refactor clang doc comment structure (PR #142273)

2025-06-08 Thread Paul Kirth via cfe-commits
ilovepi wrote: @snarang181 I cannot see how this patch would affect a test in the JIT. Sometimes main is not clean, and sometime there is flake in some tests or under a sanitizer. We should be good IMO. https://github.com/llvm/llvm-project/pull/142273

[clang-tools-extra] Refactor clang doc comment structure (PR #142273)

2025-06-07 Thread Samarth Narang via cfe-commits
snarang181 wrote: @ilovepi, this failure is probably related to the merged PR, right? https://github.com/llvm/llvm-project/pull/142273 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] Refactor clang doc comment structure (PR #142273)

2025-06-07 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `sanitizer-x86_64-linux-fast` running on `sanitizer-buildbot4` while building `clang-tools-extra` at step 2 "annotate". Full details are available at: https://lab.llvm.org/buildbot/#/builders/169/builds/12077 Here is the rel

[clang-tools-extra] Refactor clang doc comment structure (PR #142273)

2025-06-07 Thread Paul Kirth via cfe-commits
https://github.com/ilovepi closed https://github.com/llvm/llvm-project/pull/142273 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] Refactor clang doc comment structure (PR #142273)

2025-06-06 Thread Samarth Narang via cfe-commits
snarang181 wrote: > LGTM. Thanks for the patch Awesome, feel free to merge when you see fit. I don't think I can do so myself. https://github.com/llvm/llvm-project/pull/142273 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm

[clang-tools-extra] Refactor clang doc comment structure (PR #142273)

2025-06-06 Thread Paul Kirth via cfe-commits
https://github.com/ilovepi approved this pull request. LGTM. Thanks for the patch https://github.com/llvm/llvm-project/pull/142273 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] Refactor clang doc comment structure (PR #142273)

2025-06-06 Thread Paul Kirth via cfe-commits
https://github.com/ilovepi edited https://github.com/llvm/llvm-project/pull/142273 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] Refactor clang doc comment structure (PR #142273)

2025-06-06 Thread Samarth Narang via cfe-commits
snarang181 wrote: > LGTM once the last few nits are addressed. @ilovepi, for the last few nits, - Removed the `default` case in the switch, and manually returning `nullptr` for all the unhandled cases. - Removed the braces in the `case` of the `switch` and shifted the variable decl. inside o

[clang-tools-extra] Refactor clang doc comment structure (PR #142273)

2025-06-06 Thread Samarth Narang via cfe-commits
https://github.com/snarang181 updated https://github.com/llvm/llvm-project/pull/142273 >From 6610faa1775c290fa44b0c498ac19ef26ad599ac Mon Sep 17 00:00:00 2001 From: Samarth Narang Date: Sat, 31 May 2025 10:05:52 -0400 Subject: [PATCH 01/13] [clang-doc] Refactor CommentInfo.Kind to use CommentK

[clang-tools-extra] Refactor clang doc comment structure (PR #142273)

2025-06-06 Thread Paul Kirth via cfe-commits
@@ -670,12 +671,17 @@ static std::unique_ptr genHTML(const CommentInfo &I) { return nullptr; return std::move(BlockComment); } - if (I.Kind == "TextComment") { -if (I.Text == "") + + case CommentKind::CK_TextComment: { +if (I.Text.empty()) return n

[clang-tools-extra] Refactor clang doc comment structure (PR #142273)

2025-06-06 Thread Paul Kirth via cfe-commits
@@ -316,8 +316,13 @@ static llvm::Error parseRecord(const Record &R, unsigned ID, static llvm::Error parseRecord(const Record &R, unsigned ID, llvm::StringRef Blob, CommentInfo *I) { switch (ID) { - case COMMENT_KIND: -return decodeRecord(

[clang-tools-extra] Refactor clang doc comment structure (PR #142273)

2025-06-06 Thread Paul Kirth via cfe-commits
https://github.com/ilovepi approved this pull request. LGTM once the last few nits are addressed. https://github.com/llvm/llvm-project/pull/142273 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/c

[clang-tools-extra] Refactor clang doc comment structure (PR #142273)

2025-06-05 Thread Samarth Narang via cfe-commits
https://github.com/snarang181 updated https://github.com/llvm/llvm-project/pull/142273 >From f75d81cacf455477fe9bc6cb498fb2f76bebcfe2 Mon Sep 17 00:00:00 2001 From: Samarth Narang Date: Sat, 31 May 2025 10:05:52 -0400 Subject: [PATCH 01/12] [clang-doc] Refactor CommentInfo.Kind to use CommentK

[clang-tools-extra] Refactor clang doc comment structure (PR #142273)

2025-06-05 Thread Samarth Narang via cfe-commits
snarang181 wrote: > Oh, lets updated the PR description with a more complete description of the > change. It can also be marked as `Fixes #NNN` since this basically implements > everything outlined in the issues, unless I'm forgetting something. Done. https://github.com/llvm/llvm-project/pull

[clang-tools-extra] Refactor clang doc comment structure (PR #142273)

2025-06-05 Thread Samarth Narang via cfe-commits
https://github.com/snarang181 edited https://github.com/llvm/llvm-project/pull/142273 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] Refactor clang doc comment structure (PR #142273)

2025-06-05 Thread Paul Kirth via cfe-commits
https://github.com/ilovepi edited https://github.com/llvm/llvm-project/pull/142273 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] Refactor clang doc comment structure (PR #142273)

2025-06-05 Thread Paul Kirth via cfe-commits
ilovepi wrote: Oh, lets updated the PR description with a more complete description of the change. It can also be marked as `Fixes #NNN` since this basically implements everything outlined in the issues, unless I'm forgetting something. https://github.com/llvm/llvm-project/pull/142273

[clang-tools-extra] Refactor clang doc comment structure (PR #142273)

2025-06-05 Thread Paul Kirth via cfe-commits
@@ -208,37 +208,107 @@ static json::Value extractValue(const TypedefInfo &I) { } static json::Value extractValue(const CommentInfo &I) { - assert((I.Kind == "BlockCommandComment" || I.Kind == "FullComment" || - I.Kind == "ParagraphComment" || I.Kind == "TextComment")

[clang-tools-extra] Refactor clang doc comment structure (PR #142273)

2025-06-05 Thread Paul Kirth via cfe-commits
https://github.com/ilovepi commented: Getting pretty close. I think once the remaining comments are addressed it will probably be ready to land. https://github.com/llvm/llvm-project/pull/142273 ___ cfe-commits mailing list cfe-commits@lists.llvm.org h

[clang-tools-extra] Refactor clang doc comment structure (PR #142273)

2025-06-05 Thread Samarth Narang via cfe-commits
https://github.com/snarang181 updated https://github.com/llvm/llvm-project/pull/142273 >From 5bc81ef0cd42194bfe4f8aef9bc98a17ada2d297 Mon Sep 17 00:00:00 2001 From: Samarth Narang Date: Sat, 31 May 2025 10:05:52 -0400 Subject: [PATCH 01/11] [clang-doc] Refactor CommentInfo.Kind to use CommentK

[clang-tools-extra] Refactor clang doc comment structure (PR #142273)

2025-06-05 Thread Paul Kirth via cfe-commits
@@ -316,8 +316,13 @@ static llvm::Error parseRecord(const Record &R, unsigned ID, static llvm::Error parseRecord(const Record &R, unsigned ID, llvm::StringRef Blob, CommentInfo *I) { switch (ID) { - case COMMENT_KIND: -return decodeRecord(

[clang-tools-extra] Refactor clang doc comment structure (PR #142273)

2025-06-05 Thread Paul Kirth via cfe-commits
@@ -208,37 +208,105 @@ static json::Value extractValue(const TypedefInfo &I) { } static json::Value extractValue(const CommentInfo &I) { - assert((I.Kind == "BlockCommandComment" || I.Kind == "FullComment" || - I.Kind == "ParagraphComment" || I.Kind == "TextComment")

[clang-tools-extra] Refactor clang doc comment structure (PR #142273)

2025-06-05 Thread Samarth Narang via cfe-commits
https://github.com/snarang181 updated https://github.com/llvm/llvm-project/pull/142273 >From 51adbab1511e92c44925d20661ed86d2ab28dca0 Mon Sep 17 00:00:00 2001 From: Samarth Narang Date: Sat, 31 May 2025 10:05:52 -0400 Subject: [PATCH 01/10] [clang-doc] Refactor CommentInfo.Kind to use CommentK

[clang-tools-extra] Refactor clang doc comment structure (PR #142273)

2025-06-05 Thread via cfe-commits
github-actions[bot] wrote: :warning: C/C++ code formatter, clang-format found issues in your code. :warning: You can test this locally with the following command: ``bash git-clang-format --diff HEAD~1 HEAD --extensions cpp,h -- clang-tools-extra/clang-doc/BitcodeReader.cpp clan

[clang-tools-extra] Refactor clang doc comment structure (PR #142273)

2025-06-05 Thread Samarth Narang via cfe-commits
snarang181 wrote: Left a reply to this [comment](https://github.com/llvm/llvm-project/pull/142273/files#r2125020120) @ilovepi. Addressed some other comments. https://github.com/llvm/llvm-project/pull/142273 ___ cfe-commits mailing list cfe-commits@l

[clang-tools-extra] Refactor clang doc comment structure (PR #142273)

2025-06-05 Thread Samarth Narang via cfe-commits
https://github.com/snarang181 updated https://github.com/llvm/llvm-project/pull/142273 >From 51adbab1511e92c44925d20661ed86d2ab28dca0 Mon Sep 17 00:00:00 2001 From: Samarth Narang Date: Sat, 31 May 2025 10:05:52 -0400 Subject: [PATCH 1/9] [clang-doc] Refactor CommentInfo.Kind to use CommentKind

[clang-tools-extra] Refactor clang doc comment structure (PR #142273)

2025-06-03 Thread Paul Kirth via cfe-commits
@@ -198,37 +198,107 @@ static json::Value extractValue(const TypedefInfo &I) { } static json::Value extractValue(const CommentInfo &I) { - assert((I.Kind == "BlockCommandComment" || I.Kind == "FullComment" || - I.Kind == "ParagraphComment" || I.Kind == "TextComment")

[clang-tools-extra] Refactor clang doc comment structure (PR #142273)

2025-06-03 Thread Erick Velez via cfe-commits
@@ -198,37 +198,107 @@ static json::Value extractValue(const TypedefInfo &I) { } static json::Value extractValue(const CommentInfo &I) { - assert((I.Kind == "BlockCommandComment" || I.Kind == "FullComment" || - I.Kind == "ParagraphComment" || I.Kind == "TextComment")

[clang-tools-extra] Refactor clang doc comment structure (PR #142273)

2025-06-03 Thread Paul Kirth via cfe-commits
@@ -198,37 +198,107 @@ static json::Value extractValue(const TypedefInfo &I) { } static json::Value extractValue(const CommentInfo &I) { - assert((I.Kind == "BlockCommandComment" || I.Kind == "FullComment" || - I.Kind == "ParagraphComment" || I.Kind == "TextComment")

[clang-tools-extra] Refactor clang doc comment structure (PR #142273)

2025-06-03 Thread Paul Kirth via cfe-commits
@@ -670,12 +671,17 @@ static std::unique_ptr genHTML(const CommentInfo &I) { return nullptr; return std::move(BlockComment); } - if (I.Kind == "TextComment") { -if (I.Text == "") + + case CommentKind::CK_TextComment: { +if (I.Text.empty()) return n

[clang-tools-extra] Refactor clang doc comment structure (PR #142273)

2025-06-03 Thread Paul Kirth via cfe-commits
@@ -45,6 +45,25 @@ enum class InfoType { IT_typedef }; +enum class CommentKind { + CK_FullComment, + CK_ParagraphComment, + CK_TextComment, + CK_InlineCommandComment, + CK_HTMLStartTagComment, + CK_HTMLEndTagComment, + CK_BlockCommandComment, + CK_ParamCommandComment

[clang-tools-extra] Refactor clang doc comment structure (PR #142273)

2025-06-03 Thread Erick Velez via cfe-commits
@@ -198,37 +198,107 @@ static json::Value extractValue(const TypedefInfo &I) { } static json::Value extractValue(const CommentInfo &I) { - assert((I.Kind == "BlockCommandComment" || I.Kind == "FullComment" || - I.Kind == "ParagraphComment" || I.Kind == "TextComment")

[clang-tools-extra] Refactor clang doc comment structure (PR #142273)

2025-06-03 Thread Erick Velez via cfe-commits
@@ -65,6 +65,35 @@ template <> struct ScalarEnumerationTraits { } }; +template <> +struct llvm::yaml::ScalarEnumerationTraits { evelez7 wrote: This doesn't need the `llvm::yaml` qualification. https://github.com/llvm/llvm-project/pull/142273 __

[clang-tools-extra] Refactor clang doc comment structure (PR #142273)

2025-06-01 Thread Samarth Narang via cfe-commits
@@ -26,6 +26,66 @@ namespace clang { namespace doc { +CommentKind stringToCommentKind(llvm::StringRef KindStr) { + if (KindStr == "FullComment") +return CommentKind::CK_FullComment; snarang181 wrote: Updated the function to do a `StringMap` lookup. htt

[clang-tools-extra] Refactor clang doc comment structure (PR #142273)

2025-06-01 Thread Samarth Narang via cfe-commits
https://github.com/snarang181 updated https://github.com/llvm/llvm-project/pull/142273 >From cd99fbe06a384db3775d1fc8c923275df07d4db3 Mon Sep 17 00:00:00 2001 From: Samarth Narang Date: Sat, 31 May 2025 10:05:52 -0400 Subject: [PATCH 1/8] [clang-doc] Refactor CommentInfo.Kind to use CommentKind

[clang-tools-extra] Refactor clang doc comment structure (PR #142273)

2025-06-01 Thread Paul Kirth via cfe-commits
https://github.com/ilovepi commented: I'll take another pass later in the week, but here are some initial comments. https://github.com/llvm/llvm-project/pull/142273 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/

[clang-tools-extra] Refactor clang doc comment structure (PR #142273)

2025-06-01 Thread Paul Kirth via cfe-commits
@@ -26,6 +26,66 @@ namespace clang { namespace doc { +CommentKind stringToCommentKind(llvm::StringRef KindStr) { + if (KindStr == "FullComment") +return CommentKind::CK_FullComment; ilovepi wrote: IDK if the huge set of conditionals is great. There are a

[clang-tools-extra] Refactor clang doc comment structure (PR #142273)

2025-06-01 Thread Paul Kirth via cfe-commits
https://github.com/ilovepi edited https://github.com/llvm/llvm-project/pull/142273 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] Refactor clang doc comment structure (PR #142273)

2025-06-01 Thread Samarth Narang via cfe-commits
https://github.com/snarang181 ready_for_review https://github.com/llvm/llvm-project/pull/142273 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] Refactor clang doc comment structure (PR #142273)

2025-06-01 Thread Samarth Narang via cfe-commits
https://github.com/snarang181 updated https://github.com/llvm/llvm-project/pull/142273 >From cd99fbe06a384db3775d1fc8c923275df07d4db3 Mon Sep 17 00:00:00 2001 From: Samarth Narang Date: Sat, 31 May 2025 10:05:52 -0400 Subject: [PATCH 1/7] [clang-doc] Refactor CommentInfo.Kind to use CommentKind

[clang-tools-extra] Refactor clang doc comment structure (PR #142273)

2025-06-01 Thread Samarth Narang via cfe-commits
https://github.com/snarang181 updated https://github.com/llvm/llvm-project/pull/142273 >From 725dd21adcd2f776b2e6adc648e3038812059bf3 Mon Sep 17 00:00:00 2001 From: Samarth Narang Date: Sat, 31 May 2025 10:05:52 -0400 Subject: [PATCH 1/6] [clang-doc] Refactor CommentInfo.Kind to use CommentKind

[clang-tools-extra] Refactor clang doc comment structure (PR #142273)

2025-06-01 Thread Samarth Narang via cfe-commits
https://github.com/snarang181 converted_to_draft https://github.com/llvm/llvm-project/pull/142273 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] Refactor clang doc comment structure (PR #142273)

2025-06-01 Thread Samarth Narang via cfe-commits
https://github.com/snarang181 edited https://github.com/llvm/llvm-project/pull/142273 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] Refactor clang doc comment structure (PR #142273)

2025-05-31 Thread Samarth Narang via cfe-commits
https://github.com/snarang181 updated https://github.com/llvm/llvm-project/pull/142273 >From 725dd21adcd2f776b2e6adc648e3038812059bf3 Mon Sep 17 00:00:00 2001 From: Samarth Narang Date: Sat, 31 May 2025 10:05:52 -0400 Subject: [PATCH 1/5] [clang-doc] Refactor CommentInfo.Kind to use CommentKind

[clang-tools-extra] Refactor clang doc comment structure (PR #142273)

2025-05-31 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-tools-extra Author: Samarth Narang (snarang181) Changes Implements https://github.com/llvm/llvm-project/issues/142272 --- Patch is 51.90 KiB, truncated to 20.00 KiB below, full version: https://github.com/llvm/llvm-project/pull/142273.diff 17

[clang-tools-extra] Refactor clang doc comment structure (PR #142273)

2025-05-31 Thread Samarth Narang via cfe-commits
https://github.com/snarang181 ready_for_review https://github.com/llvm/llvm-project/pull/142273 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] Refactor clang doc comment structure (PR #142273)

2025-05-31 Thread Samarth Narang via cfe-commits
snarang181 wrote: @ilovepi, would be great to get your review here. https://github.com/llvm/llvm-project/pull/142273 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] Refactor clang doc comment structure (PR #142273)

2025-05-31 Thread Samarth Narang via cfe-commits
https://github.com/snarang181 updated https://github.com/llvm/llvm-project/pull/142273 >From 725dd21adcd2f776b2e6adc648e3038812059bf3 Mon Sep 17 00:00:00 2001 From: Samarth Narang Date: Sat, 31 May 2025 10:05:52 -0400 Subject: [PATCH 1/4] [clang-doc] Refactor CommentInfo.Kind to use CommentKind

[clang-tools-extra] Refactor clang doc comment structure (PR #142273)

2025-05-31 Thread Samarth Narang via cfe-commits
https://github.com/snarang181 edited https://github.com/llvm/llvm-project/pull/142273 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] Refactor clang doc comment structure (PR #142273)

2025-05-31 Thread Samarth Narang via cfe-commits
https://github.com/snarang181 created https://github.com/llvm/llvm-project/pull/142273 None >From 725dd21adcd2f776b2e6adc648e3038812059bf3 Mon Sep 17 00:00:00 2001 From: Samarth Narang Date: Sat, 31 May 2025 10:05:52 -0400 Subject: [PATCH 1/2] [clang-doc] Refactor CommentInfo.Kind to use Comme