Skip to content

Commit ba2c528

Browse files
authored
Merge branch 'llvm:main' into main
2 parents 1e50bec + 313b52f commit ba2c528

File tree

208 files changed

+647
-451
lines changed

Some content is hidden

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

208 files changed

+647
-451
lines changed

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

Lines changed: 20 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,14 @@ jobs:
3232
steps:
3333
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
3434

35+
# The default Docker storage location for GitHub Actions doesn't have
36+
# enough disk space, so change it to /mnt, which has more disk space.
37+
- name: Change Docker storage location
38+
run: |
39+
sudo mkdir /mnt/docker
40+
echo '{ "data-root": "/mnt/docker" }' | sudo tee /etc/docker/daemon.json
41+
sudo systemctl restart docker
42+
3543
- name: Build the Linux builder image
3644
working-directory: libcxx/utils/ci
3745
run: |
@@ -40,11 +48,11 @@ jobs:
4048
env:
4149
TAG: ${{ github.sha }}
4250

43-
# - name: Build the Android builder image
44-
# working-directory: libcxx/utils/ci
45-
# run: docker compose build android-buildkite-builder
46-
# env:
47-
# TAG: ${{ github.sha }}
51+
- name: Build the Android builder image
52+
working-directory: libcxx/utils/ci
53+
run: docker compose build android-buildkite-builder
54+
env:
55+
TAG: ${{ github.sha }}
4856

4957
- name: Log in to GitHub Container Registry
5058
uses: docker/login-action@9780b0c442fbb1117ed29e0efdff1e18412f7567 # v3.3.0
@@ -62,10 +70,10 @@ jobs:
6270
env:
6371
TAG: ${{ github.sha }}
6472

65-
# - name: Push the Android builder image
66-
# if: github.event_name == 'push'
67-
# working-directory: libcxx/utils/ci
68-
# run: |
69-
# docker compose push android-buildkite-builder
70-
# env:
71-
# TAG: ${{ github.sha }}
73+
- name: Push the Android builder image
74+
if: github.event_name == 'push'
75+
working-directory: libcxx/utils/ci
76+
run: |
77+
docker compose push android-buildkite-builder
78+
env:
79+
TAG: ${{ github.sha }}

clang/docs/AddressSanitizer.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -297,7 +297,7 @@ Instrumentation code outlining
297297

