Skip to content

Commit 8049e0c

Browse files
authored
Merge branch 'main' into vpinst-use-select-predicate-compute-cost
2 parents d7fa21f + 00c8e61 commit 8049e0c

File tree

740 files changed

+28440
-14817
lines changed

Some content is hidden

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

740 files changed

+28440
-14817
lines changed

.github/workflows/libcxx-build-and-test.yaml

Lines changed: 17 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -223,6 +223,9 @@ jobs:
223223
source .venv/bin/activate
224224
python -m pip install psutil
225225
xcrun bash libcxx/utils/ci/run-buildbot ${{ matrix.config }}
226+
env:
227+
CC: clang
228+
CXX: clang++
226229
- uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5.0.0
227230
if: always() # Upload artifacts even if the build or test suite fails
228231
with:
@@ -241,16 +244,16 @@ jobs:
241244
fail-fast: false
242245
matrix:
243246
include:
244-
- { config: clang-cl-dll, mingw: false }
245-
- { config: clang-cl-static, mingw: false }
246-
- { config: clang-cl-no-vcruntime, mingw: false }
247-
- { config: clang-cl-debug, mingw: false }
248-
- { config: clang-cl-static-crt, mingw: false }
249-
- { config: mingw-dll, mingw: true }
250-
- { config: mingw-static, mingw: true }
251-
- { config: mingw-dll-i686, mingw: true }
252-
- { config: mingw-incomplete-sysroot, mingw: true }
253-
- { config: mingw-static, mingw: true, runner: windows-11-arm }
247+
- { config: clang-cl-dll, mingw: false, cc: clang-cl, cxx: clang-cl }
248+
- { config: clang-cl-static, mingw: false, cc: clang-cl, cxx: clang-cl }
249+
- { config: clang-cl-no-vcruntime, mingw: false, cc: clang-cl, cxx: clang-cl }
250+
- { config: clang-cl-debug, mingw: false, cc: clang-cl, cxx: clang-cl }
251+
- { config: clang-cl-static-crt, mingw: false, cc: clang-cl, cxx: clang-cl }
252+
- { config: mingw-dll, mingw: true, cc: cc, cxx: c++ }
253+
- { config: mingw-dll, mingw: true, cc: i686-w64-mingw32-clang, cxx: i686-w64-mingw32-clang++ }
254+
- { config: mingw-static, mingw: true, cc: cc, cxx: c++ }
255+
- { config: mingw-incomplete-sysroot, mingw: true, cc: cc, cxx: c++ }
256+
- { config: mingw-static, mingw: true, cc: cc, cxx: c++, runner: windows-11-arm }
254257
runs-on: ${{ matrix.runner != '' && matrix.runner || 'windows-2022' }}
255258
steps:
256259
- uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0
@@ -286,5 +289,7 @@ jobs:
286289
run: |
287290
echo "c:\Program Files\LLVM\bin" | Out-File -FilePath $Env:GITHUB_PATH -Encoding utf8 -Append
288291
- name: Build and test
289-
run: |
290-
bash libcxx/utils/ci/run-buildbot ${{ matrix.config }}
292+
run: bash libcxx/utils/ci/run-buildbot ${{ matrix.config }}
293+
env:
294+
CC: ${{ matrix.cc }}
295+
CXX: ${{ matrix.cxx }}

.github/workflows/libcxx-check-generated-files.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,3 +22,6 @@ jobs:
2222

2323
- name: Check generated files
2424
run: libcxx/utils/ci/run-buildbot check-generated-output
25+
env:
26+
CC: cc
27+
CXX: c++

bolt/docs/BAT.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,7 @@ Functions table:
6161

6262
### Functions table
6363
Hot and cold functions tables share the encoding except differences marked below.
64+
6465
Header:
6566
| Entry | Encoding | Description |
6667
| ------ | ----- | ----------- |

clang-tools-extra/clang-tidy/.clang-tidy

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,7 @@ Checks: >
3232
-readability-qualified-auto,
3333
-readability-simplify-boolean-expr,
3434
-readability-static-definition-in-anonymous-namespace,
35-
-readability-suspicious-call-argument,
36-
-readability-use-anyofallof
35+
-readability-suspicious-call-argument
3736
3837
CheckOptions:
3938
- key: performance-move-const-arg.CheckTriviallyCopyableMove

