Skip to content

Commit ff508ae

Browse files
Merge branch 'main' into bazel-fullbuild
2 parents 500c5fd + 0f4dc93 commit ff508ae

File tree

624 files changed

+26228
-17573
lines changed

Some content is hidden

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

624 files changed

+26228
-17573
lines changed

.github/workflows/issue-write.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ on:
77
- "Check for private emails used in PRs"
88
- "PR Request Release Note"
99
- "Code lint"
10+
- "CI Checks"
1011
types:
1112
- completed
1213

.github/workflows/libclang-abi-tests.yml

Lines changed: 4 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,8 @@ jobs:
8484
if: github.repository_owner == 'llvm'
8585
needs: abi-dump-setup
8686
runs-on: ubuntu-24.04
87+
container:
88+
image: "ghcr.io/llvm/ci-ubuntu-24.04-abi-tests@sha256:f80125c0f767e29b8616210c0fd5cea2cd1f4fb6f2ca86d89f6016b6329b8d7f" #ghcr.io/llvm/ci-ubuntu-24.04-abi-tests:9524b37c503f
8789
strategy:
8890
matrix:
8991
name:
@@ -101,17 +103,6 @@ jobs:
101103
steps:
102104
- name: Install Ninja
103105
uses: llvm/actions/install-ninja@42d80571b13f4599bbefbc7189728b64723c7f78 # main
104-
- name: Install abi-compliance-checker
105-
run: |
106-
sudo apt-get update
107-
sudo apt-get install -y abi-dumper autoconf pkg-config
108-
- name: Install universal-ctags
109-
run: |
110-
git clone https://github.com/universal-ctags/ctags.git
111-
cd ctags
112-
./autogen.sh
113-
./configure
114-
sudo make install
115106
- name: Download source code
116107
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
117108
with:
@@ -139,6 +130,8 @@ jobs:
139130
abi-compare:
140131
if: github.repository_owner == 'llvm'
141132
runs-on: ubuntu-24.04
133+
container:
134+
image: "ghcr.io/llvm/ci-ubuntu-24.04-abi-tests@sha256:f80125c0f767e29b8616210c0fd5cea2cd1f4fb6f2ca86d89f6016b6329b8d7f" #ghcr.io/llvm/ci-ubuntu-24.04-abi-tests:9524b37c503f
142135
needs:
143136
- abi-dump-setup
144137
- abi-dump
@@ -154,10 +147,6 @@ jobs:
154147
name: build-latest
155148
path: build-latest
156149

157-
- name: Install abi-compliance-checker
158-
run: |
159-
sudo apt-get update
160-
sudo apt-get install -y abi-compliance-checker
161150
- name: Compare ABI
162151
run: |
163152
for lib in ${{ needs.abi-dump-setup.outputs.ABI_LIBS }}; do

.github/workflows/release-binaries.yml

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -191,12 +191,6 @@ jobs:
191191
- name: Install Ninja
192192
uses: llvm/actions/install-ninja@42d80571b13f4599bbefbc7189728b64723c7f78 # main
193193

194-
- name: Setup Windows
195-
if: startsWith(runner.os, 'Windows')
196-
uses: llvm/actions/setup-windows@42d80571b13f4599bbefbc7189728b64723c7f78 # main
197-
with:
198-
arch: amd64
199-
200194
- name: Set Build Prefix
201195
id: setup-stage
202196
shell: bash

clang-tools-extra/clang-tidy/google/AvoidCStyleCastsCheck.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -269,6 +269,12 @@ void AvoidCStyleCastsCheck::check(const MatchFinder::MatchResult &Result) {
269269
return;
270270
}
271271
break;
272+
case CK_BaseToDerived:
273+
if (!needsConstCast(SourceType, DestType)) {
274+
ReplaceWithNamedCast("static_cast");
275+
return;
276+
}
277+
break;
272278
default:
273279
break;
274280
}

clang-tools-extra/docs/ReleaseNotes.rst

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -402,6 +402,10 @@ Changes in existing checks
402402
adding an option to allow pointer arithmetic via prefix/postfix increment or
403403
decrement operators.
404404

