Skip to content

Commit 4c21e42

Browse files
committed
Merge branch 'main' of https://github.com/llvm/llvm-project into fix/162953
2 parents 308eabd + bfee9db commit 4c21e42

File tree

382 files changed

+19037
-5988
lines changed

Some content is hidden

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

382 files changed

+19037
-5988
lines changed

.ci/generate_test_report_lib.py

Lines changed: 25 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,23 @@ def _format_ninja_failures(ninja_failures: list[tuple[str, str]]) -> list[str]:
9898
)
9999
return output
100100

101+
def get_failures(junit_objects) -> dict[str, list[tuple[str, str]]]:
102+
failures = {}
103+
for results in junit_objects:
104+
for testsuite in results:
105+
for test in testsuite:
106+
if (
107+
not test.is_passed
108+
and test.result
109+
and isinstance(test.result[0], Failure)
110+
):
111+
if failures.get(testsuite.name) is None:
112+
failures[testsuite.name] = []
113+
failures[testsuite.name].append(
114+
(test.classname + "/" + test.name, test.result[0].text)
115+
)
116+
return failures
117+
101118

102119
# Set size_limit to limit the byte size of the report. The default is 1MB as this
103120
# is the most that can be put into an annotation. If the generated report exceeds
@@ -113,7 +130,7 @@ def generate_report(
113130
size_limit=1024 * 1024,
114131
list_failures=True,
115132
):
116-
failures = {}
133+
failures = get_failures(junit_objects)
117134
tests_run = 0
118135
tests_skipped = 0
119136
tests_failed = 0
@@ -124,18 +141,6 @@ def generate_report(
124141
tests_skipped += testsuite.skipped
125142
tests_failed += testsuite.failures
126143

127-
for test in testsuite:
128-
if (
129-
not test.is_passed
130-
and test.result
131-
and isinstance(test.result[0], Failure)
132-
):
133-
if failures.get(testsuite.name) is None:
134-
failures[testsuite.name] = []
135-
failures[testsuite.name].append(
136-
(test.classname + "/" + test.name, test.result[0].text)
137-
)
138-
139144
report = [f"# {title}", ""]
140145

141146
if tests_run == 0:
@@ -258,7 +263,7 @@ def plural(num_tests):
258263
return report
259264

260265

261-
def generate_report_from_files(title, return_code, build_log_files):
266+
def load_info_from_files(build_log_files):
262267
junit_files = [
263268
junit_file for junit_file in build_log_files if junit_file.endswith(".xml")
264269
]
@@ -271,6 +276,9 @@ def generate_report_from_files(title, return_code, build_log_files):
271276
ninja_logs.append(
272277
[log_line.strip() for log_line in ninja_log_file_handle.readlines()]
273278
)
274-
return generate_report(
275-
title, return_code, [JUnitXml.fromfile(p) for p in junit_files], ninja_logs
276-
)
279+
return [JUnitXml.fromfile(p) for p in junit_files], ninja_logs
280+
281+
282+
def generate_report_from_files(title, return_code, build_log_files):
283+
junit_objects, ninja_logs = load_info_from_files(build_log_files)
284+
return generate_report(title, return_code, junit_objects, ninja_logs)

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ RUN powershell -Command \
9090
RUN git config --system core.longpaths true & \
9191
git config --global core.autocrlf false
9292
93-
ARG RUNNER_VERSION=2.328.0
93+
ARG RUNNER_VERSION=2.329.0
9494
ENV RUNNER_VERSION=$RUNNER_VERSION
9595
9696
RUN powershell -Command \

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ WORKDIR /home/gha
9999

100100
FROM ci-container AS ci-container-agent
101101

102-
ENV GITHUB_RUNNER_VERSION=2.328.0
102+
ENV GITHUB_RUNNER_VERSION=2.329.0
103103

104104
RUN mkdir actions-runner && \
105105
cd actions-runner && \

bolt/include/bolt/Passes/PLTCall.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ class PLTCall : public BinaryFunctionPass {
2626
explicit PLTCall(const cl::opt<bool> &PrintPass)
2727
: BinaryFunctionPass(PrintPass) {}
2828

29-
const char *getName() const override { return "PLT call optimization"; }
29+
const char *getName() const override { return "plt-call-optimization"; }
3030
bool shouldPrint(const BinaryFunction &BF) const override {
3131
return BinaryFunctionPass::shouldPrint(BF);
3232
}

bolt/include/bolt/Passes/TailDuplication.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ class TailDuplication : public BinaryFunctionPass {
143143

144144
explicit TailDuplication() : BinaryFunctionPass(false) {}
145145

146-
const char *getName() const override { return "tail duplication"; }
146+
const char *getName() const override { return "tail-duplication"; }
147147

148148
Error runOnFunctions(BinaryContext &BC) override;
149149
};

clang-tools-extra/clangd/FindTarget.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1040,8 +1040,8 @@ class ExplicitReferenceCollector
10401040
if (auto *S = N.get<Stmt>())
10411041
return refInStmt(S, Resolver);
10421042
if (auto *NNSL = N.get<NestedNameSpecifierLoc>()) {
1043-
if (auto TL = NNSL->getAsTypeLoc())
1044-
return refInTypeLoc(NNSL->getAsTypeLoc(), Resolver);
1043+
if (TypeLoc TL = NNSL->getAsTypeLoc())
1044+
return refInTypeLoc(TL, Resolver);
10451045
// (!) 'DeclRelation::Alias' ensures we do not lose namespace aliases.
10461046
NestedNameSpecifierLoc Qualifier = NNSL->getAsNamespaceAndPrefix().Prefix;
10471047
SourceLocation NameLoc = NNSL->getLocalBeginLoc();

clang/docs/PointerAuthentication.rst

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -592,6 +592,36 @@ The result value is never zero and always within range for both the
592592

593593
This can be used in constant expressions.
594594

595+
``ptrauth_type_discriminator``
596+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
597+
598+
.. code-block:: c
599+
600+
ptrauth_type_discriminator(type)
601+
602+
Compute the constant discriminator derived from the given type, as is computed
603+
for automatically type diversified schemas.
604+
605+
``type`` must be a type. The result has the type ``ptrauth_extra_data_t``.
606+
607+
This can be used in constant expressions.
608+
609+
``ptrauth_function_pointer_type_discriminator``
610+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
611+
612+
.. code-block:: c
613+
614+
ptrauth_function_pointer_type_discriminator(function_type)
615+
616+
Compute the constant discriminator derived from the provided function type, for
617+
use in contexts where the default function authentication schema. If function
618+
pointer type diversity is enabled, this is equivalent to
619+
`ptrauth_type_discriminator(function_type)`, if it is not enabled this is `0`.
620+
621+
``function_type`` must be a function type. The result has the type ``ptrauth_extra_data_t``.
622+
623+
This can be used in constant expressions.
624+
595625
``ptrauth_strip``
596626
^^^^^^^^^^^^^^^^^
597627

clang/docs/ReleaseNotes.rst

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -191,6 +191,8 @@ C23 Feature Support
191191
- Added ``FLT_SNAN``, ``DBL_SNAN``, and ``LDBL_SNAN`` to Clang's ``<float.h>``
192192
header in C23 and later modes. This implements
193193
`WG14 N2710 <https://www.open-std.org/jtc1/sc22/wg14/www/docs/n2710.htm>`_.
194+
- Fixed accepting as compatible unnamed tag types with the same fields within
195+
the same translation unit but from different types.
194196

195197
Non-comprehensive list of changes in this release
196198
-------------------------------------------------
@@ -274,7 +276,7 @@ New Compiler Flags
274276
- New option ``-fno-sanitize-debug-trap-reasons`` added to disable emitting trap reasons into the debug info when compiling with trapping UBSan (e.g. ``-fsanitize-trap=undefined``).
275277
- New option ``-fsanitize-debug-trap-reasons=`` added to control emitting trap reasons into the debug info when compiling with trapping UBSan (e.g. ``-fsanitize-trap=undefined``).
276278
- New options for enabling allocation token instrumentation: ``-fsanitize=alloc-token``, ``-falloc-token-max=``, ``-fsanitize-alloc-token-fast-abi``, ``-fsanitize-alloc-token-extended``.
277-
279+
- The ``-resource-dir`` option is now displayed in the list of options shown by ``--help``.
278280

279281
Lanai Support
280282
^^^^^^^^^^^^^^
@@ -436,6 +438,7 @@ Bug Fixes to C++ Support
436438
- Suppress ``-Wdeprecated-declarations`` in implicitly generated functions. (#GH147293)
437439
- Fix a crash when deleting a pointer to an incomplete array (#GH150359).
438440
- Fixed a mismatched lambda scope bug when propagating up ``consteval`` within nested lambdas. (#GH145776)
441+
- Disallow immediate escalation in destructors. (#GH109096)
439442
- Fix an assertion failure when expression in assumption attribute
440443
(``[[assume(expr)]]``) creates temporary objects.
441444
- Fix the dynamic_cast to final class optimization to correctly handle
@@ -513,6 +516,7 @@ X86 Support
513516
driver.
514517
- Remove `[no-]evex512` feature request from intrinsics and builtins.
515518
- Change features `avx10.x-[256,512]` to `avx10.x`.
519+
- `-march=wildcatlake` is now supported.
516520

517521
Arm and AArch64 Support
518522
^^^^^^^^^^^^^^^^^^^^^^^

clang/docs/UsersManual.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2325,7 +2325,7 @@ are listed below.
23252325
devirtualization and virtual constant propagation, for classes with
23262326
:doc:`hidden LTO visibility <LTOVisibility>`. Requires ``-flto``.
23272327

2328-
.. option:: -f[no]split-lto-unit
2328+
.. option:: -f[no-]split-lto-unit
23292329

23302330
Controls splitting the :doc:`LTO unit <LTOVisibility>` into regular LTO and
23312331
:doc:`ThinLTO` portions, when compiling with -flto=thin. Defaults to false
@@ -2518,7 +2518,7 @@ are listed below.
25182518

25192519
.. _funique_internal_linkage_names:
25202520

2521-
.. option:: -f[no]-unique-internal-linkage-names
2521+
.. option:: -f[no-]unique-internal-linkage-names
25222522

25232523
Controls whether Clang emits a unique (best-effort) symbol name for internal
25242524
linkage symbols. When this option is set, compiler hashes the main source
@@ -2539,7 +2539,7 @@ are listed below.
25392539
$ cd $P/bar && clang -c -funique-internal-linkage-names name_conflict.c
25402540
$ cd $P && clang foo/name_conflict.o && bar/name_conflict.o
25412541
2542-
.. option:: -f[no]-basic-block-address-map:
2542+
.. option:: -f[no-]basic-block-address-map:
25432543
Emits a ``SHT_LLVM_BB_ADDR_MAP`` section which includes address offsets for each
25442544
basic block in the program, relative to the parent function address.
25452545

clang/include/clang/AST/OpenACCClause.h

Lines changed: 10 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -1301,46 +1301,25 @@ struct OpenACCReductionRecipe {
13011301
// AST), or in a separate collection when being semantically analyzed.
13021302
llvm::ArrayRef<CombinerRecipe> CombinerRecipes;
13031303

1304+
bool isSet() const { return AllocaDecl; }
1305+
1306+
private:
1307+
friend class OpenACCReductionClause;
13041308
OpenACCReductionRecipe(VarDecl *A, llvm::ArrayRef<CombinerRecipe> Combiners)
13051309
: AllocaDecl(A), CombinerRecipes(Combiners) {}
1306-
1307-
bool isSet() const { return AllocaDecl; }
13081310
};
13091311

13101312
// A version of the above that is used for semantic analysis, at a time before
13111313
// the OpenACCReductionClause node has been created. This one has storage for
13121314
// the CombinerRecipe, since Trailing storage for it doesn't exist yet.
1313-
struct OpenACCReductionRecipeWithStorage : OpenACCReductionRecipe {
1314-
private:
1315-
llvm::SmallVector<CombinerRecipe, 1> CombinerRecipeStorage;
1316-
1317-
public:
1318-
OpenACCReductionRecipeWithStorage(VarDecl *A,
1319-
llvm::ArrayRef<CombinerRecipe> Combiners)
1320-
: OpenACCReductionRecipe(A, {}), CombinerRecipeStorage(Combiners) {
1321-
CombinerRecipes = CombinerRecipeStorage;
1322-
}
1315+
struct OpenACCReductionRecipeWithStorage {
1316+
VarDecl *AllocaDecl;
1317+
llvm::SmallVector<OpenACCReductionRecipe::CombinerRecipe, 1> CombinerRecipes;
13231318

13241319
OpenACCReductionRecipeWithStorage(
1325-
const OpenACCReductionRecipeWithStorage &Other)
1326-
: OpenACCReductionRecipe(Other),
1327-
CombinerRecipeStorage(Other.CombinerRecipeStorage) {
1328-
CombinerRecipes = CombinerRecipeStorage;
1329-
}
1330-
1331-
OpenACCReductionRecipeWithStorage(OpenACCReductionRecipeWithStorage &&Other)
1332-
: OpenACCReductionRecipe(std::move(Other)),
1333-
CombinerRecipeStorage(std::move(Other.CombinerRecipeStorage)) {
1334-
CombinerRecipes = CombinerRecipeStorage;
1335-
}
1336-
1337-
// There is no real problem implementing these, we just have to make sure the
1338-
// array-ref this inherits from stays in sync. But as we don't need it at the
1339-
// moment, make sure we don't accidentially call these.
1340-
OpenACCReductionRecipeWithStorage &
1341-
operator=(OpenACCReductionRecipeWithStorage &&) = delete;
1342-
OpenACCReductionRecipeWithStorage &
1343-
operator=(const OpenACCReductionRecipeWithStorage &) = delete;
1320+
VarDecl *A,
1321+
llvm::ArrayRef<OpenACCReductionRecipe::CombinerRecipe> Combiners)
1322+
: AllocaDecl(A), CombinerRecipes(Combiners) {}
13441323

13451324
static OpenACCReductionRecipeWithStorage Empty() {
13461325
return OpenACCReductionRecipeWithStorage(/*AllocaDecl=*/nullptr, {});

0 commit comments

Comments
 (0)