hulxv wrote:
@ilovepi Hey, could you please review this PR whenever you have a moment? I’d
really appreciate your feedback!
https://github.com/llvm/llvm-project/pull/131280
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org
https://github.com/hulxv edited https://github.com/llvm/llvm-project/pull/131280
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -518,10 +519,12 @@ struct ClangDocContext {
// the file is in this dir.
// URL of repository that hosts code used for links to definition locations.
std::optional RepositoryUrl;
+ // Prefix of line code for repository.
+ std::optional Reposi
@@ -866,11 +878,15 @@ genHTML(const RecordInfo &I, Index &InfoIndex, const
ClangDocContext &CDCtx,
Out.emplace_back(std::make_unique(HTMLTag::TAG_H1, InfoTitle));
if (I.DefLoc) {
-if (!CDCtx.RepositoryUrl)
- Out.emplace_back(writeFileDefinition(*I.DefLoc));
-
https://github.com/hulxv created
https://github.com/llvm/llvm-project/pull/131280
### Description
This PR adds a new command-line option that allows users to specify the prefix
used for line-based anchors in repository URLs. Different repository interfaces
use different formats for line anchor
https://github.com/hulxv updated
https://github.com/llvm/llvm-project/pull/131280
>From bf9bd4156cb7f652c9cf0477f537e5c58b470448 Mon Sep 17 00:00:00 2001
From: hulxv
Date: Fri, 14 Mar 2025 07:39:15 +0200
Subject: [PATCH 1/4] [clang-doc] [feat] add `--repository-line-prefix`
argument (fix #5981
@@ -494,7 +494,7 @@ genReferencesBlock(const std::vector &References,
static std::unique_ptr
writeFileDefinition(const Location &L,
std::optional RepositoryUrl = std::nullopt) {
- if (!L.IsFileInRootDir && !RepositoryUrl)
+ if (!L.IsFileInRootDir || !Repos
@@ -494,7 +494,7 @@ genReferencesBlock(const std::vector &References,
static std::unique_ptr
writeFileDefinition(const Location &L,
std::optional RepositoryUrl = std::nullopt) {
- if (!L.IsFileInRootDir && !RepositoryUrl)
+ if (!L.IsFileInRootDir || !Repos
hulxv wrote:
@ilovepi
I see you opened a PR to solve the same issue
[here](https://github.com/llvm/llvm-project/pull/131939). Wouldn't be better if
I continue working on it with your suggestions? 😅
https://github.com/llvm/llvm-project/pull/131698
___
@@ -750,11 +754,15 @@ genHTML(const EnumInfo &I, const ClangDocContext &CDCtx) {
Out.emplace_back(std::move(Table));
if (I.DefLoc) {
-if (!CDCtx.RepositoryUrl)
- Out.emplace_back(writeFileDefinition(*I.DefLoc));
-else
- Out.emplace_back(
- writeF
https://github.com/hulxv updated
https://github.com/llvm/llvm-project/pull/131280
>From bf9bd4156cb7f652c9cf0477f537e5c58b470448 Mon Sep 17 00:00:00 2001
From: hulxv
Date: Fri, 14 Mar 2025 07:39:15 +0200
Subject: [PATCH 01/12] [clang-doc] [feat] add `--repository-line-prefix`
argument (fix #59
https://github.com/hulxv updated
https://github.com/llvm/llvm-project/pull/131280
>From bf9bd4156cb7f652c9cf0477f537e5c58b470448 Mon Sep 17 00:00:00 2001
From: hulxv
Date: Fri, 14 Mar 2025 07:39:15 +0200
Subject: [PATCH 01/11] [clang-doc] [feat] add `--repository-line-prefix`
argument (fix #59
hulxv wrote:
@ilovepi
About `writeFileDefiniation`, what's your opinion about making it similar to
the markdown generator like this?
```cpp
static void writeFileDefinition(const ClangDocContext &CDCtx, const Location
&L);
```
I think it's more better
https://github.com/llvm/llvm-project/pull/
@@ -490,15 +490,17 @@ genReferencesBlock(const std::vector
&References,
}
return Out;
}
-
static std::unique_ptr
-writeFileDefinition(const Location &L,
-std::optional RepositoryUrl = std::nullopt) {
- if (!L.IsFileInRootDir && !RepositoryUrl)
+writeF
@@ -57,11 +58,13 @@ static void writeFileDefinition(const ClangDocContext
&CDCtx, const Location &L,
OS << "*Defined at " << L.Filename << "#" << std::to_string(L.LineNumber)
<< "*";
} else {
-OS << "*Defined at [" << L.Filename << "#" << std::to_string(L.Line
@@ -749,13 +752,8 @@ genHTML(const EnumInfo &I, const ClangDocContext &CDCtx) {
Out.emplace_back(std::move(Table));
- if (I.DefLoc) {
-if (!CDCtx.RepositoryUrl)
- Out.emplace_back(writeFileDefinition(*I.DefLoc));
-else
- Out.emplace_back(
- write
https://github.com/hulxv edited https://github.com/llvm/llvm-project/pull/131280
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
hulxv wrote:
It works without problems now😄
https://github.com/llvm/llvm-project/pull/131280
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/hulxv updated
https://github.com/llvm/llvm-project/pull/131280
>From bf9bd4156cb7f652c9cf0477f537e5c58b470448 Mon Sep 17 00:00:00 2001
From: hulxv
Date: Fri, 14 Mar 2025 07:39:15 +0200
Subject: [PATCH 01/17] [clang-doc] [feat] add `--repository-line-prefix`
argument (fix #59
https://github.com/hulxv updated
https://github.com/llvm/llvm-project/pull/131280
>From bf9bd4156cb7f652c9cf0477f537e5c58b470448 Mon Sep 17 00:00:00 2001
From: hulxv
Date: Fri, 14 Mar 2025 07:39:15 +0200
Subject: [PATCH 1/7] [clang-doc] [feat] add `--repository-line-prefix`
argument (fix #5981
hulxv wrote:
@ilovepi done
https://github.com/llvm/llvm-project/pull/131280
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/hulxv updated
https://github.com/llvm/llvm-project/pull/131280
>From bf9bd4156cb7f652c9cf0477f537e5c58b470448 Mon Sep 17 00:00:00 2001
From: hulxv
Date: Fri, 14 Mar 2025 07:39:15 +0200
Subject: [PATCH 01/10] [clang-doc] [feat] add `--repository-line-prefix`
argument (fix #59
https://github.com/hulxv updated
https://github.com/llvm/llvm-project/pull/131280
>From bf9bd4156cb7f652c9cf0477f537e5c58b470448 Mon Sep 17 00:00:00 2001
From: hulxv
Date: Fri, 14 Mar 2025 07:39:15 +0200
Subject: [PATCH 01/10] [clang-doc] [feat] add `--repository-line-prefix`
argument (fix #59
https://github.com/hulxv updated
https://github.com/llvm/llvm-project/pull/131280
>From bf9bd4156cb7f652c9cf0477f537e5c58b470448 Mon Sep 17 00:00:00 2001
From: hulxv
Date: Fri, 14 Mar 2025 07:39:15 +0200
Subject: [PATCH 1/9] [clang-doc] [feat] add `--repository-line-prefix`
argument (fix #5981
https://github.com/hulxv updated
https://github.com/llvm/llvm-project/pull/131280
>From bf9bd4156cb7f652c9cf0477f537e5c58b470448 Mon Sep 17 00:00:00 2001
From: hulxv
Date: Fri, 14 Mar 2025 07:39:15 +0200
Subject: [PATCH 01/10] [clang-doc] [feat] add `--repository-line-prefix`
argument (fix #59
https://github.com/hulxv updated
https://github.com/llvm/llvm-project/pull/131280
>From bf9bd4156cb7f652c9cf0477f537e5c58b470448 Mon Sep 17 00:00:00 2001
From: hulxv
Date: Fri, 14 Mar 2025 07:39:15 +0200
Subject: [PATCH 01/10] [clang-doc] [feat] add `--repository-line-prefix`
argument (fix #59
https://github.com/hulxv updated
https://github.com/llvm/llvm-project/pull/131280
>From bf9bd4156cb7f652c9cf0477f537e5c58b470448 Mon Sep 17 00:00:00 2001
From: hulxv
Date: Fri, 14 Mar 2025 07:39:15 +0200
Subject: [PATCH 01/14] [clang-doc] [feat] add `--repository-line-prefix`
argument (fix #59
@@ -516,15 +518,16 @@ writeFileDefinition(const Location &L,
std::make_unique(HTMLTag::TAG_A, std::to_string(L.LineNumber));
// The links to a specific line in the source code use the github /
// googlesource notation so it won't work for all hosting pages.
- // FIXM
https://github.com/hulxv updated
https://github.com/llvm/llvm-project/pull/131280
>From bf9bd4156cb7f652c9cf0477f537e5c58b470448 Mon Sep 17 00:00:00 2001
From: hulxv
Date: Fri, 14 Mar 2025 07:39:15 +0200
Subject: [PATCH 01/16] [clang-doc] [feat] add `--repository-line-prefix`
argument (fix #59
hulxv wrote:
Should I modify `HTMLGeneratorTest.cpp` to test `RepositoryLinePrefix`?
https://github.com/llvm/llvm-project/blob/7a370748c0928b9ccfe26127e54eb3c1a1827d75/clang-tools-extra/unittests/clang-doc/HTMLGeneratorTest.cpp#L179
https://github.com/llvm/llvm-project/pull/131280
__
https://github.com/hulxv updated
https://github.com/llvm/llvm-project/pull/131280
>From bf9bd4156cb7f652c9cf0477f537e5c58b470448 Mon Sep 17 00:00:00 2001
From: hulxv
Date: Fri, 14 Mar 2025 07:39:15 +0200
Subject: [PATCH 01/15] [clang-doc] [feat] add `--repository-line-prefix`
argument (fix #59
https://github.com/hulxv created
https://github.com/llvm/llvm-project/pull/132991
Closes #132983
>From c476948593a80ed31765cdd711a626e4e03930ab Mon Sep 17 00:00:00 2001
From: hulxv
Date: Tue, 25 Mar 2025 22:56:51 +0200
Subject: [PATCH] [include-cleaner] rename enabled flags to `disable-*`
---
https://github.com/hulxv updated
https://github.com/llvm/llvm-project/pull/131280
>From bf9bd4156cb7f652c9cf0477f537e5c58b470448 Mon Sep 17 00:00:00 2001
From: hulxv
Date: Fri, 14 Mar 2025 07:39:15 +0200
Subject: [PATCH 01/17] [clang-doc] [feat] add `--repository-line-prefix`
argument (fix #59
https://github.com/hulxv updated
https://github.com/llvm/llvm-project/pull/131280
>From bf9bd4156cb7f652c9cf0477f537e5c58b470448 Mon Sep 17 00:00:00 2001
From: hulxv
Date: Fri, 14 Mar 2025 07:39:15 +0200
Subject: [PATCH 01/15] [clang-doc] [feat] add `--repository-line-prefix`
argument (fix #59
https://github.com/hulxv closed https://github.com/llvm/llvm-project/pull/131698
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/hulxv updated
https://github.com/llvm/llvm-project/pull/131280
>From bf9bd4156cb7f652c9cf0477f537e5c58b470448 Mon Sep 17 00:00:00 2001
From: hulxv
Date: Fri, 14 Mar 2025 07:39:15 +0200
Subject: [PATCH 01/17] [clang-doc] [feat] add `--repository-line-prefix`
argument (fix #59
hulxv wrote:
> The failures on the presubmit bot look unrelated, but you need to update your
> branch, since it looks like the base revision is broken.
Done
https://github.com/llvm/llvm-project/pull/131280
___
cfe-commits mailing list
cfe-commits@li
https://github.com/hulxv updated
https://github.com/llvm/llvm-project/pull/131280
>From bf9bd4156cb7f652c9cf0477f537e5c58b470448 Mon Sep 17 00:00:00 2001
From: hulxv
Date: Fri, 14 Mar 2025 07:39:15 +0200
Subject: [PATCH 01/16] [clang-doc] [feat] add `--repository-line-prefix`
argument (fix #59
https://github.com/hulxv updated
https://github.com/llvm/llvm-project/pull/131280
>From bf9bd4156cb7f652c9cf0477f537e5c58b470448 Mon Sep 17 00:00:00 2001
From: hulxv
Date: Fri, 14 Mar 2025 07:39:15 +0200
Subject: [PATCH 1/6] [clang-doc] [feat] add `--repository-line-prefix`
argument (fix #5981
hulxv wrote:
@ilovepi Ping
https://github.com/llvm/llvm-project/pull/131280
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
hulxv wrote:
> While its not a problem, we typically wait for 1 week between reviews to
> "ping" a reviewer.
> https://llvm.org/docs/CodeReview.html#lgtm-how-a-patch-is-accepted
Ok, I am sorry for that
https://github.com/llvm/llvm-project/pull/131280
__
https://github.com/hulxv updated
https://github.com/llvm/llvm-project/pull/131280
>From bf9bd4156cb7f652c9cf0477f537e5c58b470448 Mon Sep 17 00:00:00 2001
From: hulxv
Date: Fri, 14 Mar 2025 07:39:15 +0200
Subject: [PATCH 01/18] [clang-doc] [feat] add `--repository-line-prefix`
argument (fix #59
hulxv wrote:
> The branch has conflicts that need to be resolved.
I think all is fine now
https://github.com/llvm/llvm-project/pull/131280
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-comm
https://github.com/hulxv updated
https://github.com/llvm/llvm-project/pull/131280
>From bf9bd4156cb7f652c9cf0477f537e5c58b470448 Mon Sep 17 00:00:00 2001
From: hulxv
Date: Fri, 14 Mar 2025 07:39:15 +0200
Subject: [PATCH 1/9] [clang-doc] [feat] add `--repository-line-prefix`
argument (fix #5981
@@ -57,7 +57,12 @@ static void writeFileDefinition(const ClangDocContext
&CDCtx, const Location &L,
OS << "*Defined at " << L.Filename << "#" << std::to_string(L.LineNumber)
<< "*";
} else {
-OS << "*Defined at [" << L.Filename << "#" << std::to_string(L.LineN
https://github.com/hulxv updated
https://github.com/llvm/llvm-project/pull/131280
>From bf9bd4156cb7f652c9cf0477f537e5c58b470448 Mon Sep 17 00:00:00 2001
From: hulxv
Date: Fri, 14 Mar 2025 07:39:15 +0200
Subject: [PATCH 1/8] [clang-doc] [feat] add `--repository-line-prefix`
argument (fix #5981
@@ -749,13 +752,8 @@ genHTML(const EnumInfo &I, const ClangDocContext &CDCtx) {
Out.emplace_back(std::move(Table));
- if (I.DefLoc) {
-if (!CDCtx.RepositoryUrl)
- Out.emplace_back(writeFileDefinition(*I.DefLoc));
-else
- Out.emplace_back(
- write
https://github.com/hulxv updated
https://github.com/llvm/llvm-project/pull/131280
>From bf9bd4156cb7f652c9cf0477f537e5c58b470448 Mon Sep 17 00:00:00 2001
From: hulxv
Date: Fri, 14 Mar 2025 07:39:15 +0200
Subject: [PATCH 1/7] [clang-doc] [feat] add `--repository-line-prefix`
argument (fix #5981
48 matches
Mail list logo