298298
By default AddressSanitizer inlines the instrumentation code to improve the
299299
run-time performance, which leads to increased binary size. Using the
300-
(clang flag ``-fsanitize-address-outline-instrumentation` default: ``false``)
300+
(clang flag ``-fsanitize-address-outline-instrumentation`` default: ``false``)
301301
flag forces all code instrumentation to be outlined, which reduces the size
302302
of the generated code, but also reduces the run-time performance.
303303

clang/docs/InternalsManual.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -343,7 +343,7 @@ Class:
343343
Description:
344344
This is a formatter which represents the argument number in a human-readable
345345
format: the value ``123`` stays ``123``, ``12345`` becomes ``12.34k``,
346-
``6666666` becomes ``6.67M``, and so on for 'G' and 'T'.
346+
``6666666`` becomes ``6.67M``, and so on for 'G' and 'T'.
347347

348348
**"objcclass" format**
349349

clang/docs/ReleaseNotes.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -273,7 +273,7 @@ Bug Fixes in This Version
273273
``#pragma pop_macro("")``. (#GH149762).
274274
- Fix a crash in variable length array (e.g. ``int a[*]``) function parameter type
275275
being used in ``_Countof`` expression. (#GH152826).
276-
- `-Wunreachable-code`` now diagnoses tautological or contradictory
276+
- ``-Wunreachable-code`` now diagnoses tautological or contradictory
277277
comparisons such as ``x != 0 || x != 1.0`` and ``x == 0 && x == 1.0`` on
278278
targets that treat ``_Float16``/``__fp16`` as native scalar types. Previously
279279
the warning was silently lost because the operands differed only by an implicit

clang/docs/SanitizerSpecialCaseList.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ precedence. Here are a few examples.
128128
type:T
129129
130130
$ cat ignorelist4.txt
131-
# Function `bad_bar`` will be instrumented.
131+
# Function `bad_bar` will be instrumented.
132132
# Function `good_bar` will not be instrumented.
133133
fun:*
134134
fun:*bar

clang/include/clang/ASTMatchers/ASTMatchers.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8823,7 +8823,7 @@ AST_MATCHER(OMPDefaultClause, isFirstPrivateKind) {
88238823
/// #pragma omp for
88248824
/// \endcode
88258825
///
8826-
/// `ompExecutableDirective(isAllowedToContainClause(OMPC_default))`` matches
8826+
/// ``ompExecutableDirective(isAllowedToContainClause(OMPC_default))`` matches
88278827
/// ``omp parallel`` and ``omp parallel for``.
88288828
///
88298829
/// If the matcher is use from clang-query, ``OpenMPClauseKind`` parameter

clang/test/CodeGen/AArch64/pure-scalable-args-empty-union.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ void f0(S0 *p) {
2323

2424
#ifdef __cplusplus
2525

26-
// PST containing an empty union with `[[no_unique_address]]`` - pass in registers.
26+
// PST containing an empty union with `[[no_unique_address]]` - pass in registers.
2727
typedef struct {
2828
fvec32 x[4];
2929
[[no_unique_address]]
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
// RUN: %clang_asan -Wno-alloc-size -fsanitize-recover=address %s -o %t && %env_asan_opts=halt_on_error=0 %run %t 2>&1 | FileCheck %s
2+
3+
// ASan doesn't catch this because internally it translates 0-byte allocations
4+
// into 1-byte
5+
// XFAIL: *
6+
7+
#include <malloc.h>
8+
#include <stdio.h>
9+
10+
int main(int argc, char **argv) {
11+
{
12+
char *p1 = (char *)calloc(1, 0);
13+
printf("p1 is %p\n", p1);
14+
printf("Content of p1 is: %d\n", *p1);
15+
// CHECK: ERROR: AddressSanitizer: heap-buffer-overflow
16+
// CHECK: {{#0 0x.* in main .*zero_alloc.cpp:}}[[@LINE-2]]
17+
free(p1);
18+
}
19+
20+
{
21+
char *p2 = (char *)calloc(0, 1);
22+
printf("p2 is %p\n", p2);
23+
printf("Content of p2 is: %d\n", *p2);
24+
// CHECK: ERROR: AddressSanitizer: heap-buffer-overflow
25+
// CHECK: {{#0 0x.* in main .*zero_alloc.cpp:}}[[@LINE-2]]
26+
free(p2);
27+
}
28+
29+
{
30+
char *p3 = (char *)malloc(0);
31+
printf("p3 is %p\n", p3);
32+
printf("Content of p2 is: %d\n", *p3);
33+
// CHECK: ERROR: AddressSanitizer: heap-buffer-overflow
34+
// CHECK: {{#0 0x.* in main .*zero_alloc.cpp:}}[[@LINE-2]]
35+
free(p3);
36+
}
37+
38+
return 0;
39+
}
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
// RUN: %clang_msan -Wno-alloc-size -fsanitize-recover=memory %s -o %t && not %run %t 2>&1 | FileCheck %s
2+
3+
// MSan doesn't catch this because internally it translates 0-byte allocations
4+
// into 1-byte
5+
// XFAIL: *
6+
7+
#include <malloc.h>
8+
#include <stdio.h>
9+
10+
int main(int argc, char **argv) {
11+
{
12+
char *p1 = (char *)calloc(1, 0);
13+
printf("p1 is %p\n", p1);
14+
printf("Content of p1 is: %d\n", *p1);
15+
// CHECK: WARNING: MemorySanitizer: use-of-uninitialized-value
16+
// CHECK: {{#0 0x.* in main .*zero_alloc.cpp:}}[[@LINE-2]]
17+
free(p1);
18+
}
19+
20+
{
21+
char *p2 = (char *)calloc(0, 1);
22+
printf("p2 is %p\n", p2);
23+
printf("Content of p2 is: %d\n", *p2);
24+
// CHECK: WARNING: MemorySanitizer: use-of-uninitialized-value
25+
// CHECK: {{#0 0x.* in main .*zero_alloc.cpp:}}[[@LINE-2]]
26+
free(p2);
27+
}
28+
29+
{
30+
char *p3 = (char *)malloc(0);
31+
printf("p3 is %p\n", p3);
32+
printf("Content of p2 is: %d\n", *p3);
33+
// CHECK: WARNING: MemorySanitizer: use-of-uninitialized-value
34+
// CHECK: {{#0 0x.* in main .*zero_alloc.cpp:}}[[@LINE-2]]
35+
free(p3);
36+
}
37+
38+
return 0;
39+
}

compiler-rt/test/profile/instrprof-thinlto-indirect-call-promotion.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ static void callee0() {}
8080
void callee1() {}
8181
typedef void (*FPT)();
8282
FPT calleeAddrs[] = {callee0, callee1};
83-
// `global_func`` might call one of two indirect callees. callee0 has internal
83+
// `global_func` might call one of two indirect callees. callee0 has internal
8484
// linkage and callee1 has external linkage.
8585
void global_func() {
8686
FPT fp = calleeAddrs[0];

0 commit comments

Comments
 (0)