Skip to content

Commit 5ae76a0

Browse files
authored
Merge branch 'main' into add-clang-tidy-long-double
2 parents 1082254 + 17bddd1 commit 5ae76a0

File tree

725 files changed

+64158
-18770
lines changed

Some content is hidden

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

725 files changed

+64158
-18770
lines changed

bolt/runtime/instr.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -714,9 +714,11 @@ static char *getBinaryPath() {
714714
uint32_t Ret = __readlink(FindBuf, TargetPath, sizeof(TargetPath));
715715
assert(Ret != -1 && Ret != BufSize, "readlink error");
716716
TargetPath[Ret] = '\0';
717+
__close(FDdir);
717718
return TargetPath;
718719
}
719720
}
721+
__close(FDdir);
720722
return nullptr;
721723
}
722724

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ struct IntegerLiteralCheck {
2929
// integer (wb), and can be a complex number ('i', 'j'). In MS compatibility
3030
// mode, suffixes like i32 are supported.
3131
static constexpr llvm::StringLiteral Suffixes =
32-
llvm::StringLiteral("uUlLzZwWbBiIjJ");
32+
llvm::StringLiteral("uUlLzZwWiIjJ");
3333
};
3434

3535
struct FloatingLiteralCheck {

clang-tools-extra/test/clang-tidy/checkers/cert/uppercase-literal-suffix-integer.cpp

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -128,3 +128,12 @@ void integer_suffix() {
128128
static_assert(is_same<decltype(v24), const unsigned long long>::value, "");
129129
static_assert(v24 == 1, "");
130130
}
131+
132+
void no_warning_on_hex_literals() {
133+
int a = 0xa;
134+
int b = 0xb;
135+
int c = 0xc;
136+
int d = 0xd;
137+
int e = 0xe;
138+
int f = 0xf;
139+
}

clang/docs/OpenMPSupport.rst

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -443,7 +443,8 @@ implementation.
443443
+-------------------------------------------------------------+---------------------------+---------------------------+--------------------------------------------------------------------------+
444444
| Traits for default device envirable | :none:`unclaimed` | :none:`unclaimed` | |
445445
+-------------------------------------------------------------+---------------------------+---------------------------+--------------------------------------------------------------------------+
446-
| Optionally omit array length expression | :good:`done` | :none:`unclaimed` | https://github.com/llvm/llvm-project/pull/148048 |
446+
| Optionally omit array length expression | :good:`done` | :none:`unclaimed` | (Parse) https://github.com/llvm/llvm-project/pull/148048, |
447+
| | | | (Sema) https://github.com/llvm/llvm-project/pull/152786 |
447448
+-------------------------------------------------------------+---------------------------+---------------------------+--------------------------------------------------------------------------+
448449
| Canonical loop sequences | :none:`unclaimed` | :part:`In Progress` | |
449450
+-------------------------------------------------------------+---------------------------+---------------------------+--------------------------------------------------------------------------+

clang/docs/ReleaseNotes.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -482,6 +482,7 @@ OpenMP Support
482482
modifier in the ``adjust_args`` clause.
483483
- Allow array length to be omitted in array section subscript expression.
484484
- Fixed non-contiguous strided update in the ``omp target update`` directive with the ``from`` clause.
485+
- Properly handle array section/assumed-size array privatization in C/C++.
485486

486487
Improvements
487488
^^^^^^^^^^^^

clang/docs/analyzer/checkers.rst

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -2932,18 +2932,6 @@ the locking/unlocking of ``mtx_t`` mutexes.
29322932
mtx_lock(&mtx1); // warn: This lock has already been acquired
29332933
}
29342934
2935-
.. _alpha-core-CastSize:
2936-
2937-
alpha.core.CastSize (C)
2938-
"""""""""""""""""""""""
2939-
Check when casting a malloc'ed type ``T``, whether the size is a multiple of the size of ``T``.
2940-
2941-
.. code-block:: c
2942-
2943-
void test() {
2944-
int *x = (int *) malloc(11); // warn
2945-
}
2946-
29472935
.. _alpha-core-CastToStruct:
29482936
29492937
alpha.core.CastToStruct (C, C++)

clang/include/clang/Basic/Attr.td

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -979,7 +979,7 @@ def AnalyzerNoReturn : InheritableAttr {
979979
}
980980

981981
def InferredNoReturn : InheritableAttr {
982-
let Spellings = [];
982+
let Spellings = [];
983983
let SemaHandler = 0;
984984
let Subjects = SubjectList<[Function], ErrorDiag>;
985985
let Documentation = [InternalOnly];

clang/include/clang/Basic/BuiltinsAMDGPU.def

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -667,6 +667,13 @@ TARGET_BUILTIN(__builtin_amdgcn_global_load_monitor_b128, "V4iV4i*1Ii", "nc", "g
667667
TARGET_BUILTIN(__builtin_amdgcn_flat_load_monitor_b32, "ii*0Ii", "nc", "gfx1250-insts")
668668
TARGET_BUILTIN(__builtin_amdgcn_flat_load_monitor_b64, "V2iV2i*0Ii", "nc", "gfx1250-insts")
669669
TARGET_BUILTIN(__builtin_amdgcn_flat_load_monitor_b128, "V4iV4i*0Ii", "nc", "gfx1250-insts")
670+
TARGET_BUILTIN(__builtin_amdgcn_cluster_load_b32, "ii*1Iii", "nc", "gfx1250-insts,wavefrontsize32")
671+
TARGET_BUILTIN(__builtin_amdgcn_cluster_load_b64, "V2iV2i*1Iii", "nc", "gfx1250-insts,wavefrontsize32")
672+
TARGET_BUILTIN(__builtin_amdgcn_cluster_load_b128, "V4iV4i*1Iii", "nc", "gfx1250-insts,wavefrontsize32")
673+
TARGET_BUILTIN(__builtin_amdgcn_cluster_load_async_to_lds_b8, "vc*1c*3IiIii", "nc", "gfx1250-insts,wavefrontsize32")
674+
TARGET_BUILTIN(__builtin_amdgcn_cluster_load_async_to_lds_b32, "vi*1i*3IiIii", "nc", "gfx1250-insts,wavefrontsize32")
675+
TARGET_BUILTIN(__builtin_amdgcn_cluster_load_async_to_lds_b64, "vV2i*1V2i*3IiIii", "nc", "gfx1250-insts,wavefrontsize32")
676+
TARGET_BUILTIN(__builtin_amdgcn_cluster_load_async_to_lds_b128, "vV4i*1V4i*3IiIii", "nc", "gfx1250-insts,wavefrontsize32")
670677
TARGET_BUILTIN(__builtin_amdgcn_global_load_async_to_lds_b8, "vc*1c*3IiIi", "nc", "gfx1250-insts")
671678
TARGET_BUILTIN(__builtin_amdgcn_global_load_async_to_lds_b32, "vi*1i*3IiIi", "nc", "gfx1250-insts")
672679
TARGET_BUILTIN(__builtin_amdgcn_global_load_async_to_lds_b64, "vV2i*1V2i*3IiIi", "nc", "gfx1250-insts")

clang/include/clang/Basic/BuiltinsX86.td

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1993,6 +1993,10 @@ let Features = "avx512dq,evex512", Attributes = [NoThrow, Const, RequiredVectorW
19931993
}
19941994

19951995
let Features = "avx512f,evex512", Attributes = [NoThrow, Const, Constexpr, RequiredVectorWidth<512>] in {
1996+
def psllv16si : X86Builtin<"_Vector<16, int>(_Vector<16, int>, _Vector<16, int>)">;
1997+
def psrav16si : X86Builtin<"_Vector<16, int>(_Vector<16, int>, _Vector<16, int>)">;
1998+
def psrlv16si : X86Builtin<"_Vector<16, int>(_Vector<16, int>, _Vector<16, int>)">;
1999+
19962000
def prold512 : X86Builtin<"_Vector<16, int>(_Vector<16, int>, _Constant int)">;
19972001
def prord512 : X86Builtin<"_Vector<16, int>(_Vector<16, int>, _Constant int)">;
19982002
def prolq512 : X86Builtin<"_Vector<8, long long int>(_Vector<8, long long int>, _Constant int)">;
@@ -2422,15 +2426,12 @@ let Features = "avx512vl",
24222426
let Features = "avx512f,evex512", Attributes = [NoThrow, Const, RequiredVectorWidth<512>] in {
24232427
def pslld512 : X86Builtin<"_Vector<16, int>(_Vector<16, int>, _Vector<4, int>)">;
24242428
def psllq512 : X86Builtin<"_Vector<8, long long int>(_Vector<8, long long int>, _Vector<2, long long int>)">;
2425-
def psllv16si : X86Builtin<"_Vector<16, int>(_Vector<16, int>, _Vector<16, int>)">;
24262429
def psllv8di : X86Builtin<"_Vector<8, long long int>(_Vector<8, long long int>, _Vector<8, long long int>)">;
24272430
def psrad512 : X86Builtin<"_Vector<16, int>(_Vector<16, int>, _Vector<4, int>)">;
24282431
def psraq512 : X86Builtin<"_Vector<8, long long int>(_Vector<8, long long int>, _Vector<2, long long int>)">;
2429-
def psrav16si : X86Builtin<"_Vector<16, int>(_Vector<16, int>, _Vector<16, int>)">;
24302432
def psrav8di : X86Builtin<"_Vector<8, long long int>(_Vector<8, long long int>, _Vector<8, long long int>)">;
24312433
def psrld512 : X86Builtin<"_Vector<16, int>(_Vector<16, int>, _Vector<4, int>)">;
24322434
def psrlq512 : X86Builtin<"_Vector<8, long long int>(_Vector<8, long long int>, _Vector<2, long long int>)">;
2433-
def psrlv16si : X86Builtin<"_Vector<16, int>(_Vector<16, int>, _Vector<16, int>)">;
24342435
def psrlv8di : X86Builtin<"_Vector<8, long long int>(_Vector<8, long long int>, _Vector<8, long long int>)">;
24352436
def pternlogd512_mask : X86Builtin<"_Vector<16, int>(_Vector<16, int>, _Vector<16, int>, _Vector<16, int>, _Constant int, unsigned short)">;
24362437
def pternlogd512_maskz : X86Builtin<"_Vector<16, int>(_Vector<16, int>, _Vector<16, int>, _Vector<16, int>, _Constant int, unsigned short)">;

clang/include/clang/Basic/DiagnosticSemaKinds.td

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1773,6 +1773,7 @@ def note_unsatisfied_trait
17731773
"%TriviallyCopyable{trivially copyable}|"
17741774
"%Empty{empty}|"
17751775
"%StandardLayout{standard-layout}|"
1776+
"%Aggregate{aggregate}|"
17761777
"%Final{final}"
17771778
"}1">;
17781779

@@ -1794,6 +1795,7 @@ def note_unsatisfied_trait_reason
17941795
"%NTCBase{has a non-trivially-copyable base %1}|"
17951796
"%NTCField{has a non-trivially-copyable member %1 of type %2}|"
17961797
"%NonEmptyMember{has a non-static data member %1 of type %2}|"
1798+
"%PolymorphicType{is a polymorphic type}|"
17971799
"%VirtualFunction{has a virtual function %1}|"
17981800
"%NonEmptyBase{has a base class %1 that is not empty}|"
17991801
"%NonZeroLengthField{field %1 is a non-zero-length bit-field}|"
@@ -1806,6 +1808,8 @@ def note_unsatisfied_trait_reason
18061808
"%DeletedDtr{has a %select{deleted|user-provided}1 destructor}|"
18071809
"%UserProvidedCtr{has a user provided %select{copy|move}1 "
18081810
"constructor}|"
1811+
"%UserDeclaredCtr{has a user-declared constructor}|"
1812+
"%InheritedCtr{has an inherited constructor}|"
18091813
"%DeletedCtr{has a deleted %select{copy|move}1 "
18101814
"constructor}|"
18111815
"%UserProvidedAssign{has a user provided %select{copy|move}1 "
@@ -1817,6 +1821,8 @@ def note_unsatisfied_trait_reason
18171821
"%FunctionType{is a function type}|"
18181822
"%CVVoidType{is a cv void type}|"
18191823
"%IncompleteArrayType{is an incomplete array type}|"
1824+
"%PrivateProtectedDirectDataMember{has a %select{private|protected}1 direct data member}|"
1825+
"%PrivateProtectedDirectBase{has a %select{private|protected}1 direct base}|"
18201826
"%NotClassOrUnion{is not a class or union type}|"
18211827
"%NotMarkedFinal{is not marked 'final'}"
18221828
"}0">;
@@ -10692,7 +10698,7 @@ def warn_dangling_reference_captured_by_unknown : Warning<
1069210698

1069310699
// Diagnostics based on the Lifetime safety analysis.
1069410700
def warn_lifetime_safety_loan_expires_permissive : Warning<
10695-
"object whose reference is captured does not live long enough">,
10701+
"object whose reference is captured does not live long enough">,
1069610702
InGroup<LifetimeSafetyPermissive>, DefaultIgnore;
1069710703
def warn_lifetime_safety_loan_expires_strict : Warning<
1069810704
"object whose reference is captured may not live long enough">,

0 commit comments

Comments
 (0)