Skip to content

Commit 7519940

Browse files
authored
Merge branch 'main' into main
2 parents ca9d8c0 + 9cac4bf commit 7519940

File tree

427 files changed

+16194
-9605
lines changed

Some content is hidden

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

427 files changed

+16194
-9605
lines changed

.ci/generate_test_report_lib.py

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -122,6 +122,17 @@ def plural(num_tests):
122122
]
123123
)
124124

125+
if failures or return_code != 0:
126+
report.extend(
127+
[
128+
"",
129+
"If these failures are unrelated to your changes (for example "
130+
"tests are broken or flaky at HEAD), please open an issue at "
131+
"https://github.com/llvm/llvm-project/issues and add the "
132+
"`infrastructure` label.",
133+
]
134+
)
135+
125136
report = "\n".join(report)
126137
if len(report.encode("utf-8")) > size_limit:
127138
return generate_report(

.ci/generate_test_report_lib_test.py

Lines changed: 24 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,9 @@ def test_no_failures_build_failed(self):
109109
110110
All tests passed but another part of the build **failed**.
111111
112-
[Download](https://buildkite.com/organizations/organization_slug/pipelines/pipeline_slug/builds/build_number/jobs/job_id/download.txt) the build's log file to see the details."""
112+
[Download](https://buildkite.com/organizations/organization_slug/pipelines/pipeline_slug/builds/build_number/jobs/job_id/download.txt) the build's log file to see the details.
113+
114+
If these failures are unrelated to your changes (for example tests are broken or flaky at HEAD), please open an issue at https://github.com/llvm/llvm-project/issues and add the `infrastructure` label."""
113115
),
114116
"error",
115117
),
@@ -169,7 +171,9 @@ def test_report_single_file_single_testsuite(self):
169171
```
170172
Other output goes here
171173
```
172-
</details>"""
174+
</details>
175+
176+
If these failures are unrelated to your changes (for example tests are broken or flaky at HEAD), please open an issue at https://github.com/llvm/llvm-project/issues and add the `infrastructure` label."""
173177
),
174178
"error",
175179
),
@@ -203,7 +207,9 @@ def test_report_single_file_single_testsuite(self):
203207
```
204208
DEF/test_2 output goes here
205209
```
206-
</details>"""
210+
</details>
211+
212+
If these failures are unrelated to your changes (for example tests are broken or flaky at HEAD), please open an issue at https://github.com/llvm/llvm-project/issues and add the `infrastructure` label."""
207213
),
208214
"error",
209215
)
@@ -311,7 +317,9 @@ def test_report_dont_list_failures(self):
311317
312318
* 1 test failed
313319
314-
Failed tests and their output was too large to report. Download the build's log file to see the details."""
320+
Failed tests and their output was too large to report. Download the build's log file to see the details.
321+
322+
If these failures are unrelated to your changes (for example tests are broken or flaky at HEAD), please open an issue at https://github.com/llvm/llvm-project/issues and add the `infrastructure` label."""
315323
),
316324
"error",
317325
),
@@ -352,13 +360,16 @@ def test_report_dont_list_failures_link_to_log(self):
352360
353361
* 1 test failed
354362
355-
Failed tests and their output was too large to report. [Download](https://buildkite.com/organizations/organization_slug/pipelines/pipeline_slug/builds/build_number/jobs/job_id/download.txt) the build's log file to see the details."""
363+
Failed tests and their output was too large to report. [Download](https://buildkite.com/organizations/organization_slug/pipelines/pipeline_slug/builds/build_number/jobs/job_id/download.txt) the build's log file to see the details.
364+
365+
If these failures are unrelated to your changes (for example tests are broken or flaky at HEAD), please open an issue at https://github.com/llvm/llvm-project/issues and add the `infrastructure` label."""
356366
),
357367
"error",
358368
),
359369
)
360370

361371
def test_report_size_limit(self):
372+
test_output = "f" * 1000
362373
self.assertEqual(
363374
generate_test_report_lib.generate_report(
364375
"Foo",
@@ -371,14 +382,16 @@ def test_report_size_limit(self):
371382
<testsuites time="0.02">
372383
<testsuite name="Bar" tests="1" failures="1" skipped="0" time="0.02">
373384
<testcase classname="Bar/test_1" name="test_1" time="0.02">
374-
<failure><![CDATA[Some long output goes here...]]></failure>
385+
<failure><![CDATA[{output}]]></failure>
375386
</testcase>
376387
</testsuite>
377-
</testsuites>"""
388+
</testsuites>""".format(
389+
output=test_output
390+
)
378391
)
379392
)
380393
],
381-
size_limit=128,
394+
size_limit=512,
382395
),
383396
(
384397
dedent(
@@ -387,7 +400,9 @@ def test_report_size_limit(self):
387400
388401
* 1 test failed
389402
390-
Failed tests and their output was too large to report. Download the build's log file to see the details."""
403+
Failed tests and their output was too large to report. Download the build's log file to see the details.
404+
405+
If these failures are unrelated to your changes (for example tests are broken or flaky at HEAD), please open an issue at https://github.com/llvm/llvm-project/issues and add the `infrastructure` label."""
391406
),
392407
"error",
393408
),