405+
- Improved :doc:`google-readability-casting
406+
<clang-tidy/checks/google/readability-casting>` check by adding fix-it
407+
notes for downcasts.
408+
405409
- Improved :doc:`llvm-prefer-isa-or-dyn-cast-in-conditionals
406410
<clang-tidy/checks/llvm/prefer-isa-or-dyn-cast-in-conditionals>` check:
407411

clang-tools-extra/test/clang-tidy/checkers/google/readability-casting.cpp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -102,9 +102,11 @@ void f(int a, double b, const char *cpc, const void *cpv, X *pX) {
102102
// CHECK-FIXES: b1 = static_cast<int>(b);
103103

104104
Y *pB = (Y*)pX;
105-
// CHECK-MESSAGES: :[[@LINE-1]]:11: warning: {{.*}}; use static_cast/const_cast/reinterpret_cast [
105+
// CHECK-MESSAGES: :[[@LINE-1]]:11: warning: {{.*}}; use static_cast {{.*}}
106+
// CHECK-FIXES: Y *pB = static_cast<Y*>(pX);
106107
Y &rB = (Y&)*pX;
107-
// CHECK-MESSAGES: :[[@LINE-1]]:11: warning: {{.*}}; use static_cast/const_cast/reinterpret_cast [
108+
// CHECK-MESSAGES: :[[@LINE-1]]:11: warning: {{.*}}; use static_cast {{.*}}
109+
// CHECK-FIXES: Y &rB = static_cast<Y&>(*pX);
108110

109111
const char *pc3 = (const char*)cpv;
110112
// CHECK-MESSAGES: :[[@LINE-1]]:21: warning: {{.*}}; use static_cast [

clang/include/clang/AST/Decl.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2335,7 +2335,7 @@ class FunctionDecl : public DeclaratorDecl,
23352335
}
23362336

23372337
void setDefaultedOrDeletedInfo(DefaultedOrDeletedFunctionInfo *Info);
2338-
DefaultedOrDeletedFunctionInfo *getDefalutedOrDeletedInfo() const;
2338+
DefaultedOrDeletedFunctionInfo *getDefaultedOrDeletedInfo() const;
23392339

23402340
/// Whether this function is variadic.
23412341
bool isVariadic() const;

clang/lib/AST/Decl.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3180,7 +3180,7 @@ void FunctionDecl::DefaultedOrDeletedFunctionInfo::setDeletedMessage(
31803180
}
31813181

31823182
FunctionDecl::DefaultedOrDeletedFunctionInfo *
3183-
FunctionDecl::getDefalutedOrDeletedInfo() const {
3183+
FunctionDecl::getDefaultedOrDeletedInfo() const {
31843184
return FunctionDeclBits.HasDefaultedOrDeletedInfo ? DefaultedOrDeletedInfo
31853185
: nullptr;
31863186
}

clang/lib/CodeGen/CodeGenModule.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4938,6 +4938,11 @@ void CodeGenModule::setMultiVersionResolverAttributes(llvm::Function *Resolver,
49384938

49394939
setDSOLocal(Resolver);
49404940

4941+
// The resolver must be exempt from sanitizer instrumentation, as it can run
4942+
// before the sanitizer is initialized.
4943+
// (https://github.com/llvm/llvm-project/issues/163369)
4944+
Resolver->addFnAttr(llvm::Attribute::DisableSanitizerInstrumentation);
4945+
49414946
// Set the default target-specific attributes, such as PAC and BTI ones on
49424947
// AArch64. Not passing Decl to prevent setting unrelated attributes,
49434948
// as Resolver can be shared by multiple declarations.

clang/lib/Sema/SemaDeclCXX.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8035,7 +8035,7 @@ class DefaultedComparisonVisitor {
80358035
DefaultedComparisonVisitor(Sema &S, CXXRecordDecl *RD, FunctionDecl *FD,
80368036
DefaultedComparisonKind DCK)
80378037
: S(S), RD(RD), FD(FD), DCK(DCK) {
8038-
if (auto *Info = FD->getDefalutedOrDeletedInfo()) {
8038+
if (auto *Info = FD->getDefaultedOrDeletedInfo()) {
80398039
// FIXME: Change CreateOverloadedBinOp to take an ArrayRef instead of an
80408040
// UnresolvedSet to avoid this copy.
80418041
Fns.assign(Info->getUnqualifiedLookups().begin(),

0 commit comments

Comments
 (0)