clang-tools-extra/clang-tidy/ClangTidyDiagnosticConsumer.cpp

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -478,11 +478,10 @@ bool ClangTidyDiagnosticConsumer::passesLineFilter(StringRef FileName,
478478
if (FileName.ends_with(Filter.Name)) {
479479
if (Filter.LineRanges.empty())
480480
return true;
481-
for (const FileFilter::LineRange &Range : Filter.LineRanges) {
482-
if (Range.first <= LineNumber && LineNumber <= Range.second)
483-
return true;
484-
}
485-
return false;
481+
return llvm::any_of(
482+
Filter.LineRanges, [&](const FileFilter::LineRange &Range) {
483+
return Range.first <= LineNumber && LineNumber <= Range.second;
484+
});
486485
}
487486
}
488487
return false;

clang-tools-extra/clang-tidy/ExpandModularHeadersPPCallbacks.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ class ExpandModularHeadersPPCallbacks : public PPCallbacks {
137137
std::unique_ptr<Preprocessor> PP;
138138
bool EnteredMainFile = false;
139139
bool StartedLexing = false;
140-
Token CurrentToken;
140+
Token CurrentToken = Token();
141141
};
142142

143143
} // namespace tooling

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

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -75,12 +75,9 @@ static bool isFallthroughSwitchBranch(const SwitchBranch &Branch) {
7575
if (!S)
7676
return true;
7777

78-
for (const Attr *A : S->getAttrs()) {
79-
if (isa<FallThroughAttr>(A))
80-
return false;
81-
}
82-
83-
return true;
78+
return llvm::all_of(S->getAttrs(), [](const Attr *A) {
79+
return !isa<FallThroughAttr>(A);
80+
});
8481
}
8582
} Visitor;
8683

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

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

47-
for (const CXXConstructorDecl *C : Node.ctors()) {
48-
if (C->isCopyOrMoveConstructor() && C->isDefaulted() && !C->isDeleted())
49-
return false;
50-
}
51-
for (const CXXMethodDecl *M : Node.methods()) {
52-
if (M->isCopyAssignmentOperator())
53-
llvm::errs() << M->isDeleted() << "\n";
54-
if (M->isCopyAssignmentOperator() && M->isDefaulted() && !M->isDeleted())
55-
return false;
56-
if (M->isMoveAssignmentOperator() && M->isDefaulted() && !M->isDeleted())
57-
return false;
58-
}
47+
if (llvm::any_of(Node.ctors(), [](const CXXConstructorDecl *C) {
48+
return C->isCopyOrMoveConstructor() && C->isDefaulted() &&
49+
!C->isDeleted();
50+
}))
51+
return false;
52+
if (llvm::any_of(Node.methods(), [](const CXXMethodDecl *M) {
53+
return (M->isCopyAssignmentOperator() ||
54+
M->isMoveAssignmentOperator()) &&
55+
M->isDefaulted() && !M->isDeleted();
56+
}))
57+
return false;
5958
// FIXME: find ways to identifier correct handle capture this lambda
6059
return true;
6160
}

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

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1589,11 +1589,9 @@ static bool lazyMapOfSetsIntersectionExists(const MapTy &Map, const ElemTy &E1,
15891589
if (E1Iterator == Map.end() || E2Iterator == Map.end())
15901590
return false;
15911591

1592-
for (const auto &E1SetElem : E1Iterator->second)
1593-
if (E2Iterator->second.contains(E1SetElem))
1594-
return true;
1595-
1596-
return false;
1592+
return llvm::any_of(E1Iterator->second, [&E2Iterator](const auto &E1SetElem) {
1593+
return E2Iterator->second.contains(E1SetElem);
1594+
});
15971595
}
15981596

15991597
/// Implements the heuristic that marks two parameters related if there is

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,8 @@ void ExceptionEscapeCheck::storeOptions(ClangTidyOptions::OptionMap &Opts) {
7272

7373
void ExceptionEscapeCheck::registerMatchers(MatchFinder *Finder) {
7474
auto MatchIf = [](bool Enabled, const auto &Matcher) {
75-
ast_matchers::internal::Matcher<FunctionDecl> Nothing = unless(anything());
75+
const ast_matchers::internal::Matcher<FunctionDecl> Nothing =
76+
unless(anything());
7677
return Enabled ? Matcher : Nothing;
7778
};
7879
Finder->addMatcher(

0 commit comments

Comments
 (0)