Skip to content

Commit cf84f25

Browse files
author
z1_cciauto
authored
merge main into amd-staging (llvm#3304)
2 parents dc604b2 + 329d954 commit cf84f25

File tree

463 files changed

+18605
-8625
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

463 files changed

+18605
-8625
lines changed

.github/CODEOWNERS

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -120,8 +120,9 @@
120120
/mlir/**/Index* @mogball
121121

122122
# MLIR Python Bindings
123-
/mlir/test/python/ @ftynse @makslevental @stellaraccident
124-
/mlir/python/ @ftynse @makslevental @stellaraccident
123+
/mlir/test/python/ @ftynse @makslevental @stellaraccident @rolfmorel
124+
/mlir/python/ @ftynse @makslevental @stellaraccident @rolfmorel
125+
/mlir/lib/Bindings/Python @makslevental @rolfmorel
125126

126127
# MLIR Mem2Reg/SROA
127128
/mlir/**/Transforms/Mem2Reg.* @moxinilian

.github/workflows/containers/github-action-ci/Dockerfile

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -58,10 +58,8 @@ RUN apt-get update && \
5858
python3-psutil \
5959
sudo \
6060
# These are needed by the premerge pipeline. Pip is used to install
61-
# dependent python packages and ccache is used for build caching. File and
62-
# tzdata are used for tests.
61+
# dependent python packages. File and tzdata are used for tests.
6362
python3-pip \
64-
ccache \
6563
file \
6664
tzdata && \
6765
apt-get clean && \

.github/workflows/libcxx-build-containers.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,6 @@ on:
1818
- 'libcxx/utils/ci/**'
1919
- '.github/workflows/libcxx-build-containers.yml'
2020
pull_request:
21-
branches:
22-
- main
2321
paths:
2422
- 'libcxx/utils/ci/**'
2523
- '.github/workflows/libcxx-build-containers.yml'

.github/workflows/release-asset-audit.yml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,12 @@ jobs:
2222
runs-on: ubuntu-24.04
2323
if: github.repository == 'llvm/llvm-project'
2424
steps:
25-
- uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 #v4.1.6
25+
- name: Checkout LLVM
26+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
27+
with:
28+
sparse-checkout: |
29+
.github/workflows/release-asset-audit.py
30+
llvm/utils/git/requirements.txt
2631
- name: "Run Audit Script"
2732
env:
2833
GITHUB_TOKEN: ${{ github.token }}

clang-tools-extra/clang-doc/JSONGenerator.cpp

Lines changed: 23 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,18 @@ static json::Value extractTextComments(Object *ParagraphComment) {
103103
return *ParagraphComment->get("Children");
104104
}
105105

106+
static json::Value extractVerbatimComments(json::Array VerbatimLines) {
107+
json::Value TextArray = json::Array();
108+
auto &TextArrayRef = *TextArray.getAsArray();
109+
for (auto &Line : VerbatimLines)
110+
TextArrayRef.push_back(*Line.getAsObject()
111+
->get("VerbatimBlockLineComment")
112+
->getAsObject()
113+
->get("Text"));
114+
115+
return TextArray;
116+
}
117+
106118
static Object serializeComment(const CommentInfo &I, Object &Description) {
107119
// taken from PR #142273
108120
Object Obj = Object();
@@ -126,6 +138,8 @@ static Object serializeComment(const CommentInfo &I, Object &Description) {
126138
auto TextCommentsArray = extractTextComments(CARef.front().getAsObject());
127139
if (I.Name == "brief")
128140
insertComment(Description, TextCommentsArray, "BriefComments");
141+
else if (I.Name == "return")
142+
insertComment(Description, TextCommentsArray, "ReturnComments");
129143
return Obj;
130144
}
131145

@@ -147,19 +161,19 @@ static Object serializeComment(const CommentInfo &I, Object &Description) {
147161
Child.insert({"ParamName", I.ParamName});
148162
Child.insert({"Direction", I.Direction});
149163
Child.insert({"Explicit", I.Explicit});
150-
Child.insert({"Children", ChildArr});
151-
Obj.insert({commentKindToString(I.Kind), ChildVal});
164+
auto TextCommentsArray = extractTextComments(CARef.front().getAsObject());
165+
Child.insert({"Children", TextCommentsArray});
166+
if (I.Kind == CommentKind::CK_ParamCommandComment)
167+
insertComment(Description, ChildVal, "ParamComments");
152168
return Obj;
153169
}
154170

155171
case CommentKind::CK_VerbatimBlockComment: {
156-
Child.insert({"Text", I.Text});
157-
if (!I.CloseName.empty())
158-
Child.insert({"CloseName", I.CloseName});
159-
Child.insert({"Children", ChildArr});
160-
if (I.CloseName == "endcode")
161-
insertComment(Description, ChildVal, "CodeComments");
162-
else if (I.CloseName == "endverbatim")
172+
if (I.CloseName == "endcode") {
173+
// We don't support \code language specification
174+
auto TextCommentsArray = extractVerbatimComments(CARef);
175+
insertComment(Description, TextCommentsArray, "CodeComments");
176+
} else if (I.CloseName == "endverbatim")
163177
insertComment(Description, ChildVal, "VerbatimComments");
164178
return Obj;
165179
}

clang-tools-extra/clang-doc/assets/clang-doc-mustache.css

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -469,3 +469,7 @@ a, a:visited, a:hover, a:active {
469469
text-decoration: none;
470470
color: inherit;
471471
}
472+
473+
.code-block {
474+
white-space: pre-line;
475+
}

clang-tools-extra/clang-doc/assets/comment-template.mustache

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,36 @@
2424
{{>Comments}}
2525
{{/Children}}
2626
{{/ParagraphComment}}
27+
{{#HasParamComments}}
28+
<h3>Parameters</h3>
29+
{{#ParamComments}}
30+
<div>
31+
<b>{{ParamName}}</b> {{#Explicit}}{{Direction}}{{/Explicit}} {{#Children}}{{>Comments}}{{/Children}}
32+
</div>
33+
{{/ParamComments}}
34+
{{/HasParamComments}}
35+
{{#HasReturnComments}}
36+
<h3>Returns</h3>
37+
{{#ReturnComments}}
38+
{{#.}}
39+
<p>{{TextComment}}</p>
40+
{{/.}}
41+
{{/ReturnComments}}
42+
{{/HasReturnComments}}
43+
{{#HasCodeComments}}
44+
<h3>Code</h3>
45+
{{#CodeComments}}
46+
<div>
47+
<pre class="code-block">
48+
<code>
49+
{{#.}}
50+
{{.}}
51+
{{/.}}
52+
</code>
53+
</pre>
54+
</div>
55+
{{/CodeComments}}
56+
{{/HasCodeComments}}
2757
{{#BlockCommandComment}}
2858
<div class="block-command-comment__command">
2959
<div class="block-command-command">

clang-tools-extra/clang-doc/assets/function-template.mustache

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,10 @@
1414
</code>
1515
</pre>
1616
{{! Function Comments }}
17-
{{#FunctionComments}}
17+
{{#Description}}
1818
<div>
1919
{{>Comments}}
2020
</div>
21-
{{/FunctionComments}}
21+
{{/Description}}
2222
</div>
2323
</div>

clang-tools-extra/test/clang-doc/Inputs/basic-project/include/Circle.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,10 @@ class Circle : public Shape {
2626
/**
2727
* @brief Calculates the perimeter of the circle.
2828
*
29+
* @code
30+
* Circle circle(5.0);
31+
* double perimeter = circle.perimeter();
32+
* @endcode
2933
* @return double The perimeter of the circle.
3034
*/
3135
double perimeter() const override;

0 commit comments

Comments
 (0)