Skip to content

Commit 8a9aa70

Browse files
committed
Merge remote-tracking branch 'upstream/main' into lldb-dap-column-breakpoints
2 parents c239d23 + 70af40b commit 8a9aa70

File tree

781 files changed

+98413
-13149
lines changed

Some content is hidden

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

781 files changed

+98413
-13149
lines changed

bolt/test/X86/pre-aggregated-perf.test

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,15 @@ REQUIRES: system-linux
1111

1212
RUN: yaml2obj %p/Inputs/blarge.yaml &> %t.exe
1313
RUN: perf2bolt %t.exe -o %t --pa -p %p/Inputs/pre-aggregated.txt -w %t.new \
14+
RUN: --show-density \
1415
RUN: --profile-density-threshold=9 --profile-density-cutoff-hot=970000 \
1516
RUN: --profile-use-dfs | FileCheck %s --check-prefix=CHECK-P2B
1617

1718
CHECK-P2B: BOLT-INFO: 4 out of 7 functions in the binary (57.1%) have non-empty execution profile
1819
CHECK-P2B: BOLT-INFO: Functions with density >= 21.7 account for 97.00% total sample counts.
1920

2021
RUN: perf2bolt %t.exe -o %t --pa -p %p/Inputs/pre-aggregated.txt -w %t.new \
22+
RUN: --show-density \
2123
RUN: --profile-density-cutoff-hot=970000 \
2224
RUN: --profile-use-dfs 2>&1 | FileCheck %s --check-prefix=CHECK-WARNING
2325

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

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -80,9 +80,13 @@ unsigned getNumberOfDesignated(const InitListExpr *SyntacticInitList) {
8080
});
8181
}
8282

83-
AST_MATCHER(CXXRecordDecl, isAggregate) { return Node.isAggregate(); }
83+
AST_MATCHER(CXXRecordDecl, isAggregate) {
84+
return Node.hasDefinition() && Node.isAggregate();
85+
}
8486

85-
AST_MATCHER(CXXRecordDecl, isPOD) { return Node.isPOD(); }
87+
AST_MATCHER(CXXRecordDecl, isPOD) {
88+
return Node.hasDefinition() && Node.isPOD();
89+
}
8690

