Skip to content

Commit a473409

Browse files
Merge branch 'main' into add-drop-equivalent-buffer-results-filter
2 parents 710e704 + 15d36fc commit a473409

File tree

884 files changed

+36103
-24225
lines changed

Some content is hidden

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

884 files changed

+36103
-24225
lines changed

.ci/metrics/metrics.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@
4040
GITHUB_JOB_TO_TRACK = {
4141
"github_llvm_premerge_checks": {
4242
"Build and Test Linux": "premerge_linux",
43+
"Build and Test Linux AArch64": "premerge_linux_aarch64",
4344
"Build and Test Windows": "premerge_windows",
4445
},
4546
"github_libcxx_premerge_checks": {

.github/new-prs-labeler.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1096,8 +1096,8 @@ clang:openmp:
10961096
- llvm/test/Transforms/OpenMP/**
10971097

10981098
clang:temporal-safety:
1099-
- clang/include/clang/Analysis/Analyses/LifetimeSafety*
1100-
- clang/lib/Analysis/LifetimeSafety*
1099+
- clang/include/clang/Analysis/Analyses/LifetimeSafety/**
1100+
- clang/lib/Analysis/LifetimeSafety/**
11011101
- clang/unittests/Analysis/LifetimeSafety*
11021102
- clang/test/Sema/*lifetime-safety*
11031103
- clang/test/Sema/*lifetime-analysis*

.github/workflows/build-ci-container-tooling.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ jobs:
7272
- name: Test Container
7373
run: |
7474
# Use --pull=never to ensure we are testing the just built image.
75-
podman run --pull=never --rm -it ${{ steps.vars.outputs.container-name-format-tag }} /usr/bin/bash -x -c 'cd $HOME && clang-format --version | grep version && black --version | grep black'
75+
podman run --pull=never --rm -it ${{ steps.vars.outputs.container-name-format-tag }} /usr/bin/bash -x -c 'cd $HOME && clang-format --version | grep version && git-clang-format -h | grep usage && black --version | grep black'
7676
podman run --pull=never --rm -it ${{ steps.vars.outputs.container-name-lint-tag }} /usr/bin/bash -x -c 'cd $HOME && clang-tidy --version | grep version && clang-tidy-diff.py -h | grep usage'
7777
7878
push-ci-container:

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

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,8 @@ RUN apt-get update && \
1010
tar -xvJf llvm.tar.xz -C /llvm-extract \
1111
# Only unpack these tools to save space on Github runner.
1212
LLVM-${LLVM_VERSION}-Linux-X64/bin/clang-tidy \
13-
LLVM-${LLVM_VERSION}-Linux-X64/bin/clang-format && \
13+
LLVM-${LLVM_VERSION}-Linux-X64/bin/clang-format \
14+
LLVM-${LLVM_VERSION}-Linux-X64/bin/git-clang-format && \
1415
rm llvm.tar.xz
1516

1617

@@ -35,7 +36,9 @@ RUN apt-get update && \
3536
FROM base AS ci-container-code-format
3637
ARG LLVM_VERSION
3738

38-
COPY --from=llvm-downloader /llvm-extract/LLVM-${LLVM_VERSION}-Linux-X64/bin/clang-format ${LLVM_SYSROOT}/bin/clang-format
39+
COPY --from=llvm-downloader /llvm-extract/LLVM-${LLVM_VERSION}-Linux-X64/bin/clang-format \
40+
/llvm-extract/LLVM-${LLVM_VERSION}-Linux-X64/bin/git-clang-format \
41+
${LLVM_SYSROOT}/bin/
3942

4043
ENV PATH=${LLVM_SYSROOT}/bin:${PATH}
4144

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

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ FROM docker.io/library/ubuntu:24.04 AS base
22
ENV LLVM_SYSROOT=/opt/llvm
33

44
FROM base AS stage1-toolchain
5-
ENV LLVM_VERSION=21.1.1
5+
ENV LLVM_VERSION=21.1.3
66

77
RUN apt-get update && \
88
apt-get install -y \
@@ -62,7 +62,6 @@ RUN apt-get update && \
6262
# Having a symlink from python to python3 enables code sharing between
6363
# the Linux and Windows pipelines.
6464
python3-pip \
65-
python3-venv \
6665
file \
6766
tzdata \
6867
python-is-python3 && \

bolt/lib/Passes/FrameAnalysis.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -198,7 +198,7 @@ class FrameAccessAnalysis {
198198
if (CFIStack.empty())
199199
dbgs() << "Assertion is about to fail: " << BF.getPrintName() << "\n";
200200
assert(!CFIStack.empty() && "Corrupt CFI stack");
201-
std::pair<int64_t, uint16_t> &Elem = CFIStack.top();
201+
std::pair<int64_t, uint16_t> Elem = CFIStack.top();
202202
CFIStack.pop();
203203
CfaOffset = Elem.first;
204204
CfaReg = Elem.second;

bolt/lib/Passes/ShrinkWrapping.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -402,7 +402,7 @@ void StackLayoutModifier::classifyCFIs() {
402402
break;
403403
case MCCFIInstruction::OpRestoreState: {
404404
assert(!CFIStack.empty() && "Corrupt CFI stack");
405-
std::pair<int64_t, uint16_t> &Elem = CFIStack.top();
405+
std::pair<int64_t, uint16_t> Elem = CFIStack.top();
406406
CFIStack.pop();
407407
CfaOffset = Elem.first;
408408
CfaReg = Elem.second;

clang-tools-extra/clang-doc/JSONGenerator.cpp

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -584,12 +584,20 @@ static SmallString<16> determineFileName(Info *I, SmallString<128> &Path) {
584584
FileName = RecordSymbolInfo->MangledName;
585585
} else if (I->USR == GlobalNamespaceID)
586586
FileName = "index";
587-
else
587+
else if (I->IT == InfoType::IT_namespace) {
588+
for (const auto &NS : I->Namespace) {
589+
FileName += NS.Name;
590+
FileName += "_";
591+
}
592+
FileName += I->Name;
593+
} else
588594
FileName = I->Name;
589595
sys::path::append(Path, FileName + ".json");
590596
return FileName;
591597
}
592598

599+
// FIXME: Revert back to creating nested directories for namespaces instead of
600+
// putting everything in a flat directory structure.
593601
Error JSONGenerator::generateDocs(
594602
StringRef RootDir, llvm::StringMap<std::unique_ptr<doc::Info>> Infos,
595603
const ClangDocContext &CDCtx) {

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

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,15 +40,21 @@ SuspiciousIncludeCheck::SuspiciousIncludeCheck(StringRef Name,
4040
ClangTidyContext *Context)
4141
: ClangTidyCheck(Name, Context),
4242
HeaderFileExtensions(Context->getHeaderFileExtensions()),
43-
ImplementationFileExtensions(Context->getImplementationFileExtensions()) {
44-
}
43+
ImplementationFileExtensions(Context->getImplementationFileExtensions()),
44+
IgnoredRegexString(Options.get("IgnoredRegex").value_or(StringRef{})),
45+
IgnoredRegex(IgnoredRegexString) {}
4546

4647
void SuspiciousIncludeCheck::registerPPCallbacks(
4748
const SourceManager &SM, Preprocessor *PP, Preprocessor *ModuleExpanderPP) {
4849
PP->addPPCallbacks(
4950
::std::make_unique<SuspiciousIncludePPCallbacks>(*this, SM, PP));
5051
}
5152

53+
void SuspiciousIncludeCheck::storeOptions(ClangTidyOptions::OptionMap &Opts) {
54+
if (!IgnoredRegexString.empty())
55+
Options.store(Opts, "IgnoredRegex", IgnoredRegexString);
56+
}
57+
5258
void SuspiciousIncludePPCallbacks::InclusionDirective(
5359
SourceLocation HashLoc, const Token &IncludeTok, StringRef FileName,
5460
bool IsAngled, CharSourceRange FilenameRange, OptionalFileEntryRef File,
@@ -57,6 +63,9 @@ void SuspiciousIncludePPCallbacks::InclusionDirective(
5763
if (IncludeTok.getIdentifierInfo()->getPPKeywordID() == tok::pp_import)
5864
return;
5965

66+
if (!Check.IgnoredRegexString.empty() && Check.IgnoredRegex.match(FileName))
67+
return;
68+
6069
SourceLocation DiagLoc = FilenameRange.getBegin().getLocWithOffset(1);
6170

6271
const std::optional<StringRef> IFE =

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

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@
1010
#define LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_BUGPRONE_SUSPICIOUSINCLUDECHECK_H
1111

1212
#include "../ClangTidyCheck.h"
13-
#include "../utils/FileExtensionsUtils.h"
1413

1514
namespace clang::tidy::bugprone {
1615

@@ -28,9 +27,12 @@ class SuspiciousIncludeCheck : public ClangTidyCheck {
2827
SuspiciousIncludeCheck(StringRef Name, ClangTidyContext *Context);
2928
void registerPPCallbacks(const SourceManager &SM, Preprocessor *PP,
3029
Preprocessor *ModuleExpanderPP) override;
30+
void storeOptions(ClangTidyOptions::OptionMap &Opts) override;
3131

3232
FileExtensionsSet HeaderFileExtensions;
3333
FileExtensionsSet ImplementationFileExtensions;
34+
StringRef IgnoredRegexString;
35+
llvm::Regex IgnoredRegex;
3436
};
3537

3638
} // namespace clang::tidy::bugprone

0 commit comments

Comments
 (0)