Skip to content

Commit a13fe54

Browse files
committed
Merge remote-tracking branch 'origin/main' into vplan-exit-checks
2 parents b47eab3 + 95eb49a commit a13fe54

File tree

605 files changed

+36392
-18847
lines changed

Some content is hidden

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

605 files changed

+36392
-18847
lines changed

.ci/metrics/metrics.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
"https://influx-prod-13-prod-us-east-0.grafana.net/api/v1/push/influx/write"
1313
)
1414
GITHUB_PROJECT = "llvm/llvm-project"
15-
WORKFLOWS_TO_TRACK = ["Check code formatting"]
15+
WORKFLOWS_TO_TRACK = ["Check code formatting", "LLVM Premerge Checks"]
1616
SCRAPE_INTERVAL_SECONDS = 5 * 60
1717

1818

.git-blame-ignore-revs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,3 +97,6 @@ e80bc777749331e9519575f416c342f7626dd14d
9797

9898
# NFC: clang-format test_demangle.pass.cpp but keep test "lines"
9999
d33bf2e9df578ff7e44fd22504d6ad5a122b7ee6
100+
101+
# [lldb][NFC] clang-format MainLoopPosix.cpp
102+
66bdbfbaa08fa3d8e64a7fe136a8fb717f5cdbb7

.github/CODEOWNERS

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@
129129
/mlir/**/Transforms/SROA.* @moxinilian
130130

131131
# BOLT
132-
/bolt/ @aaupov @maksfb @rafaelauler @ayermolo @dcci
132+
/bolt/ @aaupov @maksfb @rafaelauler @ayermolo @dcci @yota9
133133

134134
# Bazel build system.
135135
/utils/bazel/ @rupprecht @keith