8791
AST_MATCHER(InitListExpr, isFullyDesignated) {
8892
if (const InitListExpr *SyntacticForm =

clang-tools-extra/clang-tidy/readability/EnumInitialValueCheck.cpp

Lines changed: 16 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -123,6 +123,13 @@ AST_MATCHER(EnumDecl, hasSequentialInitialValues) {
123123
return !AllEnumeratorsArePowersOfTwo;
124124
}
125125

126+
std::string getName(const EnumDecl *Decl) {
127+
if (!Decl->getDeclName())
128+
return "<unnamed>";
129+
130+
return Decl->getQualifiedNameAsString();
131+
}
132+
126133
} // namespace
127134

128135
EnumInitialValueCheck::EnumInitialValueCheck(StringRef Name,
@@ -160,10 +167,11 @@ void EnumInitialValueCheck::registerMatchers(MatchFinder *Finder) {
160167
void EnumInitialValueCheck::check(const MatchFinder::MatchResult &Result) {
161168
if (const auto *Enum = Result.Nodes.getNodeAs<EnumDecl>("inconsistent")) {
162169
DiagnosticBuilder Diag =
163-
diag(Enum->getBeginLoc(),
164-
"initial values in enum %0 are not consistent, consider explicit "
165-
"initialization of all, none or only the first enumerator")
166-
<< Enum;
170+
diag(
171+
Enum->getBeginLoc(),
172+
"initial values in enum '%0' are not consistent, consider explicit "
173+
"initialization of all, none or only the first enumerator")
174+
<< getName(Enum);
167175
for (const EnumConstantDecl *ECD : Enum->enumerators())
168176
if (ECD->getInitExpr() == nullptr) {
169177
const SourceLocation EndLoc = Lexer::getLocForEndOfToken(
@@ -183,16 +191,16 @@ void EnumInitialValueCheck::check(const MatchFinder::MatchResult &Result) {
183191
if (Loc.isInvalid() || Loc.isMacroID())
184192
return;
185193
DiagnosticBuilder Diag = diag(Loc, "zero initial value for the first "
186-
"enumerator in %0 can be disregarded")
187-
<< Enum;
194+
"enumerator in '%0' can be disregarded")
195+
<< getName(Enum);
188196
cleanInitialValue(Diag, ECD, *Result.SourceManager, getLangOpts());
189197
return;
190198
}
191199
if (const auto *Enum = Result.Nodes.getNodeAs<EnumDecl>("sequential")) {
192200
DiagnosticBuilder Diag =
193201
diag(Enum->getBeginLoc(),
194-
"sequential initial value in %0 can be ignored")
195-
<< Enum;
202+
"sequential initial value in '%0' can be ignored")
203+
<< getName(Enum);
196204
for (const EnumConstantDecl *ECD : llvm::drop_begin(Enum->enumerators()))
197205
cleanInitialValue(Diag, ECD, *Result.SourceManager, getLangOpts());
198206
return;

clang-tools-extra/docs/ReleaseNotes.rst

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -216,6 +216,10 @@ Changes in existing checks
216216
a false positive when only an implicit conversion happened inside an
217217
initializer list.
218218

219+
- Improved :doc:`modernize-use-designated-initializers
220+
<clang-tidy/checks/modernize/use-designated-initializers>` check to fix a
221+
crash when a class is declared but not defined.
222+
219223
- Improved :doc:`modernize-use-nullptr
220224
<clang-tidy/checks/modernize/use-nullptr>` check to also recognize
221225
``NULL``/``__null`` (but not ``0``) when used with a templated type.
@@ -249,7 +253,8 @@ Changes in existing checks
249253

250254
- Improved :doc:`readability-enum-initial-value
251255
<clang-tidy/checks/readability/enum-initial-value>` check by only issuing
252-
diagnostics for the definition of an ``enum``, and by fixing a typo in the
256+
diagnostics for the definition of an ``enum``, by not emitting a redundant
257+
file path for anonymous enums in the diagnostic, and by fixing a typo in the
253258
diagnostic.
254259

255260
- Improved :doc:`readability-implicit-bool-conversion

clang-tools-extra/test/clang-tidy/checkers/modernize/use-designated-initializers.cpp

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -201,3 +201,11 @@ DECLARE_S93;
201201
// CHECK-MESSAGES-MACROS: :[[@LINE-1]]:1: warning: use designated initializer list to initialize 'S9' [modernize-use-designated-initializers]
202202
// CHECK-MESSAGES-MACROS: :[[@LINE-4]]:28: note: expanded from macro 'DECLARE_S93'
203203
// CHECK-MESSAGES-MACROS: :[[@LINE-71]]:1: note: aggregate type is defined here
204+
205+
// Issue #113652.
206+
struct S14;
207+
208+
struct S15{
209+
S15(S14& d):d{d}{}
210+
S14& d;
211+
};

clang-tools-extra/test/clang-tidy/checkers/readability/enum-initial-value.c

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,17 @@ enum EMacro2 {
5353
// CHECK-FIXES: EMacro2_c = 3,
5454
};
5555

56+
57+
enum {
58+
// CHECK-MESSAGES: :[[@LINE-1]]:1: warning: initial values in enum '<unnamed>' are not consistent
59+
// CHECK-MESSAGES-ENABLE: :[[@LINE-2]]:1: warning: initial values in enum '<unnamed>' are not consistent
60+
EAnonymous_a = 1,
61+
EAnonymous_b,
62+
// CHECK-FIXES: EAnonymous_b = 2,
63+
EAnonymous_c = 3,
64+
};
65+
66+
5667
enum EnumZeroFirstInitialValue {
5768
EnumZeroFirstInitialValue_0 = 0,
5869
// CHECK-MESSAGES-ENABLE: :[[@LINE-1]]:3: warning: zero initial value for the first enumerator in 'EnumZeroFirstInitialValue' can be disregarded
@@ -114,4 +125,3 @@ enum WithFwdDeclSequential : int {
114125
EFS2 = 4,
115126
// CHECK-FIXES-ENABLE: EFS2 ,
116127
};
117-

clang/Maintainers.rst

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,12 @@ AST matchers
3333
| aaron\@aaronballman.com (email), aaron.ballman (Phabricator), AaronBallman (GitHub), AaronBallman (Discourse), aaronballman (Discord), AaronBallman (IRC)
3434
3535

36+
AST Visitors
37+
~~~~~~~~~~~~
38+
| Sirraide
39+
| aeternalmail\@gmail.com (email), Sirraide (GitHub), Ætérnal (Discord), Sirraide (Discourse)
40+
41+
3642
Clang LLVM IR generation
3743
~~~~~~~~~~~~~~~~~~~~~~~~
3844
| John McCall
@@ -57,6 +63,12 @@ Analysis & CFG
5763
| sgatev\@google.com (email), sgatev (Phabricator), sgatev (GitHub)
5864
5965

66+
Sema
67+
~~~~
68+
| Sirraide
69+
| aeternalmail\@gmail.com (email), Sirraide (GitHub), Ætérnal (Discord), Sirraide (Discourse)
70+
71+
6072
Experimental new constant interpreter
6173
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
6274
| Timm Bäder
@@ -71,13 +83,22 @@ Modules & serialization
7183
| Michael Spencer
7284
| bigcheesegs\@gmail.com (email), Bigcheese (Phabricator), Bigcheese (GitHub)
7385
86+
| Vassil Vassilev
87+
| Vassil.Vassilev\@cern.ch (email), v.g.vassilev (Phabricator), vgvassilev (GitHub)
88+
7489

7590
Templates
7691
~~~~~~~~~
7792
| Erich Keane
7893
| ekeane\@nvidia.com (email), ErichKeane (Phabricator), erichkeane (GitHub)
7994
8095

96+
Lambdas
97+
~~~~~~~
98+
| Corentin Jabot
99+
| corentin.jabot\@gmail.com (email), cor3ntin (Phabricator), cor3ntin (GitHub)
100+
101+
81102
Debug information
82103
~~~~~~~~~~~~~~~~~
83104
| Adrian Prantl
@@ -172,6 +193,12 @@ Attributes
172193
| ekeane\@nvidia.com (email), ErichKeane (Phabricator), erichkeane (GitHub)
173194
174195

196+
Plugins
197+
~~~~~~~
198+
| Vassil Vassilev
199+
| Vassil.Vassilev\@cern.ch (email), v.g.vassilev (Phabricator), vgvassilev (GitHub)
200+
201+
175202
Inline assembly
176203
~~~~~~~~~~~~~~~
177204
| Eric Christopher
@@ -225,6 +252,18 @@ C++ conformance
225252
| Hubert Tong
226253
| hubert.reinterpretcast\@gmail.com (email), hubert.reinterpretcast (Phabricator), hubert-reinterpretcast (GitHub)
227254
255+
| Shafik Yaghmour
256+
| shafik.yaghmour\@intel.com (email), shafik (GitHub), shafik.yaghmour (Discord), shafik (Discourse)
257+
258+
| Vlad Serebrennikov
259+
| serebrennikov.vladislav\@gmail.com (email), Endilll (GitHub), Endill (Discord), Endill (Discourse)
260+
261+
262+
C++ Defect Reports
263+
~~~~~~~~~~~~~~~~~~
264+
| Vlad Serebrennikov
265+
| serebrennikov.vladislav\@gmail.com (email), Endilll (GitHub), Endill (Discord), Endill (Discourse)
266+
228267

229268
Objective-C/C++ conformance
230269
~~~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -244,6 +283,12 @@ OpenCL conformance
244283
| anastasia\@compiler-experts.com (email), Anastasia (Phabricator), AnastasiaStulova (GitHub)
245284
246285

286+
OpenACC
287+
~~~~~~~
288+
| Erich Keane
289+
| ekeane\@nvidia.com (email), ErichKeane (Phabricator), erichkeane (GitHub)
290+
291+
247292
SYCL conformance
248293
~~~~~~~~~~~~~~~~
249294
| Alexey Bader

clang/docs/AddressSanitizer.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ Typical slowdown introduced by AddressSanitizer is **2x**.
2626
How to build
2727
============
2828

29-
Build LLVM/Clang with `CMake <https://llvm.org/docs/CMake.html>` and enable
29+
Build LLVM/Clang with `CMake <https://llvm.org/docs/CMake.html>`_ and enable
3030
the ``compiler-rt`` runtime. An example CMake configuration that will allow
3131
for the use/testing of AddressSanitizer:
3232

0 commit comments

Comments
 (0)