Skip to content

Commit f40f282

Browse files
SC llvm teamSC llvm team
authored andcommitted
Merged main:d311a62e2f1ae34a0329c3812f2969cedac93561 into amd-gfx:3c31da5ad733
Local branch amd-gfx 3c31da5 Merged main:911207338add39b8439a09fd7f9d97bbe4a335bd into amd-gfx:3ae085055ecb Remote branch main d311a62 [ctx_profile] Decouple ctx instrumentation from PGOOpt (llvm#92445)
2 parents 3c31da5 + d311a62 commit f40f282

File tree

169 files changed

+4027
-3288
lines changed

Some content is hidden

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

169 files changed

+4027
-3288
lines changed

clang/docs/ReleaseNotes.rst

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -494,6 +494,9 @@ Improvements to Clang's diagnostics
494494
Improvements to Clang's time-trace
495495
----------------------------------
496496

497+
- Clang now specifies that using ``auto`` in a lambda parameter is a C++14 extension when
498+
appropriate. (`#46059: <https://github.com/llvm/llvm-project/issues/46059>`_).
499+
497500
Bug Fixes in This Version
498501
-------------------------
499502
- Clang's ``-Wundefined-func-template`` no longer warns on pure virtual
@@ -723,6 +726,7 @@ Bug Fixes to C++ Support
723726
- Clang now ignores template parameters only used within the exception specification of candidate function
724727
templates during partial ordering when deducing template arguments from a function declaration or when
725728
taking the address of a function template.
729+
- Fix a bug with checking constrained non-type template parameters for equivalence. Fixes (#GH77377).
726730

727731
Bug Fixes to AST Handling
728732
^^^^^^^^^^^^^^^^^^^^^^^^^

clang/include/clang/Analysis/Analyses/UnsafeBufferUsage.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,11 @@ class UnsafeBufferUsageHandler {
106106
virtual void handleUnsafeOperation(const Stmt *Operation,
107107
bool IsRelatedToDecl, ASTContext &Ctx) = 0;
108108

109+
/// Invoked when an unsafe operation with a std container is found.
110+
virtual void handleUnsafeOperationInContainer(const Stmt *Operation,
111+
bool IsRelatedToDecl,
112+
ASTContext &Ctx) = 0;
113+
109114
/// Invoked when a fix is suggested against a variable. This function groups
110115
/// all variables that must be fixed together (i.e their types must be changed
111116
/// to the same target type to prevent type mismatches) into a single fixit.

clang/include/clang/Analysis/Analyses/UnsafeBufferUsageGadgets.def

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ WARNING_GADGET(Decrement)
3636
WARNING_GADGET(ArraySubscript)
3737
WARNING_GADGET(PointerArithmetic)
3838
WARNING_GADGET(UnsafeBufferUsageAttr)
39+
WARNING_GADGET(UnsafeBufferUsageCtorAttr)
3940
WARNING_GADGET(DataInvocation)
4041
WARNING_CONTAINER_GADGET(SpanTwoParamConstructor) // Uses of `std::span(arg0, arg1)`
4142
FIXABLE_GADGET(ULCArraySubscript) // `DRE[any]` in an Unspecified Lvalue Context

clang/include/clang/Basic/DiagnosticSemaKinds.td

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2433,7 +2433,9 @@ def err_auto_not_allowed : Error<
24332433
"|in template parameter|in friend declaration|in function prototype that is "
24342434
"not a function declaration|in requires expression parameter"
24352435
"|in array declaration"
2436-
"|in declaration of conversion function template}1">;
2436+
"|in declaration of conversion function template"
2437+
"|in lambda parameter before C++14}1">;
2438+
24372439
def err_dependent_deduced_tst : Error<
24382440
"typename specifier refers to "
24392441
"%select{class template|function template|variable template|alias template|"
@@ -3003,6 +3005,8 @@ def note_single_arg_concept_specialization_constraint_evaluated_to_false : Note<
30033005
"%select{and|because}0 %1 does not satisfy %2">;
30043006
def note_atomic_constraint_evaluated_to_false_elaborated : Note<
30053007
"%select{and|because}0 '%1' (%2 %3 %4) evaluated to false">;
3008+
def note_is_deducible_constraint_evaluated_to_false : Note<
3009+
"cannot deduce template arguments for %0 from %1">;
30063010
def err_constrained_virtual_method : Error<
30073011
"virtual function cannot have a requires clause">;
30083012
def err_trailing_requires_clause_on_deduction_guide : Error<
@@ -10037,6 +10041,12 @@ def warn_new_dangling_initializer_list : Warning<
1003710041
"the allocated initializer list}0 "
1003810042
"will be destroyed at the end of the full-expression">,
1003910043
InGroup<DanglingInitializerList>;
10044+
def warn_unsupported_lifetime_extension : Warning<
10045+
"lifetime extension of "
10046+
"%select{temporary|backing array of initializer list}0 created "
10047+
"by aggregate initialization using a default member initializer "
10048+
"is not yet supported; lifetime of %select{temporary|backing array}0 "
10049+
"will end at the end of the full-expression">, InGroup<Dangling>;
1004010050

1004110051
// For non-floating point, expressions of the form x == x or x != x
1004210052
// should result in a warning, since these always evaluate to a constant.

clang/include/clang/Basic/arm_sve.td

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2095,7 +2095,7 @@ def SVFCLAMP_BF : SInst<"svclamp[_{d}]", "dddd", "b", MergeNone, "aarch64_sve_
20952095
multiclass MinMaxIntr<string i, string zm, string mul, string t> {
20962096
def SVS # NAME : SInst<"sv" # i # "[" # zm # "_{d}_" # mul # "]", t, "csil", MergeNone, "aarch64_sve_s" # i # zm # "_" # mul, [IsStreaming], []>;
20972097
def SVU # NAME : SInst<"sv" # i # "[" # zm # "_{d}_" # mul # "]", t, "UcUsUiUl", MergeNone, "aarch64_sve_u" # i # zm # "_" # mul, [IsStreaming], []>;
2098-
def SVF # NAME : SInst<"sv" # i # "[" # zm # "_{d}_" # mul # "]", t, "hfd", MergeNone, "aarch64_sve_f" # i # zm # "_" # mul, [IsStreaming], []>;
2098+
def SVF # NAME : SInst<"sv" # i # "[" # zm # "_{d}_" # mul # "]", t, "bhfd", MergeNone, "aarch64_sve_f" # i # zm # "_" # mul, [IsStreaming], []>;
20992099
}
21002100

21012101
let TargetGuard = "sme2" in {
@@ -2113,11 +2113,11 @@ let TargetGuard = "sme2" in {
21132113
}
21142114

21152115
multiclass SInstMinMaxByVector<string name> {
2116-
def NAME # _SINGLE_X2 : SInst<"sv" # name # "nm[_single_{d}_x2]", "22d", "hfd", MergeNone, "aarch64_sve_f" # name # "nm_single_x2", [IsStreaming], []>;
2117-
def NAME # _SINGLE_X4 : SInst<"sv" # name # "nm[_single_{d}_x4]", "44d", "hfd", MergeNone, "aarch64_sve_f" # name # "nm_single_x4", [IsStreaming], []>;
2116+
def NAME # _SINGLE_X2 : SInst<"sv" # name # "nm[_single_{d}_x2]", "22d", "bhfd", MergeNone, "aarch64_sve_f" # name # "nm_single_x2", [IsStreaming], []>;
2117+
def NAME # _SINGLE_X4 : SInst<"sv" # name # "nm[_single_{d}_x4]", "44d", "bhfd", MergeNone, "aarch64_sve_f" # name # "nm_single_x4", [IsStreaming], []>;
21182118

2119-
def NAME # _X2 : SInst<"sv" # name # "nm[_{d}_x2]", "222", "hfd", MergeNone, "aarch64_sve_f" # name # "nm_x2", [IsStreaming], []>;
2120-
def NAME # _X4 : SInst<"sv" # name # "nm[_{d}_x4]", "444", "hfd", MergeNone, "aarch64_sve_f" # name # "nm_x4", [IsStreaming], []>;
2119+
def NAME # _X2 : SInst<"sv" # name # "nm[_{d}_x2]", "222", "bhfd", MergeNone, "aarch64_sve_f" # name # "nm_x2", [IsStreaming], []>;
2120+
def NAME # _X4 : SInst<"sv" # name # "nm[_{d}_x4]", "444", "bhfd", MergeNone, "aarch64_sve_f" # name # "nm_x4", [IsStreaming], []>;
21212121
}
21222122

21232123
let TargetGuard = "sme2" in {

clang/lib/AST/ASTContext.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5910,7 +5910,8 @@ QualType ASTContext::getUnconstrainedType(QualType T) const {
59105910
if (auto *AT = CanonT->getAs<AutoType>()) {
59115911
if (!AT->isConstrained())
59125912
return T;
5913-
return getQualifiedType(getAutoType(QualType(), AT->getKeyword(), false,
5913+
return getQualifiedType(getAutoType(QualType(), AT->getKeyword(),
5914+
AT->isDependentType(),
59145915
AT->containsUnexpandedParameterPack()),
59155916
T.getQualifiers());
59165917
}

0 commit comments

Comments
 (0)