.github/workflows/docs.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -106,9 +106,9 @@ jobs:
106106
with:
107107
python-version: '3.11'
108108
cache: 'pip'
109-
cache-dependency-path: 'llvm/docs/requirements.txt'
109+
cache-dependency-path: 'llvm/docs/requirements-hashed.txt'
110110
- name: Install python dependencies
111-
run: pip install -r llvm/docs/requirements.txt
111+
run: pip install -r llvm/docs/requirements-hashed.txt
112112
- name: Install system dependencies
113113
run: |
114114
sudo apt-get update

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

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -57,10 +57,9 @@ struct MissingIncludeInfo {
5757
IncludeCleanerCheck::IncludeCleanerCheck(StringRef Name,
5858
ClangTidyContext *Context)
5959
: ClangTidyCheck(Name, Context),
60-
IgnoreHeaders(utils::options::parseStringList(
61-
Options.getLocalOrGlobal("IgnoreHeaders", ""))),
62-
DeduplicateFindings(
63-
Options.getLocalOrGlobal("DeduplicateFindings", true)) {
60+
IgnoreHeaders(
61+
utils::options::parseStringList(Options.get("IgnoreHeaders", ""))),
62+
DeduplicateFindings(Options.get("DeduplicateFindings", true)) {
6463
for (const auto &Header : IgnoreHeaders) {
6564
if (!llvm::Regex{Header}.isValid())
6665
configurationDiag("Invalid ignore headers regex '%0'") << Header;

clang-tools-extra/clang-tidy/readability/InconsistentDeclarationParameterNameCheck.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ class InconsistentDeclarationParameterNameCheck : public ClangTidyCheck {
2626
ClangTidyContext *Context)
2727
: ClangTidyCheck(Name, Context),
2828
IgnoreMacros(Options.getLocalOrGlobal("IgnoreMacros", true)),
29-
Strict(Options.getLocalOrGlobal("Strict", false)) {}
29+
Strict(Options.get("Strict", false)) {}
3030

3131
void storeOptions(ClangTidyOptions::OptionMap &Opts) override;
3232
void registerMatchers(ast_matchers::MatchFinder *Finder) override;

clang-tools-extra/clangd/unittests/DumpASTTests.cpp

Lines changed: 37 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ declaration: Function - root
4949
)"},
5050
{R"cpp(
5151
namespace root {
52-
struct S { static const int x = 0; };
52+
struct S { static const int x = 0; ~S(); };
5353
int y = S::x + root::S().x;
5454
}
5555
)cpp",
@@ -60,10 +60,12 @@ declaration: Namespace - root
6060
type: Qualified - const
6161
type: Builtin - int
6262
expression: IntegerLiteral - 0
63+
declaration: CXXDestructor
64+
type: Record - S
65+
type: FunctionProto
66+
type: Builtin - void
6367
declaration: CXXConstructor
6468
declaration: CXXConstructor
65-
declaration: CXXConstructor
66-
declaration: CXXDestructor
6769
declaration: Var - y
6870
type: Builtin - int
6971
expression: ExprWithCleanups
@@ -74,14 +76,45 @@ declaration: Namespace - root
7476
type: Record - S
7577
expression: ImplicitCast - LValueToRValue
7678
expression: Member - x
77-
expression: MaterializeTemporary - rvalue
79+
expression: CXXBindTemporary
7880
expression: CXXTemporaryObject - S
7981
type: Elaborated
8082
specifier: Namespace - root::
8183
type: Record - S
8284
)"},
8385
{R"cpp(
8486
namespace root {
87+
struct S { static const int x = 0; };
88+
int y = S::x + root::S().x;
89+
}
90+
)cpp",
91+
R"(
92+
declaration: Namespace - root
93+
declaration: CXXRecord - S
94+
declaration: Var - x
95+
type: Qualified - const
96+
type: Builtin - int
97+
expression: IntegerLiteral - 0
98+
declaration: CXXConstructor
99+
declaration: CXXConstructor
100+
declaration: CXXConstructor
101+
declaration: CXXDestructor
102+
declaration: Var - y
103+
type: Builtin - int
104+
expression: BinaryOperator - +
105+
expression: ImplicitCast - LValueToRValue
106+
expression: DeclRef - x
107+
specifier: TypeSpec
108+
type: Record - S
109+
expression: ImplicitCast - LValueToRValue
110+
expression: Member - x
111+
expression: CXXTemporaryObject - S
112+
type: Elaborated
113+
specifier: Namespace - root::
114+
type: Record - S
115+
)"},
116+
{R"cpp(
117+
namespace root {
85118
template <typename T> int tmpl() {
86119
(void)tmpl<unsigned>();
87120
return T::value;

clang-tools-extra/docs/ReleaseNotes.rst

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,24 @@ Improvements to clang-tidy
115115
- Improved :program:`run-clang-tidy.py` script. Fixed minor shutdown noise
116116
happening on certain platforms when interrupting the script.
117117

118+
- Removed :program:`clang-tidy`'s global options for most of checks. All options
119+
are changed to local options except `IncludeStyle`, `StrictMode` and
120+
`IgnoreMacros`.
121+
122+
.. csv-table::
123+
:header: "Check", "Options removed from global option"
124+
125+
:doc:`bugprone-reserved-identifier <clang-tidy/checks/bugprone/reserved-identifier>`, AggressiveDependentMemberLookup
126+
:doc:`bugprone-unchecked-optional-access <clang-tidy/checks/bugprone/unchecked-optional-access>`, IgnoreSmartPointerDereference
127+
:doc:`cppcoreguidelines-pro-type-member-init <clang-tidy/checks/cppcoreguidelines/pro-type-member-init>`, UseAssignment
128+
:doc:`cppcoreguidelines-rvalue-reference-param-not-moved <clang-tidy/checks/cppcoreguidelines/rvalue-reference-param-not-moved>`, AllowPartialMove; IgnoreUnnamedParams; IgnoreNonDeducedTemplateTypes
129+
:doc:`misc-include-cleaner <clang-tidy/checks/misc/include-cleaner>`, IgnoreHeaders; DeduplicateFindings
130+
:doc:`performance-inefficient-vector-operation <clang-tidy/checks/performance/inefficient-vector-operation>`, EnableProto
131+
:doc:`readability-identifier-naming <clang-tidy/checks/readability/identifier-naming>`, AggressiveDependentMemberLookup
132+
:doc:`readability-inconsistent-declaration-parameter-name <clang-tidy/checks/readability/inconsistent-declaration-parameter-name>`, Strict
133+
:doc:`readability-redundant-access-specifiers <clang-tidy/checks/readability/redundant-access-specifiers>`, CheckFirstDeclaration
134+
:doc:`readability-redundant-casting <clang-tidy/checks/readability/redundant-casting>`, IgnoreTypeAliases
135+
118136
New checks
119137
^^^^^^^^^^
120138

Lines changed: 136 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,136 @@
1+
// RUN: rm -rf %t
2+
// RUN: mkdir -p %t/yaml %t/md
3+
4+
// RUN: clang-doc --doxygen --executor=standalone %s -output=%t/yaml
5+
// RUN: FileCheck %s < %t/yaml/index.yaml --check-prefix=YAML
6+
7+
// RUN: clang-doc --doxygen --executor=standalone %s -output=%t/md --format=md
8+
// RUN: FileCheck %s < %t/md/GlobalNamespace/index.md --check-prefix=MD
9+
10+
// YAML: ---
11+
// YAML-NEXT: USR: '0000000000000000000000000000000000000000'
12+
// YAML-NEXT: ChildFunctions:
13+
14+
// MD: # Global Namespace
15+
// MD: ## Functions
16+
17+
extern bool b();
18+
19+
// YAML-NEXT: - USR: '88A104C263241E354ECF5B55B04AE8CEAD625B71'
20+
// YAML-NEXT: Name: 'b'
21+
// YAML-NEXT: Location:
22+
// YAML-NEXT: - LineNumber: [[# @LINE-5]]
23+
// YAML-NEXT: Filename: '{{.*}}'
24+
// YAML-NEXT: ReturnType:
25+
// YAML-NEXT: Type:
26+
// YAML-NEXT: Name: '_Bool'
27+
// YAML-NEXT: QualName: '_Bool'
28+
29+
// MD: ### b
30+
// MD: *_Bool b()*
31+
32+
char c();
33+
34+
// YAML-NEXT: - USR: 'EA3287837B3F175C8DB154406B4DAD2924F479B5'
35+
// YAML-NEXT: Name: 'c'
36+
// YAML-NEXT: Location:
37+
// YAML-NEXT: - LineNumber: [[# @LINE-5]]
38+
// YAML-NEXT: Filename: '{{.*}}'
39+
// YAML-NEXT: ReturnType:
40+
// YAML-NEXT: Type:
41+
// YAML-NEXT: Name: 'char'
42+
// YAML-NEXT: QualName: 'char'
43+
44+
// MD: ### c
45+
// MD: *char c()*
46+
47+
double d();
48+
49+
// YAML-NEXT: - USR: '60A47E4696CEFC411AB2E1EEFA2DD914E2A7E450'
50+
// YAML-NEXT: Name: 'd'
51+
// YAML-NEXT: Location:
52+
// YAML-NEXT: - LineNumber: [[# @LINE-5]]
53+
// YAML-NEXT: Filename: '{{.*}}'
54+
// YAML-NEXT: ReturnType:
55+
// YAML-NEXT: Type:
56+
// YAML-NEXT: Name: 'double'
57+
// YAML-NEXT: QualName: 'double'
58+
59+
// MD: ### d
60+
// MD: *double d()*
61+
62+
float f();
63+
64+
// YAML-NEXT: - USR: 'B3A9EC6BECD5869CF3ACDFB25153CFE6BBDD5EAB'
65+
// YAML-NEXT: Name: 'f'
66+
// YAML-NEXT: Location:
67+
// YAML-NEXT: - LineNumber: [[# @LINE-5]]
68+
// YAML-NEXT: Filename: '{{.*}}'
69+
// YAML-NEXT: ReturnType:
70+
// YAML-NEXT: Type:
71+
// YAML-NEXT: Name: 'float'
72+
// YAML-NEXT: QualName: 'float'
73+
74+
// MD: ### f
75+
// MD: *float f()*
76+
77+
int i();
78+
79+
// YAML-NEXT: - USR: '307041280A81EB46F949A94AD52587C659FD801C'
80+
// YAML-NEXT: Name: 'i'
81+
// YAML-NEXT: Location:
82+
// YAML-NEXT: - LineNumber: [[# @LINE-5]]
83+
// YAML-NEXT: Filename: '{{.*}}'
84+
// YAML-NEXT: ReturnType:
85+
// YAML-NEXT: Type:
86+
// YAML-NEXT: Name: 'int'
87+
// YAML-NEXT: QualName: 'int'
88+
89+
// MD: ### i
90+
// MD: *int i()*
91+
92+
long l();
93+
94+
// YAML-NEXT: - USR: 'A1CE9AB0064C412F857592E01332C641C1A06F37'
95+
// YAML-NEXT: Name: 'l'
96+
// YAML-NEXT: Location:
97+
// YAML-NEXT: - LineNumber: [[# @LINE-5]]
98+
// YAML-NEXT: Filename: '{{.*}}'
99+
// YAML-NEXT: ReturnType:
100+
// YAML-NEXT: Type:
101+
// YAML-NEXT: Name: 'long'
102+
// YAML-NEXT: QualName: 'long'
103+
104+
// MD: ### l
105+
// MD: *long l()*
106+
107+
long long ll();
108+
109+
// YAML-NEXT: - USR: '5C2C44ED4825C066EF6ED796863586F343C8BCA9'
110+
// YAML-NEXT: Name: 'll'
111+
// YAML-NEXT: Location:
112+
// YAML-NEXT: - LineNumber: [[# @LINE-5]]
113+
// YAML-NEXT: Filename: '{{.*}}'
114+
// YAML-NEXT: ReturnType:
115+
// YAML-NEXT: Type:
116+
// YAML-NEXT: Name: 'long long'
117+
// YAML-NEXT: QualName: 'long long'
118+
119+
// MD: ### ll
120+
// MD: *long long ll()*
121+
122+
short s();
123+
124+
// YAML-NEXT: - USR: '412341570FD3AD2C3A1E9A1DE7B3C01C07BEACFE'
125+
// YAML-NEXT: Name: 's'
126+
// YAML-NEXT: Location:
127+
// YAML-NEXT: - LineNumber: [[# @LINE-5]]
128+
// YAML-NEXT: Filename: '{{.*}}'
129+
// YAML-NEXT: ReturnType:
130+
// YAML-NEXT: Type:
131+
// YAML-NEXT: Name: 'short'
132+
// YAML-NEXT: QualName: 'short'
133+
// YAML-NEXT: ...
134+
135+
// MD: ### s
136+
// MD: *short s()*

clang-tools-extra/test/clang-tidy/checkers/bugprone/argument-comment-strict.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// RUN: %check_clang_tidy %s bugprone-argument-comment %t -- \
2-
// RUN: -config="{CheckOptions: {StrictMode: true}}" --
2+
// RUN: -config="{CheckOptions: {bugprone-argument-comment.StrictMode: true}}" --
33

44
void f(int _with_underscores_);
55
void g(int x_);

0 commit comments

Comments
 (0)