bolt/CMakeLists.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,10 @@ if(BOLT_BUILT_STANDALONE)
4646
set(LLVM_RUNTIME_OUTPUT_INTDIR ${CMAKE_BINARY_DIR}/${CMAKE_CFG_INTDIR}/bin)
4747
set(LLVM_LIBRARY_OUTPUT_INTDIR ${CMAKE_BINARY_DIR}/${CMAKE_CFG_INTDIR}/lib${LLVM_LIBDIR_SUFFIX})
4848

49+
separate_arguments(LLVM_DEFINITIONS_LIST NATIVE_COMMAND ${LLVM_DEFINITIONS})
50+
add_definitions(${LLVM_DEFINITIONS_LIST})
51+
list(APPEND CMAKE_REQUIRED_DEFINITIONS ${LLVM_DEFINITIONS_LIST})
52+
4953
include(AddLLVM)
5054
include(TableGen)
5155
include_directories(${LLVM_INCLUDE_DIRS})

bolt/lib/Core/BinaryContext.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -201,7 +201,7 @@ Expected<std::unique_ptr<BinaryContext>> BinaryContext::createBinaryContext(
201201

202202
std::string Error;
203203
const Target *TheTarget =
204-
TargetRegistry::lookupTarget(std::string(ArchName), TheTriple, Error);
204+
TargetRegistry::lookupTarget(ArchName, TheTriple, Error);
205205
if (!TheTarget)
206206
return createStringError(make_error_code(std::errc::not_supported),
207207
Twine("BOLT-ERROR: ", Error));

bolt/lib/Core/BinaryFunction.cpp

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -166,12 +166,7 @@ bool shouldPrint(const BinaryFunction &Function) {
166166
}
167167

168168
std::optional<StringRef> Origin = Function.getOriginSectionName();
169-
if (Origin && llvm::any_of(opts::PrintOnly, [&](const std::string &Name) {
170-
return Name == *Origin;
171-
}))
172-
return true;
173-
174-
return false;
169+
return Origin && llvm::is_contained(opts::PrintOnly, *Origin);
175170
}
176171

177172
} // namespace opts

clang/CMakeLists.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,10 @@ if(CLANG_BUILT_STANDALONE)
6868
option(CLANG_ENABLE_BOOTSTRAP "Generate the clang bootstrap target" OFF)
6969
option(LLVM_ENABLE_LIBXML2 "Use libxml2 if available." ON)
7070

71+
separate_arguments(LLVM_DEFINITIONS_LIST NATIVE_COMMAND ${LLVM_DEFINITIONS})
72+
add_definitions(${LLVM_DEFINITIONS_LIST})
73+
list(APPEND CMAKE_REQUIRED_DEFINITIONS ${LLVM_DEFINITIONS_LIST})
74+
7175
include(AddLLVM)
7276
include(TableGen)
7377
include(HandleLLVMOptions)

clang/docs/ReleaseNotes.rst

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -273,6 +273,8 @@ C23 Feature Support
273273
be completed).
274274
- Fixed a failed assertion with an invalid parameter to the ``#embed``
275275
directive. Fixes #GH126940.
276+
- Fixed a crash when a declaration of a ``constexpr`` variable with an invalid
277+
type. Fixes #GH140887
276278

