Skip to content

Commit 4e5cd92

Browse files
author
Jenkins
committed
merge main into amd-staging
Change-Id: Ibacee83801af931c5120f819365c57afc58851fc
2 parents 3031de4 + ffab5a0 commit 4e5cd92

File tree

41 files changed

+1882
-1537
lines changed

Some content is hidden

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

41 files changed

+1882
-1537
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@ IncludeModernizePPCallbacks::IncludeModernizePPCallbacks(
157157
{"wctype.h", "cwctype"}})) {
158158
CStyledHeaderToCxx.insert(KeyValue);
159159
}
160-
// Add C++ 11 headers.
160+
// Add C++11 headers.
161161
if (LangOpts.CPlusPlus11) {
162162
for (const auto &KeyValue :
163163
std::vector<std::pair<llvm::StringRef, std::string>>(

clang-tools-extra/docs/clang-tidy/checks/modernize/deprecated-headers.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ modernize-deprecated-headers
44
============================
55

66
Some headers from C library were deprecated in C++ and are no longer welcome in
7-
C++ codebases. Some have no effect in C++. For more details refer to the C++ 14
7+
C++ codebases. Some have no effect in C++. For more details refer to the C++14
88
Standard [depr.c.headers] section.
99

1010
This check replaces C standard library headers with their C++ alternatives and

clang-tools-extra/docs/clang-tidy/checks/modernize/use-override.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ removes ``virtual`` from those functions as it is not required.
1010
user that a function was virtual. C++ compilers did not use the presence of
1111
this to signify an overridden function.
1212

13-
In C++ 11 ``override`` and ``final`` keywords were introduced to allow
13+
In C++11 ``override`` and ``final`` keywords were introduced to allow
1414
overridden functions to be marked appropriately. Their presence allows
1515
compilers to verify that an overridden function correctly overrides a base
1616
class implementation.

clang-tools-extra/docs/clang-tidy/checks/readability/container-contains.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
readability-container-contains
44
==============================
55

6-
Finds usages of ``container.count()`` and ``container.find() == container.end()`` which should be replaced by a call to the ``container.contains()`` method introduced in C++ 20.
6+
Finds usages of ``container.count()`` and ``container.find() == container.end()`` which should be replaced by a call to the ``container.contains()`` method introduced in C++20.
77

88
Whether an element is contained inside a container should be checked with ``contains`` instead of ``count``/``find`` because ``contains`` conveys the intent more clearly. Furthermore, for containers which permit multiple entries per key (``multimap``, ``multiset``, ...), ``contains`` is more efficient than ``count`` because ``count`` has to do unnecessary additional work.
99

clang-tools-extra/docs/clang-tidy/checks/readability/use-anyofallof.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ readability-use-anyofallof
44
==========================
55

66
Finds range-based for loops that can be replaced by a call to ``std::any_of`` or
7-
``std::all_of``. In C++ 20 mode, suggests ``std::ranges::any_of`` or
7+
``std::all_of``. In C++20 mode, suggests ``std::ranges::any_of`` or
88
``std::ranges::all_of``.
99

1010
Example:

clang/include/clang/AST/RawCommentList.h

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -175,17 +175,22 @@ class RawComment {
175175
mutable StringRef RawText;
176176
mutable const char *BriefText = nullptr;
177177

178-
mutable bool RawTextValid : 1; ///< True if RawText is valid
179-
mutable bool BriefTextValid : 1; ///< True if BriefText is valid
178+
LLVM_PREFERRED_TYPE(bool)
179+
mutable unsigned RawTextValid : 1;
180+
LLVM_PREFERRED_TYPE(bool)
181+
mutable unsigned BriefTextValid : 1;
180182

181183
LLVM_PREFERRED_TYPE(CommentKind)
182184
unsigned Kind : 3;
183185

184186
/// True if comment is attached to a declaration in ASTContext.
185-
bool IsAttached : 1;
187+
LLVM_PREFERRED_TYPE(bool)
188+
unsigned IsAttached : 1;
186189

187-
bool IsTrailingComment : 1;
188-
bool IsAlmostTrailingComment : 1;
190+
LLVM_PREFERRED_TYPE(bool)
191+
unsigned IsTrailingComment : 1;
192+
LLVM_PREFERRED_TYPE(bool)
193+
unsigned IsAlmostTrailingComment : 1;
189194

190195
/// Constructor for AST deserialization.
191196
RawComment(SourceRange SR, CommentKind K, bool IsTrailingComment,

clang/include/clang/AST/StmtObjC.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,8 @@ class ObjCAtTryStmt final
177177
unsigned NumCatchStmts : 16;
178178

179179
// Whether this statement has a \@finally statement.
180-
bool HasFinally : 1;
180+
LLVM_PREFERRED_TYPE(bool)
181+
unsigned HasFinally : 1;
181182

182183
/// Retrieve the statements that are stored after this \@try statement.
183184
///

clang/include/clang/Basic/Module.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ class alignas(8) Module {
118118
/// of header files.
119119
ModuleMapModule,
120120

121-
/// This is a C++ 20 header unit.
121+
/// This is a C++20 header unit.
122122
ModuleHeaderUnit,
123123

124124
/// This is a C++20 module interface unit.
@@ -127,10 +127,10 @@ class alignas(8) Module {
127127
/// This is a C++20 module implementation unit.
128128
ModuleImplementationUnit,
129129

130-
/// This is a C++ 20 module partition interface.
130+
/// This is a C++20 module partition interface.
131131
ModulePartitionInterface,
132132

133-
/// This is a C++ 20 module partition implementation.
133+
/// This is a C++20 module partition implementation.
134134
ModulePartitionImplementation,
135135

136136
/// This is the explicit Global Module Fragment of a modular TU.

clang/include/clang/Sema/Sema.h

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3501,37 +3501,37 @@ class Sema final {
35013501

35023502
/// For a defaulted function, the kind of defaulted function that it is.
35033503
class DefaultedFunctionKind {
3504-
CXXSpecialMember SpecialMember : 8;
3505-
DefaultedComparisonKind Comparison : 8;
3504+
unsigned SpecialMember : 8;
3505+
unsigned Comparison : 8;
35063506

35073507
public:
35083508
DefaultedFunctionKind()
3509-
: SpecialMember(CXXInvalid), Comparison(DefaultedComparisonKind::None) {
3509+
: SpecialMember(CXXInvalid), Comparison(llvm::to_underlying(DefaultedComparisonKind::None)) {
35103510
}
35113511
DefaultedFunctionKind(CXXSpecialMember CSM)
3512-
: SpecialMember(CSM), Comparison(DefaultedComparisonKind::None) {}
3512+
: SpecialMember(CSM), Comparison(llvm::to_underlying(DefaultedComparisonKind::None)) {}
35133513
DefaultedFunctionKind(DefaultedComparisonKind Comp)
3514-
: SpecialMember(CXXInvalid), Comparison(Comp) {}
3514+
: SpecialMember(CXXInvalid), Comparison(llvm::to_underlying(Comp)) {}
35153515

35163516
bool isSpecialMember() const { return SpecialMember != CXXInvalid; }
35173517
bool isComparison() const {
3518-
return Comparison != DefaultedComparisonKind::None;
3518+
return static_cast<DefaultedComparisonKind>(Comparison) != DefaultedComparisonKind::None;
35193519
}
35203520

35213521
explicit operator bool() const {
35223522
return isSpecialMember() || isComparison();
35233523
}
35243524

3525-
CXXSpecialMember asSpecialMember() const { return SpecialMember; }
3526-
DefaultedComparisonKind asComparison() const { return Comparison; }
3525+
CXXSpecialMember asSpecialMember() const { return static_cast<CXXSpecialMember>(SpecialMember); }
3526+
DefaultedComparisonKind asComparison() const { return static_cast<DefaultedComparisonKind>(Comparison); }
35273527

35283528
/// Get the index of this function kind for use in diagnostics.
35293529
unsigned getDiagnosticIndex() const {
35303530
static_assert(CXXInvalid > CXXDestructor,
35313531
"invalid should have highest index");
35323532
static_assert((unsigned)DefaultedComparisonKind::None == 0,
35333533
"none should be equal to zero");
3534-
return SpecialMember + (unsigned)Comparison;
3534+
return SpecialMember + Comparison;
35353535
}
35363536
};
35373537

clang/include/clang/Support/RISCVVIntrinsicUtils.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -554,7 +554,9 @@ struct RVVIntrinsicRecord {
554554
bool HasMaskPolicy : 1;
555555
bool HasFRMRoundModeOp : 1;
556556
bool IsTuple : 1;
557+
LLVM_PREFERRED_TYPE(PolicyScheme)
557558
uint8_t UnMaskedPolicyScheme : 2;
559+
LLVM_PREFERRED_TYPE(PolicyScheme)
558560
uint8_t MaskedPolicyScheme : 2;
559561
};
560562

0 commit comments

Comments
 (0)