Skip to content

Commit dc2c396

Browse files
authored
merge main into amd-staging (#649)
2 parents fe70b8a + 921a2e9 commit dc2c396

File tree

139 files changed

+2593
-2039
lines changed

Some content is hidden

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

139 files changed

+2593
-2039
lines changed

.ci/premerge_advisor_explain.py

Lines changed: 30 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -79,16 +79,6 @@ def main(
7979
pr_number: The number of the PR associated with this run.
8080
return_code: The numerical return code of ninja/CMake.
8181
"""
82-
if return_code == 0:
83-
with open("comment", "w") as comment_file_handle:
84-
comment = get_comment(
85-
github_token,
86-
pr_number,
87-
":white_check_mark: With the latest revision this PR passed "
88-
"the premerge checks.",
89-
)
90-
if "id" in comment:
91-
json.dump([comment], comment_file_handle)
9282
junit_objects, ninja_logs = generate_test_report_lib.load_info_from_files(
9383
build_log_files
9484
)
@@ -105,34 +95,42 @@ def main(
10595
explanation_request["failures"].append(
10696
{"name": name, "message": failure_messsage}
10797
)
108-
else:
98+
elif return_code != 0:
10999
ninja_failures = generate_test_report_lib.find_failure_in_ninja_logs(ninja_logs)
110100
for name, failure_message in ninja_failures:
111101
explanation_request["failures"].append(
112102
{"name": name, "message": failure_message}
113103
)
114-
advisor_response = requests.get(
115-
PREMERGE_ADVISOR_URL, json=explanation_request, timeout=5
104+
comments = []
105+
advisor_explanations = []
106+
if return_code != 0:
107+
advisor_response = requests.get(
108+
PREMERGE_ADVISOR_URL, json=explanation_request, timeout=5
109+
)
110+
if advisor_response.status_code == 200:
111+
print(advisor_response.json())
112+
advisor_explanations = advisor_response.json()
113+
else:
114+
print(advisor_response.reason)
115+
comments.append(
116+
get_comment(
117+
github_token,
118+
pr_number,
119+
generate_test_report_lib.generate_report(
120+
generate_test_report_lib.compute_platform_title(),
121+
return_code,
122+
junit_objects,
123+
ninja_logs,
124+
failure_explanations_list=advisor_explanations,
125+
),
126+
)
116127
)
117-
if advisor_response.status_code == 200:
118-
print(advisor_response.json())
119-
comments = [
120-
get_comment(
121-
github_token,
122-
pr_number,
123-
generate_test_report_lib.generate_report(
124-
generate_test_report_lib.compute_platform_title(),
125-
return_code,
126-
junit_objects,
127-
ninja_logs,
128-
failure_explanations_list=advisor_response.json(),
129-
),
130-
)
131-
]
132-
with open("comments", "w") as comment_file_handle:
133-
json.dump(comments, comment_file_handle)
134-
else:
135-
print(advisor_response.reason)
128+
if return_code == 0 and "id" not in comments[0]:
129+
# If the job succeeds and there is not an existing comment, we
130+
# should not write one to reduce noise.
131+
comments = []
132+
with open("comments", "w") as comment_file_handle:
133+
json.dump(comments, comment_file_handle)
136134

137135

138136
if __name__ == "__main__":

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

Lines changed: 50 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -50,61 +50,71 @@
5050
<li class="sidebar-section">
5151
<a class="sidebar-item" href="#PublicMembers">Public Members</a>
5252
</li>
53-
<ul>
54-
{{#PublicMembers}}
55-
<li class="sidebar-item-container">
56-
<a class="sidebar-item" href="#{{Name}}">{{Name}}</a>
57-
</li>
58-
{{/PublicMembers}}
59-
</ul>
53+
<li>
54+
<ul>
55+
{{#PublicMembers}}
56+
<li class="sidebar-item-container">
57+
<a class="sidebar-item" href="#{{Name}}">{{Name}}</a>
58+
</li>
59+
{{/PublicMembers}}
60+
</ul>
61+
</li>
6062
{{/HasPublicMembers}}
6163
{{#ProtectedMembers}}
62-
<li class="sidebar-section">
63-
<a class="sidebar-item" href="#PublicMethods">Protected Members</a>
64-
</li>
64+
<li class="sidebar-section">
65+
<a class="sidebar-item" href="#PublicMethods">Protected Members</a>
66+
</li>
67+
<li>
6568
<ul>
6669
{{#Obj}}
6770
<li class="sidebar-item-container">
6871
<a class="sidebar-item" href="#{{Name}}">{{Name}}</a>
6972
</li>
7073
{{/Obj}}
7174
</ul>
75+
</li>
7276
{{/ProtectedMembers}}
7377
{{#HasPublicFunctions}}
7478
<li class="sidebar-section">
7579
<a class="sidebar-item" href="#PublicMethods">Public Method</a>
7680
</li>
77-
<ul>
78-
{{#PublicFunctions}}
79-
<li class="sidebar-item-container">
80-
<a class="sidebar-item" href="#{{USR}}">{{Name}}</a>
81-
</li>
82-
{{/PublicFunctions}}
83-
</ul>
81+
<li>
82+
<ul>
83+
{{#PublicFunctions}}
84+
<li class="sidebar-item-container">
85+
<a class="sidebar-item" href="#{{USR}}">{{Name}}</a>
86+
</li>
87+
{{/PublicFunctions}}
88+
</ul>
89+
</li>
8490
{{/HasPublicFunctions}}
8591
{{#ProtectedFunction}}
8692
<li class="sidebar-section">
8793
<a class="sidebar-item" href="#ProtectedFunction">Protected Method</a>
8894
</li>
89-
<ul>
90-
{{#Obj}}
91-
<li class="sidebar-item-container">
92-
<a class="sidebar-item" href="#{{ID}}">{{Name}}</a>
93-
</li>
94-
{{/Obj}}
95-
</ul>
95+
<li>
96+
<ul>
97+
{{#Obj}}
98+
<li class="sidebar-item-container">
99+
<a class="sidebar-item" href="#{{ID}}">{{Name}}</a>
100+
</li>
101+
{{/Obj}}
102+
</ul>
103+
</li>
96104
{{/ProtectedFunction}}
97105
{{#Enums}}
98106
<li class="sidebar-section">
99107
<a class="sidebar-item" href="#Enums">Enums</a>
100108
</li>
101-
<ul>
102-
{{#Obj}}
103-
<li class="sidebar-item-container">
104-
<a class="sidebar-item" href="#{{USR}}">{{EnumName}}</a>
105-
</li>
106-
{{/Obj}}
107-
</ul>
109+
<li>
110+
<ul>
111+
{{#Obj}}
112+
<li class="sidebar-item-container">
113+
<a class="sidebar-item" href="#{{USR}}">{{EnumName}}</a>
114+
</li>
115+
{{/Obj}}
116+
</ul>
117+
</li>
108118
{{/Enums}}
109119
{{#Typedef}}
110120
<li class="sidebar-section">Typedef</li>
@@ -113,13 +123,15 @@
113123
<li class="sidebar-section">
114124
<a class="sidebar-item" href="#Classes">Inner Classes</a>
115125
</li>
116-
<ul>
117-
{{#Links}}
118-
<li class="sidebar-item-container">
119-
<a class="sidebar-item" href="#{{ID}}">{{Name}}</a>
120-
</li>
121-
{{/Links}}
122-
</ul>
126+
<li>
127+
<ul>
128+
{{#Links}}
129+
<li class="sidebar-item-container">
130+
<a class="sidebar-item" href="#{{ID}}">{{Name}}</a>
131+
</li>
132+
{{/Links}}
133+
</ul>
134+
</li>
123135
{{/Record}}
124136
</ul>
125137
</div>

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

Lines changed: 18 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -50,25 +50,29 @@
5050
<li class="sidebar-section">
5151
<a class="sidebar-item" href="#Enums">Enums</a>
5252
</li>
53-
<ul>
54-
{{#Enums}}
55-
<li class="sidebar-item-container">
56-
<a class="sidebar-item" href="#{{USR}}">{{Name}}</a>
57-
</li>
58-
{{/Enums}}
59-
</ul>
53+
<li>
54+
<ul>
55+
{{#Enums}}
56+
<li class="sidebar-item-container">
57+
<a class="sidebar-item" href="#{{USR}}">{{Name}}</a>
58+
</li>
59+
{{/Enums}}
60+
</ul>
61+
</li>
6062
{{/HasEnums}}
6163
{{#HasRecords}}
6264
<li class="sidebar-section">
6365
<a class="sidebar-item" href="#Classes">Inner Classes</a>
6466
</li>
65-
<ul>
66-
{{#Records}}
67-
<li class="sidebar-item-container">
68-
<a class="sidebar-item" href="#{{USR}}">{{Name}}</a>
69-
</li>
70-
{{/Records}}
71-
</ul>
67+
<li>
68+
<ul>
69+
{{#Records}}
70+
<li class="sidebar-item-container">
71+
<a class="sidebar-item" href="#{{USR}}">{{Name}}</a>
72+
</li>
73+
{{/Records}}
74+
</ul>
75+
</li>
7276
{{/HasRecrods}}
7377
</ul>
7478
</div>

clang-tools-extra/clang-tidy/.clang-tidy

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ Checks: >
99
-bugprone-narrowing-conversions,
1010
-bugprone-unchecked-optional-access,
1111
-bugprone-unused-return-value,
12+
misc-const-correctness,
1213
modernize-*,
1314
-modernize-avoid-c-arrays,
1415
-modernize-pass-by-value,

clang-tools-extra/clang-tidy/objc/AssertEqualsCheck.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ void AssertEqualsCheck::registerMatchers(MatchFinder *Finder) {
2525
for (const auto &[CurrName, _] : NameMap) {
2626
Finder->addMatcher(
2727
binaryOperator(anyOf(hasOperatorName("!="), hasOperatorName("==")),
28-
isExpandedFromMacro(std::string(CurrName)),
28+
isExpandedFromMacro(CurrName),
2929
anyOf(hasLHS(hasType(qualType(
3030
hasCanonicalType(asString("NSString *"))))),
3131
hasRHS(hasType(qualType(

clang-tools-extra/clang-tidy/utils/ExceptionAnalyzer.cpp

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -600,13 +600,14 @@ ExceptionAnalyzer::throwsException(const Stmt *St,
600600
// whether the call itself throws.
601601
if (const auto *Call = dyn_cast<CallExpr>(St)) {
602602
if (const FunctionDecl *Func = Call->getDirectCallee()) {
603-
ExceptionInfo Excs =
603+
const ExceptionInfo Excs =
604604
throwsException(Func, Caught, CallStack, Call->getBeginLoc());
605605
Results.merge(Excs);
606606
}
607607
} else if (const auto *Construct = dyn_cast<CXXConstructExpr>(St)) {
608-
ExceptionInfo Excs = throwsException(Construct->getConstructor(), Caught,
609-
CallStack, Construct->getBeginLoc());
608+
const ExceptionInfo Excs =
609+
throwsException(Construct->getConstructor(), Caught, CallStack,
610+
Construct->getBeginLoc());
610611
Results.merge(Excs);
611612
}
612613
}

clang-tools-extra/include-cleaner/test/lit.cfg.py

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,25 @@
1+
import os
2+
13
import lit.llvm
24

35
lit.llvm.initialize(lit_config, config)
46
lit.llvm.llvm_config.use_default_substitutions()
57

8+
# TODO: Consolidate the logic for turning on the internal shell by default for all LLVM test suites.
9+
# See https://github.com/llvm/llvm-project/issues/106636 for more details.
10+
#
11+
# We prefer the lit internal shell which provides a better user experience on failures
12+
# and is faster unless the user explicitly disables it with LIT_USE_INTERNAL_SHELL=0
13+
# env var.
14+
use_lit_shell = True
15+
lit_shell_env = os.environ.get("LIT_USE_INTERNAL_SHELL")
16+
if lit_shell_env:
17+
use_lit_shell = lit.util.pythonize_bool(lit_shell_env)
18+
619
config.name = "ClangIncludeCleaner"
720
config.suffixes = [".test", ".c", ".cpp"]
821
config.excludes = ["Inputs"]
9-
config.test_format = lit.formats.ShTest(not lit.llvm.llvm_config.use_lit_shell)
22+
config.test_format = lit.formats.ShTest(not use_lit_shell)
1023
config.test_source_root = config.clang_include_cleaner_source_dir + "/test"
1124
config.test_exec_root = config.clang_include_cleaner_binary_dir + "/test"
1225

clang-tools-extra/test/clang-doc/mustache-index.cpp

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -13,19 +13,21 @@ class Foo;
1313
// CHECK: <li class="sidebar-section">
1414
// CHECK-NEXT: <a class="sidebar-item" href="#Enums">Enums</a>
1515
// CHECK-NEXT: </li>
16-
// CHECK-NEXT: <ul>
17-
// CHECK-NEXT: <li class="sidebar-item-container">
18-
// CHECK-NEXT: <a class="sidebar-item" href="#{{[0-9A-F]*}}">Color</a>
19-
// CHECK-NEXT: </li>
20-
// CHECK-NEXT: </ul>
16+
// CHECK-NEXT: <li>
17+
// CHECK-NEXT: <ul>
18+
// CHECK-NEXT: <li class="sidebar-item-container">
19+
// CHECK-NEXT: <a class="sidebar-item" href="#{{[0-9A-F]*}}">Color</a>
20+
// CHECK-NEXT: </li>
21+
// CHECK-NEXT: </ul>
2122
// CHECK: <li class="sidebar-section">
2223
// CHECK-NEXT: <a class="sidebar-item" href="#Classes">Inner Classes</a>
2324
// CHECK-NEXT: </li>
24-
// CHECK-NEXT: <ul>
25-
// CHECK-NEXT: <li class="sidebar-item-container">
26-
// CHECK-NEXT: <a class="sidebar-item" href="#{{[0-9A-F]*}}">Foo</a>
27-
// CHECK-NEXT: </li>
28-
// CHECK-NEXT: </ul>
25+
// CHECK-NEXT: <li>
26+
// CHECK-NEXT: <ul>
27+
// CHECK-NEXT: <li class="sidebar-item-container">
28+
// CHECK-NEXT: <a class="sidebar-item" href="#{{[0-9A-F]*}}">Foo</a>
29+
// CHECK-NEXT: </li>
30+
// CHECK-NEXT: </ul>
2931

3032
// CHECK: <section id="Enums" class="section-container">
3133
// CHECK-NEXT: <h2>Enumerations</h2>

clang/docs/LibASTMatchersReference.html

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4222,7 +4222,7 @@ <h2 id="narrowing-matchers">Narrowing Matchers</h2>
42224222
</pre></td></tr>
42234223

42244224

4225-
<tr><td>Matcher&lt;<a href="https://clang.llvm.org/doxygen/classclang_1_1Decl.html">Decl</a>&gt;</td><td class="name" onclick="toggle('isExpandedFromMacro0')"><a name="isExpandedFromMacro0Anchor">isExpandedFromMacro</a></td><td>std::string MacroName</td></tr>
4225+
<tr><td>Matcher&lt;<a href="https://clang.llvm.org/doxygen/classclang_1_1Decl.html">Decl</a>&gt;</td><td class="name" onclick="toggle('isExpandedFromMacro0')"><a name="isExpandedFromMacro0Anchor">isExpandedFromMacro</a></td><td>StringRef MacroName</td></tr>
42264226
<tr><td colspan="4" class="doc" id="isExpandedFromMacro0"><pre>Matches statements that are (transitively) expanded from the named macro.
42274227
Does not match if only part of the statement is expanded from that macro or
42284228
if different parts of the statement are expanded from different
@@ -5643,7 +5643,7 @@ <h2 id="narrowing-matchers">Narrowing Matchers</h2>
56435643
</pre></td></tr>
56445644

56455645

5646-
<tr><td>Matcher&lt;<a href="https://clang.llvm.org/doxygen/classclang_1_1Stmt.html">Stmt</a>&gt;</td><td class="name" onclick="toggle('isExpandedFromMacro1')"><a name="isExpandedFromMacro1Anchor">isExpandedFromMacro</a></td><td>std::string MacroName</td></tr>
5646+
<tr><td>Matcher&lt;<a href="https://clang.llvm.org/doxygen/classclang_1_1Stmt.html">Stmt</a>&gt;</td><td class="name" onclick="toggle('isExpandedFromMacro1')"><a name="isExpandedFromMacro1Anchor">isExpandedFromMacro</a></td><td>StringRef MacroName</td></tr>
56475647
<tr><td colspan="4" class="doc" id="isExpandedFromMacro1"><pre>Matches statements that are (transitively) expanded from the named macro.
56485648
Does not match if only part of the statement is expanded from that macro or
56495649
if different parts of the statement are expanded from different
@@ -5843,7 +5843,7 @@ <h2 id="narrowing-matchers">Narrowing Matchers</h2>
58435843
</pre></td></tr>
58445844

58455845

5846-
<tr><td>Matcher&lt;<a href="https://clang.llvm.org/doxygen/classclang_1_1TypeLoc.html">TypeLoc</a>&gt;</td><td class="name" onclick="toggle('isExpandedFromMacro2')"><a name="isExpandedFromMacro2Anchor">isExpandedFromMacro</a></td><td>std::string MacroName</td></tr>
5846+
<tr><td>Matcher&lt;<a href="https://clang.llvm.org/doxygen/classclang_1_1TypeLoc.html">TypeLoc</a>&gt;</td><td class="name" onclick="toggle('isExpandedFromMacro2')"><a name="isExpandedFromMacro2Anchor">isExpandedFromMacro</a></td><td>StringRef MacroName</td></tr>
58475847
<tr><td colspan="4" class="doc" id="isExpandedFromMacro2"><pre>Matches statements that are (transitively) expanded from the named macro.
58485848
Does not match if only part of the statement is expanded from that macro or
58495849
if different parts of the statement are expanded from different

clang/docs/ReleaseNotes.rst

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -84,12 +84,6 @@ Potentially Breaking Changes
8484
- Downstream projects that previously linked only against ``clangDriver`` may
8585
now (also) need to link against the new ``clangOptions`` library, since
8686
options-related code has been moved out of the Driver into a separate library.
87-
- Clang now supports MSVC vector deleting destructors when targeting Windows.
88-
This means that vtables of classes with virtual destructors will contain a
89-
pointer to vector deleting destructor (instead of scalar deleting destructor)
90-
which in fact is a different symbol with different name and linkage. This
91-
may cause runtime failures if two binaries using the same class defining a
92-
virtual destructor are compiled with different versions of clang.
9387

9488
C/C++ Language Potentially Breaking Changes
9589
-------------------------------------------
@@ -870,8 +864,6 @@ Windows Support
870864
- clang-cl now supports /arch:AVX10.1 and /arch:AVX10.2.
871865
- clang-cl now supports /vlen, /vlen=256 and /vlen=512.
872866

873-
- Clang now supports MSVC vector deleting destructors (GH19772).
874-
875867
LoongArch Support
876868
^^^^^^^^^^^^^^^^^
877869
- Enable linker relaxation by default for loongarch64.

0 commit comments

Comments
 (0)