Skip to content

Commit fbc27fa

Browse files
Merge branch 'llvm:main' into stacktrace23
2 parents b18e4b7 + 440e510 commit fbc27fa

File tree

558 files changed

+663156
-205976
lines changed

Some content is hidden

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

558 files changed

+663156
-205976
lines changed

clang/docs/ReleaseNotes.rst

Lines changed: 17 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,8 @@ C++ Specific Potentially Breaking Changes
5858
- The type trait builtin ``__is_referenceable`` has been removed, since it has
5959
very few users and all the type traits that could benefit from it in the
6060
standard library already have their own bespoke builtins.
61+
- A workaround for libstdc++4.7 has been removed. Note that 4.8.3 remains the oldest
62+
supported libstdc++ version.
6163

6264
ABI Changes in This Version
6365
---------------------------
@@ -118,6 +120,9 @@ C++23 Feature Support
118120

119121
C++20 Feature Support
120122
^^^^^^^^^^^^^^^^^^^^^
123+
- Fixed a crash with a defaulted spaceship (``<=>``) operator when the class
124+
contains a member declaration of vector type. Vector types cannot yet be
125+
compared directly, so this causes the operator to be deleted. (#GH137452)
121126

122127
C++17 Feature Support
123128
^^^^^^^^^^^^^^^^^^^^^
@@ -520,9 +525,10 @@ Improvements to Clang's diagnostics
520525

521526
- Fixed a duplicate diagnostic when performing typo correction on function template
522527
calls with explicit template arguments. (#GH139226)
523-
524-
- An error is now emitted when OpenMP ``collapse`` and ``ordered`` clauses have an
525-
argument larger than what can fit within a 64-bit integer.
528+
529+
- Explanatory note is printed when ``assert`` fails during evaluation of a
530+
constant expression. Prior to this, the error inaccurately implied that assert
531+
could not be used at all in a constant expression (#GH130458)
526532

527533
- A new off-by-default warning ``-Wms-bitfield-padding`` has been added to alert to cases where bit-field
528534
packing may differ under the MS struct ABI (#GH117428).
@@ -586,6 +592,8 @@ Bug Fixes in This Version
586592
``#include`` directive. (#GH138094)
587593
- Fixed a crash during constant evaluation involving invalid lambda captures
588594
(#GH138832)
595+
- Fixed a crash when instantiating an invalid dependent friend template specialization.
596+
(#GH139052)
589597
- Fixed a crash with an invalid member function parameter list with a default
590598
argument which contains a pragma. (#GH113722)
591599
- Fixed assertion failures when generating name lookup table in modules. (#GH61065, #GH134739)
@@ -935,6 +943,12 @@ OpenMP Support
935943
- Fixed a crashing bug with a malformed ``cancel`` directive. (#GH139360)
936944
- Fixed a crashing bug with ``omp distribute dist_schedule`` if the argument to
937945
``dist_schedule`` was not strictly positive. (#GH139266)
946+
- Fixed two crashing bugs with a malformed ``metadirective`` directive. One was
947+
a crash if the next token after ``metadirective`` was a paren, bracket, or
948+
brace. The other was if the next token after the meta directive was not an
949+
open parenthesis. (#GH139665)
950+
- An error is now emitted when OpenMP ``collapse`` and ``ordered`` clauses have
951+
an argument larger than what can fit within a 64-bit integer.
938952

939953
Improvements
940954
^^^^^^^^^^^^

clang/docs/UsersManual.rst

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2792,6 +2792,9 @@ usual build cycle when using sample profilers for optimization:
27922792
27932793
$ llvm-profgen --binary=./code --output=code.prof --perfdata=perf.data
27942794
2795+
Please note, ``perf.data`` must be collected with ``-b`` flag to Linux ``perf``
2796+
for the above step to work.
2797+
27952798
When using SEP the output is in the textual format corresponding to
27962799
``llvm-profgen --perfscript``. For example:
27972800

clang/include/clang/AST/Expr.h

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4566,9 +4566,11 @@ class ShuffleVectorExpr : public Expr {
45664566

45674567
void setExprs(const ASTContext &C, ArrayRef<Expr *> Exprs);
45684568

4569-
llvm::APSInt getShuffleMaskIdx(const ASTContext &Ctx, unsigned N) const {
4569+
llvm::APSInt getShuffleMaskIdx(unsigned N) const {
45704570
assert((N < NumExprs - 2) && "Shuffle idx out of range!");
4571-
return getExpr(N+2)->EvaluateKnownConstInt(Ctx);
4571+
assert(isa<ConstantExpr>(getExpr(N + 2)) &&
4572+
"Index expression must be a ConstantExpr");
4573+
return cast<ConstantExpr>(getExpr(N + 2))->getAPValueResult().getInt();
45724574
}
45734575

45744576
// Iterators

clang/include/clang/Basic/BuiltinsNVPTX.td

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -620,6 +620,12 @@ def __nvvm_e2m3x2_to_f16x2_rn_relu : NVPTXBuiltinSMAndPTX<"_Vector<2, __fp16>(sh
620620
def __nvvm_e3m2x2_to_f16x2_rn : NVPTXBuiltinSMAndPTX<"_Vector<2, __fp16>(short)", SM<"100a", [SM_101a, SM_120a]>, PTX86>;
621621
def __nvvm_e3m2x2_to_f16x2_rn_relu : NVPTXBuiltinSMAndPTX<"_Vector<2, __fp16>(short)", SM<"100a", [SM_101a, SM_120a]>, PTX86>;
622622

623+
def __nvvm_ff_to_e2m1x2_rn_satfinite : NVPTXBuiltinSMAndPTX<"short(float, float)", SM<"100a", [SM_101a, SM_120a]>, PTX86>;
624+
def __nvvm_ff_to_e2m1x2_rn_relu_satfinite : NVPTXBuiltinSMAndPTX<"short(float, float)", SM<"100a", [SM_101a, SM_120a]>, PTX86>;
625+
626+
def __nvvm_e2m1x2_to_f16x2_rn : NVPTXBuiltinSMAndPTX<"_Vector<2, __fp16>(short)", SM<"100a", [SM_101a, SM_120a]>, PTX86>;
627+
def __nvvm_e2m1x2_to_f16x2_rn_relu : NVPTXBuiltinSMAndPTX<"_Vector<2, __fp16>(short)", SM<"100a", [SM_101a, SM_120a]>, PTX86>;
628+
623629
def __nvvm_ff_to_ue8m0x2_rz : NVPTXBuiltinSMAndPTX<"short(float, float)", SM<"100a", [SM_101a, SM_120a]>, PTX86>;
624630
def __nvvm_ff_to_ue8m0x2_rz_satfinite : NVPTXBuiltinSMAndPTX<"short(float, float)", SM<"100a", [SM_101a, SM_120a]>, PTX86>;
625631
def __nvvm_ff_to_ue8m0x2_rp : NVPTXBuiltinSMAndPTX<"short(float, float)", SM<"100a", [SM_101a, SM_120a]>, PTX86>;

clang/include/clang/Basic/BuiltinsWebAssembly.def

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -192,6 +192,7 @@ TARGET_BUILTIN(__builtin_wasm_replace_lane_f16x8, "V8hV8hIif", "nc", "fp16")
192192
// in which case the argument spec (second argument) is unused.
193193

194194
TARGET_BUILTIN(__builtin_wasm_ref_null_extern, "i", "nct", "reference-types")
195+
TARGET_BUILTIN(__builtin_wasm_ref_is_null_extern, "ii", "nct", "reference-types")
195196

196197
// A funcref represented as a function pointer with the funcref attribute
197198
// attached to the type, therefore SemaChecking will check for the right

clang/include/clang/Basic/DiagnosticSemaKinds.td

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -164,6 +164,8 @@ def err_ice_too_large : Error<
164164
"integer constant expression evaluates to value %0 that cannot be "
165165
"represented in a %1-bit %select{signed|unsigned}2 integer type">;
166166
def err_expr_not_string_literal : Error<"expression is not a string literal">;
167+
def note_constexpr_assert_failed : Note<
168+
"assertion failed during evaluation of constant expression">;
167169

168170
// Semantic analysis of constant literals.
169171
def ext_predef_outside_function : Warning<
@@ -10183,6 +10185,9 @@ def note_defaulted_comparison_no_viable_function_synthesized : Note<
1018310185
def note_defaulted_comparison_not_rewritten_callee : Note<
1018410186
"defaulted %0 is implicitly deleted because this non-rewritten comparison "
1018510187
"function would be the best match for the comparison">;
10188+
def note_defaulted_comparison_vector_types : Note<
10189+
"defaulted %0 is implicitly deleted because defaulted comparison of vector "
10190+
"types is not supported">;
1018610191
def note_defaulted_comparison_not_rewritten_conversion : Note<
1018710192
"defaulted %0 is implicitly deleted because a builtin comparison function "
1018810193
"using this conversion would be the best match for the comparison">;
@@ -13012,6 +13017,8 @@ def err_wasm_reftype_multidimensional_array : Error<
1301213017
"multi-dimensional arrays of WebAssembly references are not allowed">;
1301313018
def err_wasm_builtin_arg_must_be_table_type : Error <
1301413019
"%ordinal0 argument must be a WebAssembly table">;
13020+
def err_wasm_builtin_arg_must_be_externref_type : Error <
13021+
"%ordinal0 argument must be an externref">;
1301513022
def err_wasm_builtin_arg_must_match_table_element_type : Error <
1301613023
"%ordinal0 argument must match the element type of the WebAssembly table in the %ordinal1 argument">;
1301713024
def err_wasm_builtin_arg_must_be_integer_type : Error <

0 commit comments

Comments
 (0)