277279
C11 Feature Support
278280
^^^^^^^^^^^^^^^^^^^
@@ -743,7 +745,7 @@ Bug Fixes to C++ Support
743745
in a ``constexpr`` function. (#GH131432)
744746
- Fixed an incorrect TreeTransform for calls to ``consteval`` functions if a conversion template is present. (#GH137885)
745747
- Clang now emits a warning when class template argument deduction for alias templates is used in C++17. (#GH133806)
746-
- Fix missed initializer instantiation bug for variable templates. (#GH138122)
748+
- Fixed a missed initializer instantiation bug for variable templates. (#GH134526), (#GH138122)
747749
- Fix a crash when checking the template template parameters of a dependent lambda appearing in an alias declaration.
748750
(#GH136432), (#GH137014), (#GH138018)
749751
- Fixed an assertion when trying to constant-fold various builtins when the argument
@@ -762,6 +764,7 @@ Bug Fixes to C++ Support
762764
reference in its own initializer in C++23 mode (#GH131330).
763765
- Clang could incorrectly instantiate functions in discarded contexts (#GH140449)
764766
- Fix instantiation of default-initialized variable template specialization. (#GH140632) (#GH140622)
767+
- Clang modules now allow a module and its user to differ on TrivialAutoVarInit*
765768

766769
Bug Fixes to AST Handling
767770
^^^^^^^^^^^^^^^^^^^^^^^^^

clang/include/clang/Basic/Builtins.td

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4909,10 +4909,16 @@ def HLSLClamp : LangBuiltin<"HLSL_LANG"> {
49094909
let Prototype = "void(...)";
49104910
}
49114911

4912-
def HLSLCross: LangBuiltin<"HLSL_LANG"> {
4913-
let Spellings = ["__builtin_hlsl_cross"];
4912+
def HLSLCrossFloat: LangBuiltin<"HLSL_LANG"> {
4913+
let Spellings = ["__builtin_hlsl_crossf32"];
49144914
let Attributes = [NoThrow, Const];
4915-
let Prototype = "void(...)";
4915+
let Prototype = "_ExtVector<3, float>(_ExtVector<3, float>, _ExtVector<3, float>)";
4916+
}
4917+
4918+
def HLSLCrossHalf: LangBuiltin<"HLSL_LANG"> {
4919+
let Spellings = ["__builtin_hlsl_crossf16"];
4920+
let Attributes = [NoThrow, Const];
4921+
let Prototype = "_ExtVector<3, __fp16>(_ExtVector<3, __fp16>, _ExtVector<3, __fp16>)";
49164922
}
49174923

49184924
def HLSLDegrees : LangBuiltin<"HLSL_LANG"> {
@@ -4971,7 +4977,7 @@ def HLSLLerp : LangBuiltin<"HLSL_LANG"> {
49714977

49724978
def HLSLMad : LangBuiltin<"HLSL_LANG"> {
49734979
let Spellings = ["__builtin_hlsl_mad"];
4974-
let Attributes = [NoThrow, Const];
4980+
let Attributes = [NoThrow, Const, CustomTypeChecking];
49754981
let Prototype = "void(...)";
49764982
}
49774983

clang/include/clang/Basic/DiagnosticSemaKinds.td

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12711,7 +12711,7 @@ def err_builtin_invalid_arg_type: Error<
1271112711
// An 'or' if non-empty second and third components are combined
1271212712
"%plural{0:|:%plural{0:|:or }2}3"
1271312713
// Third component: floating-point types
12714-
"%select{|floating-point}3"
12714+
"%select{|floating-point|16 or 32 bit floating-point}3"
1271512715
// A space after a non-empty third component
1271612716
"%plural{0:|: }3"
1271712717
"%plural{[0,3]:type|:types}1 (was %4)">;

clang/include/clang/Basic/LangOptions.def

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -398,11 +398,11 @@ BENIGN_LANGOPT(HalfNoSemanticInterposition, 1, 0,
398398
"Like -fno-semantic-interposition but don't use local aliases")
399399
ENUM_LANGOPT(StackProtector, StackProtectorMode, 2, SSPOff,
400400
"stack protector mode")
401-
ENUM_LANGOPT(TrivialAutoVarInit, TrivialAutoVarInitKind, 2, TrivialAutoVarInitKind::Uninitialized,
401+
BENIGN_ENUM_LANGOPT(TrivialAutoVarInit, TrivialAutoVarInitKind, 2, TrivialAutoVarInitKind::Uninitialized,
402402
"trivial automatic variable initialization")
403-
VALUE_LANGOPT(TrivialAutoVarInitStopAfter, 32, 0,
403+
BENIGN_VALUE_LANGOPT(TrivialAutoVarInitStopAfter, 32, 0,
404404
"stop trivial automatic variable initialization after the specified number of instances. Must be greater than 0.")
405-
VALUE_LANGOPT(TrivialAutoVarInitMaxSize, 32, 0,
405+
BENIGN_VALUE_LANGOPT(TrivialAutoVarInitMaxSize, 32, 0,
406406
"stop trivial automatic variable initialization if var size exceeds the specified size (in bytes). Must be greater than 0.")
407407
ENUM_LANGOPT(SignedOverflowBehavior, SignedOverflowBehaviorTy, 2, SOB_Undefined,
408408
"signed integer overflow handling")

0 commit comments

Comments
 (0)