Skip to content

Commit 9ed0abf

Browse files
authored
merge main into amd-staging (llvm#3804)
2 parents 336424f + c197614 commit 9ed0abf

File tree

417 files changed

+4501
-2061
lines changed

Some content is hidden

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

417 files changed

+4501
-2061
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 }}
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
BasedOnStyle: LLVM
2+
QualifierAlignment: Left

clang-tools-extra/clang-tidy/bugprone/CapturingThisInMemberVariableCheck.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,11 +44,11 @@ AST_MATCHER(CXXRecordDecl, correctHandleCaptureThisLambda) {
4444
if (Node.hasSimpleMoveAssignment())
4545
return false;
4646

47-
for (CXXConstructorDecl const *C : Node.ctors()) {
47+
for (const CXXConstructorDecl *C : Node.ctors()) {
4848
if (C->isCopyOrMoveConstructor() && C->isDefaulted() && !C->isDeleted())
4949
return false;
5050
}
51-
for (CXXMethodDecl const *M : Node.methods()) {
51+
for (const CXXMethodDecl *M : Node.methods()) {
5252
if (M->isCopyAssignmentOperator())
5353
llvm::errs() << M->isDeleted() << "\n";
5454
if (M->isCopyAssignmentOperator() && M->isDefaulted() && !M->isDeleted())

clang-tools-extra/clang-tidy/bugprone/MultiLevelImplicitPointerConversionCheck.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ class MultiLevelImplicitPointerConversionCheck : public ClangTidyCheck {
3131
}
3232

3333
private:
34-
bool const EnableInC;
34+
const bool EnableInC;
3535
};
3636

3737
} // namespace clang::tidy::bugprone

clang-tools-extra/clang-tidy/bugprone/SmartPtrArrayMismatchCheck.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ class SmartPtrArrayMismatchCheck : public ClangTidyCheck {
4040
static const char PointerTypeN[];
4141

4242
private:
43-
StringRef const SmartPointerName;
43+
const StringRef SmartPointerName;
4444
};
4545

4646
} // namespace clang::tidy::bugprone

clang-tools-extra/clang-tidy/bugprone/UnusedLocalNonTrivialVariableCheck.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ AST_MATCHER(VarDecl, isReferenced) { return Node.isReferenced(); }
3333
AST_MATCHER(VarDecl, explicitMarkUnused) {
3434
// Implementations should not emit a warning that a name-independent
3535
// declaration is used or unused.
36-
LangOptions const &LangOpts = Finder->getASTContext().getLangOpts();
36+
const LangOptions &LangOpts = Finder->getASTContext().getLangOpts();
3737
return Node.hasAttr<UnusedAttr>() ||
3838
(LangOpts.CPlusPlus26 && Node.isPlaceholderVar(LangOpts));
3939
}

clang-tools-extra/clang-tidy/cppcoreguidelines/AvoidConstOrRefDataMembersCheck.cpp

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -14,73 +14,73 @@ using namespace clang::ast_matchers;
1414

1515
namespace clang::tidy::cppcoreguidelines {
1616

17-
static bool isCopyConstructible(CXXRecordDecl const &Node) {
17+
static bool isCopyConstructible(const CXXRecordDecl &Node) {
1818
if (Node.needsOverloadResolutionForCopyConstructor() &&
1919
Node.needsImplicitCopyConstructor()) {
2020
// unresolved
21-
for (CXXBaseSpecifier const &BS : Node.bases()) {
22-
CXXRecordDecl const *BRD = BS.getType()->getAsCXXRecordDecl();
21+
for (const CXXBaseSpecifier &BS : Node.bases()) {
22+
const CXXRecordDecl *BRD = BS.getType()->getAsCXXRecordDecl();
2323
if (BRD != nullptr && !isCopyConstructible(*BRD))
2424
return false;
2525
}
2626
}
2727
if (Node.hasSimpleCopyConstructor())
2828
return true;
29-
for (CXXConstructorDecl const *Ctor : Node.ctors())
29+
for (const CXXConstructorDecl *Ctor : Node.ctors())
3030
if (Ctor->isCopyConstructor())
3131
return !Ctor->isDeleted();
3232
return false;
3333
}
3434

35-
static bool isMoveConstructible(CXXRecordDecl const &Node) {
35+
static bool isMoveConstructible(const CXXRecordDecl &Node) {
3636
if (Node.needsOverloadResolutionForMoveConstructor() &&
3737
Node.needsImplicitMoveConstructor()) {
3838
// unresolved
39-
for (CXXBaseSpecifier const &BS : Node.bases()) {
40-
CXXRecordDecl const *BRD = BS.getType()->getAsCXXRecordDecl();
39+
for (const CXXBaseSpecifier &BS : Node.bases()) {
40+
const CXXRecordDecl *BRD = BS.getType()->getAsCXXRecordDecl();
4141
if (BRD != nullptr && !isMoveConstructible(*BRD))
4242
return false;
4343
}
4444
}
4545
if (Node.hasSimpleMoveConstructor())
4646
return true;
47-
for (CXXConstructorDecl const *Ctor : Node.ctors())
47+
for (const CXXConstructorDecl *Ctor : Node.ctors())
4848
if (Ctor->isMoveConstructor())
4949
return !Ctor->isDeleted();
5050
return false;
5151
}
5252

53-
static bool isCopyAssignable(CXXRecordDecl const &Node) {
53+
static bool isCopyAssignable(const CXXRecordDecl &Node) {
5454
if (Node.needsOverloadResolutionForCopyAssignment() &&
5555
Node.needsImplicitCopyAssignment()) {
5656
// unresolved
57-
for (CXXBaseSpecifier const &BS : Node.bases()) {
58-
CXXRecordDecl const *BRD = BS.getType()->getAsCXXRecordDecl();
57+
for (const CXXBaseSpecifier &BS : Node.bases()) {
58+
const CXXRecordDecl *BRD = BS.getType()->getAsCXXRecordDecl();
5959
if (BRD != nullptr && !isCopyAssignable(*BRD))
6060
return false;
6161
}
6262
}
6363
if (Node.hasSimpleCopyAssignment())
6464
return true;
65-
for (CXXMethodDecl const *Method : Node.methods())
65+
for (const CXXMethodDecl *Method : Node.methods())
6666
if (Method->isCopyAssignmentOperator())
6767
return !Method->isDeleted();
6868
return false;
6969
}
7070

71-
static bool isMoveAssignable(CXXRecordDecl const &Node) {
71+
static bool isMoveAssignable(const CXXRecordDecl &Node) {
7272
if (Node.needsOverloadResolutionForMoveAssignment() &&
7373
Node.needsImplicitMoveAssignment()) {
7474
// unresolved
75-
for (CXXBaseSpecifier const &BS : Node.bases()) {
76-
CXXRecordDecl const *BRD = BS.getType()->getAsCXXRecordDecl();
75+
for (const CXXBaseSpecifier &BS : Node.bases()) {
76+
const CXXRecordDecl *BRD = BS.getType()->getAsCXXRecordDecl();
7777
if (BRD != nullptr && !isMoveAssignable(*BRD))
7878
return false;
7979
}
8080
}
8181
if (Node.hasSimpleMoveAssignment())
8282
return true;
83-
for (CXXMethodDecl const *Method : Node.methods())
83+
for (const CXXMethodDecl *Method : Node.methods())
8484
if (Method->isMoveAssignmentOperator())
8585
return !Method->isDeleted();
8686
return false;

clang-tools-extra/clang-tidy/misc/OverrideWithDifferentVisibilityCheck.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ using namespace clang;
1717
namespace {
1818

1919
AST_MATCHER(NamedDecl, isOperatorDecl) {
20-
DeclarationName::NameKind const NK = Node.getDeclName().getNameKind();
20+
const DeclarationName::NameKind NK = Node.getDeclName().getNameKind();
2121
return NK != DeclarationName::Identifier &&
2222
NK != DeclarationName::CXXConstructorName &&
2323
NK != DeclarationName::CXXDestructorName;
@@ -104,7 +104,7 @@ void OverrideWithDifferentVisibilityCheck::check(
104104

105105
const auto *const OverriddenFunction =
106106
Result.Nodes.getNodeAs<FunctionDecl>("base_func");
107-
AccessSpecifier const ActualAccess = MatchedFunction->getAccess();
107+
const AccessSpecifier ActualAccess = MatchedFunction->getAccess();
108108
AccessSpecifier OverriddenAccess = OverriddenFunction->getAccess();
109109

110110
const CXXBaseSpecifier *InheritanceWithStrictVisibility = nullptr;

clang-tools-extra/clang-tidy/modernize/ConcatNestedNamespacesCheck.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -152,14 +152,14 @@ void ConcatNestedNamespacesCheck::reportDiagnostic(
152152
ConcatNameSpace.append("::");
153153
}
154154

155-
for (SourceRange const &Front : Fronts)
155+
for (const SourceRange &Front : Fronts)
156156
DB << FixItHint::CreateRemoval(Front);
157157
DB << FixItHint::CreateReplacement(
158158
Namespaces.back().getReplacedNamespaceFrontRange(), ConcatNameSpace);
159159
if (LastRBrace != Namespaces.back().getDefaultNamespaceBackRange())
160160
DB << FixItHint::CreateReplacement(LastRBrace,
161161
("} // " + ConcatNameSpace).str());
162-
for (SourceRange const &Back : llvm::reverse(Backs))
162+
for (const SourceRange &Back : llvm::reverse(Backs))
163163
DB << FixItHint::CreateRemoval(Back);
164164
}
165165

clang-tools-extra/clang-tidy/modernize/UseAutoCheck.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -334,14 +334,14 @@ void UseAutoCheck::replaceIterators(const DeclStmt *D, ASTContext *Context) {
334334

335335
static void ignoreTypeLocClasses(
336336
TypeLoc &Loc,
337-
std::initializer_list<TypeLoc::TypeLocClass> const &LocClasses) {
337+
const std::initializer_list<TypeLoc::TypeLocClass> &LocClasses) {
338338
while (llvm::is_contained(LocClasses, Loc.getTypeLocClass()))
339339
Loc = Loc.getNextTypeLoc();
340340
}
341341

342342
static bool isMultiLevelPointerToTypeLocClasses(
343343
TypeLoc Loc,
344-
std::initializer_list<TypeLoc::TypeLocClass> const &LocClasses) {
344+
const std::initializer_list<TypeLoc::TypeLocClass> &LocClasses) {
345345
ignoreTypeLocClasses(Loc, {TypeLoc::Paren, TypeLoc::Qualified});
346346
TypeLoc::TypeLocClass TLC = Loc.getTypeLocClass();
347347
if (TLC != TypeLoc::Pointer && TLC != TypeLoc::MemberPointer)

0 commit comments

Comments
 (0)