[clang-tools-extra] [clang-doc] Precommit concept tests (PR #144160)

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

[clang-tools-extra] [clang-doc] Precommit concept tests (PR #144160)

2025-06-13 Thread Paul Kirth via cfe-commits
@@ -0,0 +1,29 @@ +// RUN: rm -rf %t && mkdir -p %t +// RUN: clang-doc --extra-arg -std=c++20 --output=%t --format=json --executor=standalone %s +// RUN: FileCheck %s < %t/GlobalNamespace/MyClass.json + +template +concept Addable = requires(T a, T b) { + { a + b }; +}; + +templat

[clang-tools-extra] [clang-doc] Precommit concept tests (PR #144160)

2025-06-13 Thread Paul Kirth via cfe-commits
@@ -0,0 +1,37 @@ +// RUN: rm -rf %t && mkdir -p %t +// RUN: clang-doc --extra-arg -std=c++20 --output=%t --format=json --executor=standalone %s ilovepi wrote: Let’s try to mark it fail with filecheck. If that’s doesn’t work, I’m ok with this. https://github.c

[clang-tools-extra] [clang-doc] Precommit concept tests (PR #144160)

2025-06-13 Thread Paul Kirth via cfe-commits
https://github.com/ilovepi approved this pull request. Let, module some minor comments. https://github.com/llvm/llvm-project/pull/144160 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commit

[clang-tools-extra] [clang-doc] Precommit concept tests (PR #144160)

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

[clang-tools-extra] [clang-doc] remove default label on some switches (PR #143919)

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

[clang-tools-extra] [clang-doc] remove default label on some switches (PR #143919)

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

[clang-tools-extra] [llvm] [llvm] add tool to verify mustache library (PR #111487)

2025-06-11 Thread Paul Kirth via cfe-commits
ilovepi wrote: This was completed in https://github.com/llvm/llvm-project/pull/142813 https://github.com/llvm/llvm-project/pull/111487 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [llvm] [llvm] add tool to verify mustache library (PR #111487)

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

[clang-tools-extra] [clang-doc] add a JSON generator (PR #142483)

2025-06-09 Thread Paul Kirth via cfe-commits
@@ -0,0 +1,193 @@ +// RUN: rm -rf %t && mkdir -p %t +// RUN: clang-doc --output=%t --format=json --executor=standalone %s +// RUN: FileCheck %s < %t/GlobalNamespace/MyClass.json + +struct Foo; + +// This is a nice class. +// It has some nice methods and fields. +// @brief This is

[clang-tools-extra] [clang-doc] add a JSON generator (PR #142483)

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

[clang-tools-extra] [clang-doc] add a JSON generator (PR #142483)

2025-06-09 Thread Paul Kirth via cfe-commits
@@ -0,0 +1,193 @@ +// RUN: rm -rf %t && mkdir -p %t +// RUN: clang-doc --output=%t --format=json --executor=standalone %s +// RUN: FileCheck %s < %t/GlobalNamespace/MyClass.json + +struct Foo; + +// This is a nice class. +// It has some nice methods and fields. +// @brief This is

[clang-tools-extra] [clang-doc] add a JSON generator (PR #142483)

2025-06-09 Thread Paul Kirth via cfe-commits
@@ -0,0 +1,175 @@ +#include "ClangDocTest.h" +#include "Generators.h" +#include "Representation.h" +#include "gtest/gtest.h" + +namespace clang { +namespace doc { + +static std::unique_ptr getJSONGenerator() { + auto G = doc::findGeneratorByName("json"); + if (!G) +return nu

[clang-tools-extra] [clang-doc] add a JSON generator (PR #142483)

2025-06-08 Thread Paul Kirth via cfe-commits
@@ -0,0 +1,194 @@ +// RUN: rm -rf %t && mkdir -p %t +// RUN: clang-doc --output=%t --format=json --executor=standalone %s +// RUN: FileCheck %s < %t/GlobalNamespace/MyClass.json + +struct Foo; + +// This is a nice class. +// It has some nice methods and fields. +// @brief This is

[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 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 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] [clang-doc] add a JSON generator (PR #142483)

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

[clang-tools-extra] [clang-doc] add a JSON generator (PR #142483)

2025-06-06 Thread Paul Kirth via cfe-commits
@@ -0,0 +1,194 @@ +// RUN: rm -rf %t && mkdir -p %t +// RUN: clang-doc --output=%t --format=json --executor=standalone %s +// RUN: FileCheck %s < %t/GlobalNamespace/MyClass.json + +struct Foo; + +// This is a nice class. +// It has some nice methods and fields. +// @brief This is

[clang-tools-extra] [clang-doc] add a JSON generator (PR #142483)

2025-06-06 Thread Paul Kirth via cfe-commits
@@ -0,0 +1,40 @@ +// RUN: rm -rf %t && mkdir -p %t +// RUN: clang-doc --output=%t --format=json --executor=standalone %s +// RUN: FileCheck %s < %t/GlobalNamespace/MyClass.json + +struct MyClass { + template T methodTemplate(T param) { + } +}; + +// CHECK: "PublicFunct

[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] [clang-doc] add a JSON generator (PR #142483)

2025-06-06 Thread Paul Kirth via cfe-commits
@@ -0,0 +1,430 @@ +#include "Generators.h" +#include "clang/Basic/Specifiers.h" +#include "llvm/Support/JSON.h" + +using namespace llvm; +using namespace llvm::json; + +namespace clang { +namespace doc { + +class JSONGenerator : public Generator { +public: + static const char *Fo

[clang-tools-extra] [clang-doc] add a JSON generator (PR #142483)

2025-06-06 Thread Paul Kirth via cfe-commits
https://github.com/ilovepi approved this pull request. I think this is a good start, modulo a couple fixes on reserving space in json::Arrays. I'm fine if we keep incrementally adding testing rather than doing it all up front. When we're done I imagine most of the YAML tests can be converted,

[clang-tools-extra] [clang-doc] add a JSON generator (PR #142483)

2025-06-06 Thread Paul Kirth via cfe-commits
@@ -0,0 +1,430 @@ +#include "Generators.h" +#include "clang/Basic/Specifiers.h" +#include "llvm/Support/JSON.h" + +using namespace llvm; +using namespace llvm::json; + +namespace clang { +namespace doc { + +class JSONGenerator : public Generator { +public: + static const char *Fo

[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] [clang-doc] add a JSON generator (PR #142483)

2025-06-05 Thread Paul Kirth via cfe-commits
ilovepi wrote: > > This sounds promising. I'm fine w/ adding a field to track this. BTW, what > > does clang do? I'm wondering if we should track more than 1-bit of info > > here. > > As far as I can tell, inside the AST Clang makes use of the `isa<>` > mechanisms (which we could also leverag

[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] [clang-doc] add a JSON generator (PR #142483)

2025-06-04 Thread Paul Kirth via cfe-commits
ilovepi wrote: > If we're open to adding a flag in the base `Info` like > `IsClassSpecialization`, then we can probably easily deal with these by > trying to reconstruct the specialization's arguments (will be something like > "Foo.json"). Functions don't produce their own files so function >

[clang-tools-extra] [clang-doc] Fix brittle check in test (PR #142665)

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

[clang-tools-extra] [clang-doc] add a JSON generator (PR #142483)

2025-06-03 Thread Paul Kirth via cfe-commits
ilovepi wrote: > Right now, since I just ripped the Mustache generator code, it creates > folders for each namespace and emits the nested entities there. This actually > represents a problem for template specializations because the code tries to > write another JSON object (the specialization

[clang-tools-extra] [clang-doc] add a JSON generator (PR #142483)

2025-06-03 Thread Paul Kirth via cfe-commits
ilovepi wrote: > I'll investigate this. Although right off the bat, the names in the Infos > aren't mangled. `Name` and `FullName` are the same for both records, which is > unfortunate. OK, well, let's give it a try, and if its too hard lets ... IDK go w/ the YAML thing, so its correct? Test

[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] [clang] Function type attribute to prevent CFI instrumentation (PR #135836)

2025-06-03 Thread Paul Kirth via cfe-commits
@@ -12711,6 +12711,11 @@ def warn_noderef_on_non_pointer_or_array : Warning< def warn_noderef_to_dereferenceable_pointer : Warning< "casting to dereferenceable pointer removes 'noderef' attribute">, InGroup; +def warn_cast_discards_cfi_unchecked_callee +: Warning<"impli

[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] [clang-doc] add a JSON generator (PR #142483)

2025-06-03 Thread Paul Kirth via cfe-commits
@@ -0,0 +1,352 @@ +#include "Generators.h" +#include "llvm/Support/JSON.h" + +using namespace llvm; +using namespace llvm::json; + +static llvm::ExitOnError ExitOnErr; + +namespace clang { +namespace doc { + +class JSONGenerator : public Generator { +public: + static const char *

[clang-tools-extra] [clang-doc] add a JSON generator (PR #142483)

2025-06-03 Thread Paul Kirth via cfe-commits
@@ -0,0 +1,352 @@ +#include "Generators.h" +#include "llvm/Support/JSON.h" + +using namespace llvm; +using namespace llvm::json; + +static llvm::ExitOnError ExitOnErr; + +namespace clang { +namespace doc { + +class JSONGenerator : public Generator { +public: + static const char *

[clang-tools-extra] [clang-doc] Add test case for #141990 (PR #142209)

2025-06-03 Thread Paul Kirth via cfe-commits
ilovepi wrote: ### Merge activity * **Jun 3, 4:36 PM UTC**: A user started a stack merge that includes this pull request via [Graphite](https://app.graphite.dev/github/pr/llvm/llvm-project/142209). https://github.com/llvm/llvm-project/pull/142209 _

[clang-tools-extra] [clang-doc] add a JSON generator (PR #142483)

2025-06-03 Thread Paul Kirth via cfe-commits
@@ -0,0 +1,352 @@ +#include "Generators.h" +#include "llvm/Support/JSON.h" + +using namespace llvm; +using namespace llvm::json; + +static llvm::ExitOnError ExitOnErr; + +namespace clang { +namespace doc { + +class JSONGenerator : public Generator { +public: + static const char *

[clang-tools-extra] [clang-doc] add a JSON generator (PR #142483)

2025-06-03 Thread Paul Kirth via cfe-commits
@@ -0,0 +1,352 @@ +#include "Generators.h" +#include "llvm/Support/JSON.h" + +using namespace llvm; +using namespace llvm::json; + +static llvm::ExitOnError ExitOnErr; + +namespace clang { +namespace doc { + +class JSONGenerator : public Generator { +public: + static const char *

[clang-tools-extra] [clang-doc] add a JSON generator (PR #142483)

2025-06-03 Thread Paul Kirth via cfe-commits
https://github.com/ilovepi commented: This is a good start, but I thin we'll want some more tests, and probably some unit test coverage. Unittesting is especially nice, since I believe this backend doesn't need any of the asset files, right? As for whether this should follow the pattern of YAM

[clang-tools-extra] [clang-doc] add a JSON generator (PR #142483)

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

[clang-tools-extra] [clang-doc] add tags to Mustache namespace template (PR #142045)

2025-06-03 Thread Paul Kirth via cfe-commits
ilovepi wrote: > Hi, sorry for the lack response. Unfortunately my father passed away recently > so I was dealing with the logistics. I'm more than happy to deal with any > issues that arises from my previous code @PeterChou1 I'm sorry to hear about your circumstances. That's truly a hard th

[clang-tools-extra] [clang-doc] Fix brittle check in test (PR #142665)

2025-06-03 Thread Paul Kirth via cfe-commits
https://github.com/ilovepi created https://github.com/llvm/llvm-project/pull/142665 Instead of having a platform specific error diagnostic, use a fixed one with more direct context for the error. >From 26277ead2a7f476daaae7c7c972549b6f949d850 Mon Sep 17 00:00:00 2001 From: Paul Kirth Date: Tue

[clang-tools-extra] [clang-doc] Fix brittle check in test (PR #142665)

2025-06-03 Thread Paul Kirth via cfe-commits
ilovepi wrote: * **#142665** https://app.graphite.dev/github/pr/llvm/llvm-project/142665?utm_source=stack-comment-icon"; target="_blank">https://static.graphite.dev/graphite-32x32-black.png"; alt="Graphite" width="10px" height="10px"/> 👈 https://app.graphite.dev/github/pr/llvm/llvm-project/1426

[clang-tools-extra] [clang-doc] Reenable time trace support (PR #141139)

2025-06-03 Thread Paul Kirth via cfe-commits
ilovepi wrote: ### Merge activity * **Jun 3, 4:54 PM UTC**: A user started a stack merge that includes this pull request via [Graphite](https://app.graphite.dev/github/pr/llvm/llvm-project/141139). https://github.com/llvm/llvm-project/pull/141139 _

[clang-tools-extra] [clang-doc] Reenable time trace support (PR #141139)

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

[clang-tools-extra] [clang-doc] Add test case for #141990 (PR #142209)

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

[clang-tools-extra] [clang-doc] [test] Generalize error message patterns (PR #142373)

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

[clang-tools-extra] [clang-doc] [test] Generalize error message patterns (PR #142373)

2025-06-03 Thread Paul Kirth via cfe-commits
https://github.com/ilovepi approved this pull request. Thanks for pointing this out. I'll try to follow up later today w/ a less brittle check. https://github.com/llvm/llvm-project/pull/142373 ___ cfe-commits mailing list cfe-commits@lists.llvm.org ht

[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] [llvm] [clang-doc] Adds a mustache backend (PR #133161)

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

[clang-tools-extra] [llvm] [clang-doc] Adds a mustache backend (PR #133161)

2025-05-31 Thread Paul Kirth via cfe-commits
ilovepi wrote: We've landed all of this functionality, so this can be closed. https://github.com/llvm/llvm-project/pull/133161 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-doc] Reenable time trace support (PR #141139)

2025-05-30 Thread Paul Kirth via cfe-commits
https://github.com/ilovepi updated https://github.com/llvm/llvm-project/pull/141139 >From feed17a330e088d068fc3a0a2eb127bda102f608 Mon Sep 17 00:00:00 2001 From: Paul Kirth Date: Wed, 21 May 2025 09:50:32 -0700 Subject: [PATCH] [clang-doc] Reenable time trace support This patch re-enables -fti

[clang-tools-extra] [clang-doc] Reenable time trace support (PR #141139)

2025-05-30 Thread Paul Kirth via cfe-commits
https://github.com/ilovepi updated https://github.com/llvm/llvm-project/pull/141139 >From 80db854474347bcc219a8780fc68458197ba2e92 Mon Sep 17 00:00:00 2001 From: Paul Kirth Date: Wed, 21 May 2025 09:50:32 -0700 Subject: [PATCH] [clang-doc] Reenable time trace support This patch re-enables -fti

[clang-tools-extra] [cmake][clang-tools] Make split-file a dependency for tests (PR #142048)

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

[clang-tools-extra] [clang-doc] add tags to Mustache namespace template (PR #142045)

2025-05-30 Thread Paul Kirth via cfe-commits
@@ -0,0 +1,74 @@ +// RUN: rm -rf %t && mkdir -p %t +// RUN: clang-doc --format=mustache --output=%t --executor=standalone %s +// RUN: FileCheck %s < %t/GlobalNamespace/index.html + +enum Color { + RED, + BLUE, + GREEN +}; + +class Foo; + +// CHECK: +// CHECK-NEXT:

[clang-tools-extra] [clang-doc] add tags to Mustache namespace template (PR #142045)

2025-05-30 Thread Paul Kirth via cfe-commits
https://github.com/ilovepi approved this pull request. LGTM. We may want to tweak the template some more, but we should get the test in place now and follow up if we want to change the aesthetics later. https://github.com/llvm/llvm-project/pull/142045 ___

[clang-tools-extra] [clang-doc] Refactor error handling to use ExitOnError (PR #141699)

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

[clang-tools-extra] [clang-doc] Add test case for #141990 (PR #142209)

2025-05-30 Thread Paul Kirth via cfe-commits
https://github.com/ilovepi created https://github.com/llvm/llvm-project/pull/142209 When we landed the fix for the assertion in #141990, we hadn't yet reduced the test case sufficiently for a regression test. >From b541800f007dd538d2aead1b514bbe55c175d0ca Mon Sep 17 00:00:00 2001 From: Paul Kir

[clang-tools-extra] [clang-doc] Add test case for #141990 (PR #142209)

2025-05-30 Thread Paul Kirth via cfe-commits
ilovepi wrote: * **#142209** https://app.graphite.dev/github/pr/llvm/llvm-project/142209?utm_source=stack-comment-icon"; target="_blank">https://static.graphite.dev/graphite-32x32-black.png"; alt="Graphite" width="10px" height="10px"/> 👈 https://app.graphite.dev/github/pr/llvm/llvm-project/1422

[clang-tools-extra] [clang-doc] Refactor error handling to use ExitOnError (PR #141699)

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

[clang-tools-extra] [clang-doc] Refactor error handling to use ExitOnError (PR #141699)

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

[clang-tools-extra] [clang-doc] Refactor error handling to use ExitOnError (PR #141699)

2025-05-30 Thread Paul Kirth via cfe-commits
@@ -245,10 +247,32 @@ sortUsrToInfo(llvm::StringMap> &USRToInfo) { } } +llvm::Error handleMappingPhaseErrors(llvm::Error Err, + bool IgnoreMappingFailures) { + if (!Err) +return llvm::Error::success(); + if (IgnoreMappingFailures) {

[clang-tools-extra] [clang-doc] Refactor error handling to use ExitOnError (PR #141699)

2025-05-30 Thread Paul Kirth via cfe-commits
@@ -245,10 +247,32 @@ sortUsrToInfo(llvm::StringMap> &USRToInfo) { } } +llvm::Error handleMappingPhaseErrors(llvm::Error Err, ilovepi wrote: This should be `static`. `handleMappingFailures()` makes more sense to me as an API name. Since IgnoreMappingFailu

[clang-tools-extra] [clang-doc] Refactor error handling to use ExitOnError (PR #141699)

2025-05-30 Thread Paul Kirth via cfe-commits
@@ -0,0 +1,29 @@ +/// Invalid output path (%t is a file, not a directory). +// RUN: rm -rf %t && touch %t +// RUN: not clang-doc %s -output=%t/subdir 2>&1 | FileCheck %s +// CHECK: clang-doc error: +// CHECK: {{(Not a directory|no such file or directory)}} + +/// Invalid format op

[clang-tools-extra] [clang-doc] Refactor error handling to use ExitOnError (PR #141699)

2025-05-30 Thread Paul Kirth via cfe-commits
https://github.com/ilovepi approved this pull request. I think this will be fine to land after the small changes I've requested are done, and CI is passing. Thanks for helping out clang-doc, and bearing with the review process. https://github.com/llvm/llvm-project/pull/141699 _

[clang-tools-extra] [clang-doc] Refactor error handling to use ExitOnError (PR #141699)

2025-05-29 Thread Paul Kirth via cfe-commits
@@ -0,0 +1,29 @@ +/// Invalid output path (%t is a file, not a directory). +// RUN: rm -rf %t && touch %t +// RUN: not clang-doc %s -output=%t/subdir 2>&1 | FileCheck %s +// CHECK: clang-doc error: +// CHECK: {{(Not a directory|no such file or directory)}} + +/// Invalid format op

[clang-tools-extra] [clang-doc] Refactor error handling to use ExitOnError (PR #141699)

2025-05-29 Thread Paul Kirth via cfe-commits
@@ -0,0 +1,29 @@ +/// Invalid output path (%t is a file, not a directory). +// RUN: rm -rf %t && touch %t +// RUN: not clang-doc %s -output=%t/subdir 2>&1 | FileCheck %s +// CHECK: clang-doc error: +// CHECK: {{(Not a directory|no such file or directory)}} + +/// Invalid format op

[clang] [llvm] Revert "[Clang][LoongArch] Support target attribute for function" (PR #141998)

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

[clang] [llvm] Revert "[Clang][LoongArch] Support target attribute for function" (PR #141998)

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

[clang] [llvm] Revert "[Clang][LoongArch] Support target attribute for function" (PR #141998)

2025-05-29 Thread Paul Kirth via cfe-commits
https://github.com/ilovepi created https://github.com/llvm/llvm-project/pull/141998 Reverts llvm/llvm-project#140700 This breaks bots both in buildbot and downstream CI: - https://lab.llvm.org/buildbot/#/builders/11/builds/16173 - https://ci.chromium.org/ui/p/fuchsia/builders/toolchain.ci/cla

[clang-tools-extra] [clang-doc] Refactor error handling to use ExitOnError (PR #141699)

2025-05-29 Thread Paul Kirth via cfe-commits
ilovepi wrote: > @ilovepi, thanks for the patience and taking out the time to give detailed > reviews. I will work on addresing your comments. One word on the tests: I was > trying to test some of the other fail conditions but seems like a lot of the > error conditions are caught by the parsin

[clang-tools-extra] [clang-doc] Refactor error handling to use ExitOnError (PR #141699)

2025-05-29 Thread Paul Kirth via cfe-commits
ilovepi wrote: > Also, from the CI test run, I see the Linux build failing. This seems > unrelated, right? Does it warrant a rerun? > > ``` > /home/gha/actions-runner/_work/llvm-project/llvm-project/libc/test/src/math/smoke/HypotTest.h:31: > FAILURE > Failed to match aNaN against LIBC_NAMESPAC

[clang-tools-extra] [clang-doc] Reenable time trace support (PR #141139)

2025-05-29 Thread Paul Kirth via cfe-commits
https://github.com/ilovepi updated https://github.com/llvm/llvm-project/pull/141139 >From 7f346f476e89bc97c5d1780ef9f12246ebc4f86d Mon Sep 17 00:00:00 2001 From: Paul Kirth Date: Wed, 21 May 2025 09:50:32 -0700 Subject: [PATCH] [clang-doc] Reenable time trace support This patch re-enables -fti

[clang-tools-extra] [clang-doc] Reenable time trace support (PR #141139)

2025-05-29 Thread Paul Kirth via cfe-commits
https://github.com/ilovepi updated https://github.com/llvm/llvm-project/pull/141139 >From 41c65c1ec8f0329d8265d12856cc0b4e33bb502e Mon Sep 17 00:00:00 2001 From: Paul Kirth Date: Wed, 21 May 2025 09:50:32 -0700 Subject: [PATCH] [clang-doc] Reenable time trace support This patch re-enables -fti

[clang-tools-extra] [clang-doc] Fix assertions error in Serialize.cpp (PR #141990)

2025-05-29 Thread Paul Kirth via cfe-commits
ilovepi wrote: * **#141990** https://app.graphite.dev/github/pr/llvm/llvm-project/141990?utm_source=stack-comment-icon"; target="_blank">https://static.graphite.dev/graphite-32x32-black.png"; alt="Graphite" width="10px" height="10px"/> 👈 https://app.graphite.dev/github/pr/llvm/llvm-project/1419

[clang-tools-extra] [clang-doc] Fix assertions error in Serialize.cpp (PR #141990)

2025-05-29 Thread Paul Kirth via cfe-commits
https://github.com/ilovepi created https://github.com/llvm/llvm-project/pull/141990 We can only print and use a default arg, if it is instantiated. I was unable to reduce the test case for this to something of reasonable size, but this is easily hit by running clang-doc to generate clang's docum

[clang-tools-extra] [clang-doc] Refactor error handling to use ExitOnError (PR #141699)

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

[clang-tools-extra] [clang-doc] fix FileCheck for conversion function HTML test (PR #141976)

2025-05-29 Thread Paul Kirth via cfe-commits
https://github.com/ilovepi approved this pull request. https://github.com/llvm/llvm-project/pull/141976 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-doc] fix FileCheck for conversion function HTML test (PR #141976)

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

[clang-tools-extra] [clang-doc] fix FileCheck for conversion function HTML test (PR #141976)

2025-05-29 Thread Paul Kirth via cfe-commits
ilovepi wrote: Jeez. We're so disciplined ... LGTM Assuming CI passes. https://github.com/llvm/llvm-project/pull/141976 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-doc] Refactor error handling to use ExitOnError (PR #141699)

2025-05-29 Thread Paul Kirth via cfe-commits
@@ -0,0 +1,12 @@ +// Test: Invalid output path (%t is a file, not a directory) +// RUN: rm -rf %t && echo "not a dir" > %t +// RUN: not clang-doc %s -output=%t/subdir 2>&1 | FileCheck --check-prefix=BAD-OUTPUT %s + +// BAD-OUTPUT: clang-doc error: +// BAD-OUTPUT: {{(Not a directo

[clang-tools-extra] [clang-doc] Refactor error handling to use ExitOnError (PR #141699)

2025-05-29 Thread Paul Kirth via cfe-commits
@@ -0,0 +1,12 @@ +// Test: Invalid output path (%t is a file, not a directory) +// RUN: rm -rf %t && echo "not a dir" > %t +// RUN: not clang-doc %s -output=%t/subdir 2>&1 | FileCheck --check-prefix=BAD-OUTPUT %s + +// BAD-OUTPUT: clang-doc error: +// BAD-OUTPUT: {{(Not a directo

[clang-tools-extra] [clang-doc] Refactor error handling to use ExitOnError (PR #141699)

2025-05-29 Thread Paul Kirth via cfe-commits
@@ -0,0 +1,12 @@ +// Test: Invalid output path (%t is a file, not a directory) +// RUN: rm -rf %t && echo "not a dir" > %t +// RUN: not clang-doc %s -output=%t/subdir 2>&1 | FileCheck --check-prefix=BAD-OUTPUT %s + +// BAD-OUTPUT: clang-doc error: +// BAD-OUTPUT: {{(Not a directo

[clang-tools-extra] [clang-doc] Refactor error handling to use ExitOnError (PR #141699)

2025-05-29 Thread Paul Kirth via cfe-commits
@@ -300,7 +297,7 @@ Example usage for a project using a compile commands database: "these files and continue:\n" << toString(std::move(Err)) << "\n"; else { - llvm::errs() << toString(std::move(Err)) << "\n"; i

[clang-tools-extra] [clang-doc] Refactor error handling to use ExitOnError (PR #141699)

2025-05-29 Thread Paul Kirth via cfe-commits
@@ -371,22 +368,15 @@ Example usage for a project using a compile commands database: sortUsrToInfo(USRToInfo); // Ensure the root output directory exists. - if (std::error_code Err = llvm::sys::fs::create_directories(OutDirectory); - Err != std::error_code()) { -

[clang-tools-extra] [clang-doc] Refactor error handling to use ExitOnError (PR #141699)

2025-05-29 Thread Paul Kirth via cfe-commits
@@ -371,22 +368,15 @@ Example usage for a project using a compile commands database: sortUsrToInfo(USRToInfo); // Ensure the root output directory exists. - if (std::error_code Err = llvm::sys::fs::create_directories(OutDirectory); - Err != std::error_code()) { -

[clang-tools-extra] [clang-doc] Refactor error handling to use ExitOnError (PR #141699)

2025-05-29 Thread Paul Kirth via cfe-commits
https://github.com/ilovepi commented: Thanks for the work on this. I think this is getting pretty close, but I think there are more test cases required. Tests that we need: 1. Generator name 2. HTML asset file that's missing 3. A mapping failure (there may already be tests that handle this) 4.

[clang-tools-extra] [clang-doc] Refactor error handling to use ExitOnError (PR #141699)

2025-05-29 Thread Paul Kirth via cfe-commits
@@ -0,0 +1,12 @@ +// Test: Invalid output path (%t is a file, not a directory) +// RUN: rm -rf %t && echo "not a dir" > %t ilovepi wrote: we don't need this echo. you can just `touch %t` to the same effect. https://github.com/llvm/llvm-project/pull/141699 __

  1   2   3   4   5   6   7   8   9   10   >