Skip to content

Commit 50d7ee1

Browse files
authored
Merge branch 'main' into vplan-retain-exits
2 parents 1211faf + 5b29058 commit 50d7ee1

File tree

406 files changed

+12939
-3290
lines changed

Some content is hidden

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

406 files changed

+12939
-3290
lines changed

clang-tools-extra/clang-doc/Representation.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@ struct CommentInfo {
6060
// the vector.
6161
bool operator<(const CommentInfo &Other) const;
6262

63+
// TODO: The Kind field should be an enum, so we can switch on it easily.
6364
SmallString<16>
6465
Kind; // Kind of comment (FullComment, ParagraphComment, TextComment,
6566
// InlineCommandComment, HTMLStartTagComment, HTMLEndTagComment,
@@ -534,6 +535,7 @@ struct ClangDocContext {
534535
std::vector<std::string> UserStylesheets;
535536
// JavaScript files that will be imported in all HTML files.
536537
std::vector<std::string> JsScripts;
538+
// Base directory for remote repositories.
537539
StringRef Base;
538540
Index Idx;
539541
};

clang/docs/ClangFormatStyleOptions.rst

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6127,6 +6127,16 @@ the configuration (without a prefix: ``Auto``).
61276127
true: false:
61286128
! someExpression(); vs. !someExpression();
61296129

6130+
.. _SpaceAfterOperatorKeyword:
6131+
6132+
**SpaceAfterOperatorKeyword** (``Boolean``) :versionbadge:`clang-format 21` :ref:`<SpaceAfterOperatorKeyword>`
6133+
If ``true``, a space will be inserted after the ``operator`` keyword.
6134+
6135+
.. code-block:: c++
6136+
6137+
true: false:
6138+
bool operator ==(int a); vs. bool operator==(int a);
6139+
61306140
.. _SpaceAfterTemplateKeyword:
61316141

61326142
**SpaceAfterTemplateKeyword** (``Boolean``) :versionbadge:`clang-format 4` :ref:`<SpaceAfterTemplateKeyword>`

clang/docs/ReleaseNotes.rst

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -319,6 +319,8 @@ Modified Compiler Flags
319319

320320
- The ``-mexecute-only`` and ``-mpure-code`` flags are now accepted for AArch64 targets. (#GH125688)
321321

322+
- The ``-fchar8_t`` flag is no longer considered in non-C++ languages modes. (#GH55373)
323+
322324
Removed Compiler Flags
323325
-------------------------
324326

@@ -505,6 +507,9 @@ Improvements to Clang's diagnostics
505507
- ``-Wreserved-identifier`` now fires on reserved parameter names in a function
506508
declaration which is not a definition.
507509

510+
- Several compatibility diagnostics that were incorrectly being grouped under
511+
``-Wpre-c++20-compat`` are now part of ``-Wc++20-compat``. (#GH138775)
512+
508513
Improvements to Clang's time-trace
509514
----------------------------------
510515

@@ -561,6 +566,8 @@ Bug Fixes in This Version
561566
the invalid attribute location appropriately. (#GH137861)
562567
- Fixed a crash when a malformed ``_Pragma`` directive appears as part of an
563568
``#include`` directive. (#GH138094)
569+
- Fixed a crash during constant evaluation involving invalid lambda captures
570+
(#GH138832)
564571

565572
Bug Fixes to Compiler Builtins
566573
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -805,6 +812,7 @@ clang-format
805812
- Add ``EnumTrailingComma`` option for inserting/removing commas at the end of
806813
``enum`` enumerator lists.
807814
- Add ``OneLineFormatOffRegex`` option for turning formatting off for one line.
815+
- Add ``SpaceAfterOperatorKeyword`` option.
808816

809817
libclang
810818
--------

clang/include/clang/APINotes/Types.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -737,6 +737,7 @@ class TagInfo : public CommonTypeInfo {
737737
std::optional<std::string> SwiftImportAs;
738738
std::optional<std::string> SwiftRetainOp;
739739
std::optional<std::string> SwiftReleaseOp;
740+
std::optional<std::string> SwiftDefaultOwnership;
740741

741742
/// The Swift protocol that this type should be automatically conformed to.
742743
std::optional<std::string> SwiftConformance;
@@ -786,6 +787,8 @@ class TagInfo : public CommonTypeInfo {
786787
SwiftRetainOp = RHS.SwiftRetainOp;
787788
if (!SwiftReleaseOp)
788789
SwiftReleaseOp = RHS.SwiftReleaseOp;
790+
if (!SwiftDefaultOwnership)
791+
SwiftDefaultOwnership = RHS.SwiftDefaultOwnership;
789792

790793
if (!SwiftConformance)
791794
SwiftConformance = RHS.SwiftConformance;
@@ -815,6 +818,7 @@ inline bool operator==(const TagInfo &LHS, const TagInfo &RHS) {
815818
LHS.SwiftImportAs == RHS.SwiftImportAs &&
816819
LHS.SwiftRetainOp == RHS.SwiftRetainOp &&
817820
LHS.SwiftReleaseOp == RHS.SwiftReleaseOp &&
821+
LHS.SwiftDefaultOwnership == RHS.SwiftDefaultOwnership &&
818822
LHS.SwiftConformance == RHS.SwiftConformance &&
819823
LHS.isFlagEnum() == RHS.isFlagEnum() &&
820824
LHS.isSwiftCopyable() == RHS.isSwiftCopyable() &&

clang/include/clang/AST/DeclCXX.h

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3864,8 +3864,7 @@ class UsingPackDecl final
38643864
InstantiatedFrom ? InstantiatedFrom->getDeclName()
38653865
: DeclarationName()),
38663866
InstantiatedFrom(InstantiatedFrom), NumExpansions(UsingDecls.size()) {
3867-
std::uninitialized_copy(UsingDecls.begin(), UsingDecls.end(),
3868-
getTrailingObjects<NamedDecl *>());
3867+
llvm::uninitialized_copy(UsingDecls, getTrailingObjects<NamedDecl *>());
38693868
}
38703869

38713870
void anchor() override;
@@ -4236,8 +4235,7 @@ class DecompositionDecl final
42364235
: VarDecl(Decomposition, C, DC, StartLoc, LSquareLoc, nullptr, T, TInfo,
42374236
SC),
42384237
NumBindings(Bindings.size()) {
4239-
std::uninitialized_copy(Bindings.begin(), Bindings.end(),
4240-
getTrailingObjects<BindingDecl *>());
4238+
llvm::uninitialized_copy(Bindings, getTrailingObjects<BindingDecl *>());
42414239
for (auto *B : Bindings) {
42424240
B->setDecomposedDecl(this);
42434241
if (B->isParameterPack() && B->getBinding()) {

clang/include/clang/AST/DeclOpenACC.h

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
#include "clang/AST/Decl.h"
1919
#include "clang/AST/OpenACCClause.h"
2020
#include "clang/Basic/OpenACCKinds.h"
21+
#include "llvm/ADT/STLExtras.h"
2122

2223
namespace clang {
2324

@@ -85,8 +86,8 @@ class OpenACCDeclareDecl final
8586
: OpenACCConstructDecl(OpenACCDeclare, DC, OpenACCDirectiveKind::Declare,
8687
StartLoc, DirLoc, EndLoc) {
8788
// Initialize the trailing storage.
88-
std::uninitialized_copy(Clauses.begin(), Clauses.end(),
89-
getTrailingObjects<const OpenACCClause *>());
89+
llvm::uninitialized_copy(Clauses,
90+
getTrailingObjects<const OpenACCClause *>());
9091

9192
setClauseList(MutableArrayRef(getTrailingObjects<const OpenACCClause *>(),
9293
Clauses.size()));
@@ -136,8 +137,8 @@ class OpenACCRoutineDecl final
136137
assert(LParenLoc.isValid() &&
137138
"Cannot represent implicit name with this declaration");
138139
// Initialize the trailing storage.
139-
std::uninitialized_copy(Clauses.begin(), Clauses.end(),
140-
getTrailingObjects<const OpenACCClause *>());
140+
llvm::uninitialized_copy(Clauses,
141+
getTrailingObjects<const OpenACCClause *>());
141142
setClauseList(MutableArrayRef(getTrailingObjects<const OpenACCClause *>(),
142143
Clauses.size()));
143144
}

clang/include/clang/AST/ExprCXX.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@
4141
#include "clang/Basic/TypeTraits.h"
4242
#include "llvm/ADT/ArrayRef.h"
4343
#include "llvm/ADT/PointerUnion.h"
44+
#include "llvm/ADT/STLExtras.h"
4445
#include "llvm/ADT/StringRef.h"
4546
#include "llvm/ADT/iterator_range.h"
4647
#include "llvm/Support/Casting.h"
@@ -4417,7 +4418,7 @@ class SizeOfPackExpr final
44174418
assert((!Length || PartialArgs.empty()) &&
44184419
"have partial args for non-dependent sizeof... expression");
44194420
auto *Args = getTrailingObjects<TemplateArgument>();
4420-
std::uninitialized_copy(PartialArgs.begin(), PartialArgs.end(), Args);
4421+
llvm::uninitialized_copy(PartialArgs, Args);
44214422
setDependence(Length ? ExprDependence::None
44224423
: ExprDependence::ValueInstantiation);
44234424
}
@@ -4522,8 +4523,7 @@ class PackIndexingExpr final
45224523
FullySubstituted(FullySubstituted) {
45234524

45244525
auto *Exprs = getTrailingObjects<Expr *>();
4525-
std::uninitialized_copy(SubstitutedExprs.begin(), SubstitutedExprs.end(),
4526-
Exprs);
4526+
llvm::uninitialized_copy(SubstitutedExprs, Exprs);
45274527

45284528
setDependence(computeDependence(this));
45294529
if (!isInstantiationDependent())

0 commit comments

Comments
 (0)