Skip to content

Commit 89c375d

Browse files
authored
Merge pull request llvm#329 from AMD-Lightning-Internal/amd/merge/upstream_merge_20250127152330
merge main into amd-staging
2 parents 1546397 + b900239 commit 89c375d

File tree

378 files changed

+20191
-7228
lines changed

Some content is hidden

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

378 files changed

+20191
-7228
lines changed

.ci/metrics/metrics.py

Lines changed: 38 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -130,34 +130,6 @@ def get_per_workflow_metrics(
130130
workflow_jobs = workflow_run.jobs()
131131
if workflow_jobs.totalCount == 0:
132132
continue
133-
if workflow_jobs.totalCount > 1:
134-
raise ValueError(
135-
f"Encountered an unexpected number of jobs: {workflow_jobs.totalCount}"
136-
)
137-
138-
created_at = workflow_jobs[0].created_at
139-
started_at = workflow_jobs[0].started_at
140-
completed_at = workflow_jobs[0].completed_at
141-
142-
job_result = int(workflow_jobs[0].conclusion == "success")
143-
if job_result:
144-
# We still might want to mark the job as a failure if one of the steps
145-
# failed. This is required due to use setting continue-on-error in
146-
# the premerge pipeline to prevent sending emails while we are
147-
# testing the infrastructure.
148-
# TODO(boomanaiden154): Remove this once the premerge pipeline is no
149-
# longer in a testing state and we can directly assert the workflow
150-
# result.
151-
for step in workflow_jobs[0].steps:
152-
if step.conclusion != "success":
153-
job_result = 0
154-
break
155-
156-
queue_time = started_at - created_at
157-
run_time = completed_at - started_at
158-
159-
if run_time.seconds == 0:
160-
continue
161133

162134
if (
163135
workflows_to_track[workflow_run.name] is None
@@ -170,20 +142,45 @@ def get_per_workflow_metrics(
170142
):
171143
break
172144

173-
# The timestamp associated with the event is expected by Grafana to be
174-
# in nanoseconds.
175-
created_at_ns = int(created_at.timestamp()) * 10**9
176-
177-
workflow_metrics.append(
178-
JobMetrics(
179-
workflow_run.name,
180-
queue_time.seconds,
181-
run_time.seconds,
182-
job_result,
183-
created_at_ns,
184-
workflow_run.id,
145+
for workflow_job in workflow_jobs:
146+
created_at = workflow_job.created_at
147+
started_at = workflow_job.started_at
148+
completed_at = workflow_job.completed_at
149+
150+
job_result = int(workflow_job.conclusion == "success")
151+
if job_result:
152+
# We still might want to mark the job as a failure if one of the steps
153+
# failed. This is required due to use setting continue-on-error in
154+
# the premerge pipeline to prevent sending emails while we are
155+
# testing the infrastructure.
156+
# TODO(boomanaiden154): Remove this once the premerge pipeline is no
157+
# longer in a testing state and we can directly assert the workflow
158+
# result.
159+
for step in workflow_job.steps:
160+
if step.conclusion != "success":
161+
job_result = 0
162+
break
163+
164+
queue_time = started_at - created_at
165+
run_time = completed_at - started_at
166+
167+
if run_time.seconds == 0:
168+
continue
169+
170+
# The timestamp associated with the event is expected by Grafana to be
171+
# in nanoseconds.
172+
created_at_ns = int(created_at.timestamp()) * 10**9
173+
174+
workflow_metrics.append(
175+
JobMetrics(
176+
workflow_run.name + "-" + workflow_job.name,
177+
queue_time.seconds,
178+
run_time.seconds,
179+
job_result,
180+
created_at_ns,
181+
workflow_run.id,
182+
)
185183
)
186-
)
187184

188185
return workflow_metrics
189186

clang/docs/ReleaseNotes.rst

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -395,6 +395,7 @@ C Language Changes
395395
------------------
396396

397397
- Extend clang's ``<limits.h>`` to define ``LONG_LONG_*`` macros for Android's bionic.
398+
- Macro ``__STDC_NO_THREADS__`` is no longer necessary for MSVC 2022 1939 and later.
398399

399400
C2y Feature Support
400401
^^^^^^^^^^^^^^^^^^^
@@ -1034,6 +1035,9 @@ Bug Fixes to C++ Support
10341035
- Fixed assertions or false compiler diagnostics in the case of C++ modules for
10351036
lambda functions or inline friend functions defined inside templates (#GH122493).
10361037
- Clang now rejects declaring an alias template with the same name as its template parameter. (#GH123423)
1038+
- Fixed immediate escalation of non-dependent expressions. (#GH123405)
1039+
- Fix type of expression when calling a template which returns an ``__array_rank`` querying a type depending on a
1040+
template parameter. Now, such expression can be used with ``static_assert`` and ``constexpr``. (#GH123498)
10371041
- Correctly determine the implicit constexprness of lambdas in dependent contexts. (#GH97958) (#GH114234)
10381042

10391043
Bug Fixes to AST Handling

clang/include/clang/AST/ExprCXX.h

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2847,8 +2847,8 @@ class TypeTraitExpr final
28472847
///
28482848
/// Example:
28492849
/// \code
2850-
/// __array_rank(int[10][20]) == 2
2851-
/// __array_extent(int, 1) == 20
2850+
/// __array_rank(int[10][20]) == 2
2851+
/// __array_extent(int[10][20], 1) == 20
28522852
/// \endcode
28532853
class ArrayTypeTraitExpr : public Expr {
28542854
/// The trait. An ArrayTypeTrait enum in MSVC compat unsigned.
@@ -4326,8 +4326,6 @@ class SizeOfPackExpr final
43264326
/// Retrieve the parameter pack.
43274327
NamedDecl *getPack() const { return Pack; }
43284328

4329-
void setPack(NamedDecl *NewPack) { Pack = NewPack; }
4330-
43314329
/// Retrieve the length of the parameter pack.
43324330
///
43334331
/// This routine may only be invoked when the expression is not

clang/include/clang/Basic/AArch64SVEACLETypes.def

Lines changed: 17 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,11 @@
5757
// - IsBF true for vector of brain float elements.
5858
//===----------------------------------------------------------------------===//
5959

60+
#ifndef SVE_SCALAR_TYPE
61+
#define SVE_SCALAR_TYPE(Name, MangledName, Id, SingletonId, Bits) \
62+
SVE_TYPE(Name, Id, SingletonId)
63+
#endif
64+
6065
#ifndef SVE_VECTOR_TYPE
6166
#define SVE_VECTOR_TYPE(Name, MangledName, Id, SingletonId) \
6267
SVE_TYPE(Name, Id, SingletonId)
@@ -72,6 +77,11 @@
7277
SVE_VECTOR_TYPE_DETAILS(Name, MangledName, Id, SingletonId, NumEls, ElBits, NF, false, false, true)
7378
#endif
7479

80+
#ifndef SVE_VECTOR_TYPE_MFLOAT
81+
#define SVE_VECTOR_TYPE_MFLOAT(Name, MangledName, Id, SingletonId, NumEls, ElBits, NF) \
82+
SVE_VECTOR_TYPE_DETAILS(Name, MangledName, Id, SingletonId, NumEls, ElBits, NF, false, false, false)
83+
#endif
84+
7585
#ifndef SVE_VECTOR_TYPE_FLOAT
7686
#define SVE_VECTOR_TYPE_FLOAT(Name, MangledName, Id, SingletonId, NumEls, ElBits, NF) \
7787
SVE_VECTOR_TYPE_DETAILS(Name, MangledName, Id, SingletonId, NumEls, ElBits, NF, false, true, false)
@@ -97,16 +107,6 @@
97107
SVE_TYPE(Name, Id, SingletonId)
98108
#endif
99109

100-
#ifndef AARCH64_VECTOR_TYPE
101-
#define AARCH64_VECTOR_TYPE(Name, MangledName, Id, SingletonId) \
102-
SVE_TYPE(Name, Id, SingletonId)
103-
#endif
104-
105-
#ifndef AARCH64_VECTOR_TYPE_MFLOAT
106-
#define AARCH64_VECTOR_TYPE_MFLOAT(Name, MangledName, Id, SingletonId, NumEls, ElBits, NF) \
107-
AARCH64_VECTOR_TYPE(Name, MangledName, Id, SingletonId)
108-
#endif
109-
110110
//===- Vector point types -----------------------------------------------===//
111111

112112
SVE_VECTOR_TYPE_INT("__SVInt8_t", "__SVInt8_t", SveInt8, SveInt8Ty, 16, 8, 1, true)
@@ -125,8 +125,7 @@ SVE_VECTOR_TYPE_FLOAT("__SVFloat64_t", "__SVFloat64_t", SveFloat64, SveFloat64Ty
125125

126126
SVE_VECTOR_TYPE_BFLOAT("__SVBfloat16_t", "__SVBfloat16_t", SveBFloat16, SveBFloat16Ty, 8, 16, 1)
127127

128-
// This is a 8 bits opaque type.
129-
SVE_VECTOR_TYPE_INT("__SVMfloat8_t", "__SVMfloat8_t", SveMFloat8, SveMFloat8Ty, 16, 8, 1, false)
128+
SVE_VECTOR_TYPE_MFLOAT("__SVMfloat8_t", "__SVMfloat8_t", SveMFloat8, SveMFloat8Ty, 16, 8, 1)
130129

131130
//
132131
// x2
@@ -148,7 +147,7 @@ SVE_VECTOR_TYPE_FLOAT("__clang_svfloat64x2_t", "svfloat64x2_t", SveFloat64x2, Sv
148147

149148
SVE_VECTOR_TYPE_BFLOAT("__clang_svbfloat16x2_t", "svbfloat16x2_t", SveBFloat16x2, SveBFloat16x2Ty, 8, 16, 2)
150149

151-
SVE_VECTOR_TYPE_INT("__clang_svmfloat8x2_t", "svmfloat8x2_t", SveMFloat8x2, SveMFloat8x2Ty, 16, 8, 2, false)
150+
SVE_VECTOR_TYPE_MFLOAT("__clang_svmfloat8x2_t", "svmfloat8x2_t", SveMFloat8x2, SveMFloat8x2Ty, 16, 8, 2)
152151

153152
//
154153
// x3
@@ -170,7 +169,7 @@ SVE_VECTOR_TYPE_FLOAT("__clang_svfloat64x3_t", "svfloat64x3_t", SveFloat64x3, Sv
170169

171170
SVE_VECTOR_TYPE_BFLOAT("__clang_svbfloat16x3_t", "svbfloat16x3_t", SveBFloat16x3, SveBFloat16x3Ty, 8, 16, 3)
172171

173-
SVE_VECTOR_TYPE_INT("__clang_svmfloat8x3_t", "svmfloat8x3_t", SveMFloat8x3, SveMFloat8x3Ty, 16, 8, 3, false)
172+
SVE_VECTOR_TYPE_MFLOAT("__clang_svmfloat8x3_t", "svmfloat8x3_t", SveMFloat8x3, SveMFloat8x3Ty, 16, 8, 3)
174173

175174
//
176175
// x4
@@ -192,23 +191,23 @@ SVE_VECTOR_TYPE_FLOAT("__clang_svfloat64x4_t", "svfloat64x4_t", SveFloat64x4, Sv
192191

193192
SVE_VECTOR_TYPE_BFLOAT("__clang_svbfloat16x4_t", "svbfloat16x4_t", SveBFloat16x4, SveBFloat16x4Ty, 8, 16, 4)
194193

195-
SVE_VECTOR_TYPE_INT("__clang_svmfloat8x4_t", "svmfloat8x4_t", SveMFloat8x4, SveMFloat8x4Ty, 16, 8, 4, false)
194+
SVE_VECTOR_TYPE_MFLOAT("__clang_svmfloat8x4_t", "svmfloat8x4_t", SveMFloat8x4, SveMFloat8x4Ty, 16, 8, 4)
196195

197196
SVE_PREDICATE_TYPE_ALL("__SVBool_t", "__SVBool_t", SveBool, SveBoolTy, 16, 1)
198197
SVE_PREDICATE_TYPE_ALL("__clang_svboolx2_t", "svboolx2_t", SveBoolx2, SveBoolx2Ty, 16, 2)
199198
SVE_PREDICATE_TYPE_ALL("__clang_svboolx4_t", "svboolx4_t", SveBoolx4, SveBoolx4Ty, 16, 4)
200199

201200
SVE_OPAQUE_TYPE("__SVCount_t", "__SVCount_t", SveCount, SveCountTy)
202201

203-
AARCH64_VECTOR_TYPE_MFLOAT("__mfp8", "__mfp8", MFloat8, MFloat8Ty, 1, 8, 1)
202+
SVE_SCALAR_TYPE("__mfp8", "__mfp8", MFloat8, MFloat8Ty, 8)
204203

205204
#undef SVE_VECTOR_TYPE
205+
#undef SVE_VECTOR_TYPE_MFLOAT
206206
#undef SVE_VECTOR_TYPE_BFLOAT
207207
#undef SVE_VECTOR_TYPE_FLOAT
208208
#undef SVE_VECTOR_TYPE_INT
209209
#undef SVE_PREDICATE_TYPE
210210
#undef SVE_PREDICATE_TYPE_ALL
211211
#undef SVE_OPAQUE_TYPE
212-
#undef AARCH64_VECTOR_TYPE_MFLOAT
213-
#undef AARCH64_VECTOR_TYPE
212+
#undef SVE_SCALAR_TYPE
214213
#undef SVE_TYPE

clang/include/clang/Basic/LangOptions.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -144,6 +144,7 @@ class LangOptionsBase {
144144
MSVC2019_5 = 1925,
145145
MSVC2019_8 = 1928,
146146
MSVC2022_3 = 1933,
147+
MSVC2022_9 = 1939,
147148
};
148149

149150
enum SYCLMajorVersion {

clang/include/clang/Basic/arm_neon.td

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2119,6 +2119,28 @@ let ArchGuard = "defined(__aarch64__)", TargetGuard = "lut" in {
21192119
}
21202120
}
21212121

2122+
let ArchGuard = "defined(__aarch64__)", TargetGuard = "fp8,neon" in {
2123+
def VBF1CVT_BF16_MF8 : VInst<"vcvt1_bf16_mf8_fpm", "(QB).V", "m">;
2124+
def VBF1CVT_LOW_BF16_MF8 : VInst<"vcvt1_low_bf16_mf8_fpm", "B.V", "Hm">;
2125+
def VBF2CVTL_BF16_MF8 : VInst<"vcvt2_bf16_mf8_fpm", "(QB).V", "m">;
2126+
def VBF2CVTL_LOW_BF16_MF8 : VInst<"vcvt2_low_bf16_mf8_fpm", "B.V", "Hm">;
2127+
def VBF1CVTL2_HIGH_BF16_MF8 : VInst<"vcvt1_high_bf16_mf8_fpm", "B.V", "Hm">;
2128+
def VBF2CVTL2_HIGH_BF16_MF8 : VInst<"vcvt2_high_bf16_mf8_fpm", "B.V", "Hm">;
2129+
}
2130+
2131+
let ArchGuard = "defined(__aarch64__)", TargetGuard = "fp8,neon" in {
2132+
def VF1CVT_F16_MF8 : VInst<"vcvt1_f16_mf8_fpm", "(>QF).V", "m">;
2133+
def VF1CVT_LOW_F16_MF8 : VInst<"vcvt1_low_f16_mf8_fpm", "(>F).V", "Hm">;
2134+
def VF2CVTL_F16_MF8 : VInst<"vcvt2_f16_mf8_fpm", "(>QF).V", "m">;
2135+
def VF2CVTL_LOW_F16_MF8 : VInst<"vcvt2_low_f16_mf8_fpm", "(>F).V", "Hm">;
2136+
def VF1CVTL2_HIGH_F16_MF8 : VInst<"vcvt1_high_f16_mf8_fpm", "(>F).V", "Hm">;
2137+
def VF2CVTL2_HIGH_F16_MF8 : VInst<"vcvt2_high_f16_mf8_fpm", "(>F).V", "Hm">;
2138+
2139+
def VCVTN_LOW_F8_F32 : VInst<"vcvt_mf8_f32_fpm", ".(>>QF)(>>QF)V", "m">;
2140+
def VCVTN_HIGH_F8_F32 : VInst<"vcvt_high_mf8_f32_fpm", ".(q)(>>F)(>>F)V", "Hm">;
2141+
def VCVTN_F8_F16 : VInst<"vcvt_mf8_f16_fpm", ".(>F)(>F)V", "mQm">;
2142+
}
2143+
21222144
let ArchGuard = "defined(__aarch64__)", TargetGuard = "neon,faminmax" in {
21232145
def FAMIN : WInst<"vamin", "...", "fhQdQfQh">;
21242146
def FAMAX : WInst<"vamax", "...", "fhQdQfQh">;

clang/include/clang/Basic/arm_neon_incl.td

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -243,6 +243,7 @@ def OP_UNAVAILABLE : Operation {
243243
// B: change to BFloat16
244244
// P: change to polynomial category.
245245
// p: change polynomial to equivalent integer category. Otherwise nop.
246+
// V: change to fpm_t
246247
//
247248
// >: double element width (vector size unchanged).
248249
// <: half element width (vector size unchanged).
@@ -301,6 +302,7 @@ class Inst <string n, string p, string t, Operation o, list<ImmCheck> ch = []>{
301302
class SInst<string n, string p, string t, list<ImmCheck> ch = []> : Inst<n, p, t, OP_NONE, ch> {}
302303
class IInst<string n, string p, string t, list<ImmCheck> ch = []> : Inst<n, p, t, OP_NONE, ch> {}
303304
class WInst<string n, string p, string t, list<ImmCheck> ch = []> : Inst<n, p, t, OP_NONE, ch> {}
305+
class VInst<string n, string p, string t> : Inst<n, p, t, OP_NONE> {}
304306

305307
// The following instruction classes are implemented via operators
306308
// instead of builtins. As such these declarations are only used for

clang/lib/AST/ASTContext.cpp

Lines changed: 18 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -2269,11 +2269,10 @@ TypeInfo ASTContext::getTypeInfoImpl(const Type *T) const {
22692269
Width = 0; \
22702270
Align = 16; \
22712271
break;
2272-
#define AARCH64_VECTOR_TYPE_MFLOAT(Name, MangledName, Id, SingletonId, NumEls, \
2273-
ElBits, NF) \
2272+
#define SVE_SCALAR_TYPE(Name, MangledName, Id, SingletonId, Bits) \
22742273
case BuiltinType::Id: \
2275-
Width = NumEls * ElBits * NF; \
2276-
Align = NumEls * ElBits; \
2274+
Width = Bits; \
2275+
Align = Bits; \
22772276
break;
22782277
#include "clang/Basic/AArch64SVEACLETypes.def"
22792278
#define PPC_VECTOR_TYPE(Name, Id, Size) \
@@ -4423,15 +4422,14 @@ ASTContext::getBuiltinVectorTypeInfo(const BuiltinType *Ty) const {
44234422
ElBits, NF) \
44244423
case BuiltinType::Id: \
44254424
return {BFloat16Ty, llvm::ElementCount::getScalable(NumEls), NF};
4425+
#define SVE_VECTOR_TYPE_MFLOAT(Name, MangledName, Id, SingletonId, NumEls, \
4426+
ElBits, NF) \
4427+
case BuiltinType::Id: \
4428+
return {MFloat8Ty, llvm::ElementCount::getScalable(NumEls), NF};
44264429
#define SVE_PREDICATE_TYPE_ALL(Name, MangledName, Id, SingletonId, NumEls, NF) \
44274430
case BuiltinType::Id: \
44284431
return {BoolTy, llvm::ElementCount::getScalable(NumEls), NF};
4429-
#define AARCH64_VECTOR_TYPE_MFLOAT(Name, MangledName, Id, SingletonId, NumEls, \
4430-
ElBits, NF) \
4431-
case BuiltinType::Id: \
4432-
return {getIntTypeForBitwidth(ElBits, false), \
4433-
llvm::ElementCount::getFixed(NumEls), NF};
4434-
#define SVE_OPAQUE_TYPE(Name, MangledName, Id, SingletonId)
4432+
#define SVE_TYPE(Name, Id, SingletonId)
44354433
#include "clang/Basic/AArch64SVEACLETypes.def"
44364434

44374435
#define RVV_VECTOR_TYPE_INT(Name, Id, SingletonId, NumEls, ElBits, NF, \
@@ -4493,11 +4491,16 @@ QualType ASTContext::getScalableVectorType(QualType EltTy, unsigned NumElts,
44934491
EltTySize == ElBits && NumElts == (NumEls * NF) && NumFields == 1) { \
44944492
return SingletonId; \
44954493
}
4494+
#define SVE_VECTOR_TYPE_MFLOAT(Name, MangledName, Id, SingletonId, NumEls, \
4495+
ElBits, NF) \
4496+
if (EltTy->isMFloat8Type() && EltTySize == ElBits && \
4497+
NumElts == (NumEls * NF) && NumFields == 1) { \
4498+
return SingletonId; \
4499+
}
44964500
#define SVE_PREDICATE_TYPE_ALL(Name, MangledName, Id, SingletonId, NumEls, NF) \
44974501
if (EltTy->isBooleanType() && NumElts == (NumEls * NF) && NumFields == 1) \
44984502
return SingletonId;
4499-
#define SVE_OPAQUE_TYPE(Name, MangledName, Id, SingletonId)
4500-
#define AARCH64_VECTOR_TYPE(Name, MangledName, Id, SingletonId)
4503+
#define SVE_TYPE(Name, Id, SingletonId)
45014504
#include "clang/Basic/AArch64SVEACLETypes.def"
45024505
} else if (Target->hasRISCVVTypes()) {
45034506
uint64_t EltTySize = getTypeSize(EltTy);
@@ -12382,6 +12385,9 @@ static QualType DecodeTypeFromStr(const char *&Str, const ASTContext &Context,
1238212385
case 'p':
1238312386
Type = Context.getProcessIDType();
1238412387
break;
12388+
case 'm':
12389+
Type = Context.MFloat8Ty;
12390+
break;
1238512391
}
1238612392

1238712393
// If there are modifiers and if we're allowed to parse them, go for it.

clang/lib/AST/ASTImporter.cpp

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4701,9 +4701,13 @@ ExpectedDecl ASTNodeImporter::VisitImplicitParamDecl(ImplicitParamDecl *D) {
47014701

47024702
Error ASTNodeImporter::ImportDefaultArgOfParmVarDecl(
47034703
const ParmVarDecl *FromParam, ParmVarDecl *ToParam) {
4704+
4705+
if (auto LocOrErr = import(FromParam->getExplicitObjectParamThisLoc()))
4706+
ToParam->setExplicitObjectParameterLoc(*LocOrErr);
4707+
else
4708+
return LocOrErr.takeError();
4709+
47044710
ToParam->setHasInheritedDefaultArg(FromParam->hasInheritedDefaultArg());
4705-
ToParam->setExplicitObjectParameterLoc(
4706-
FromParam->getExplicitObjectParamThisLoc());
47074711
ToParam->setKNRPromoted(FromParam->isKNRPromoted());
47084712

47094713
if (FromParam->hasUninstantiatedDefaultArg()) {

clang/lib/AST/Decl.cpp

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3314,6 +3314,10 @@ bool FunctionDecl::isImmediateFunction() const {
33143314
.getConstructor()
33153315
->isImmediateFunction();
33163316

3317+
if (FunctionDecl *P = getTemplateInstantiationPattern();
3318+
P && P->isImmediateFunction())
3319+
return true;
3320+
33173321
if (const auto *MD = dyn_cast<CXXMethodDecl>(this);
33183322
MD && MD->isLambdaStaticInvoker())
33193323
return MD->getParent()->getLambdaCallOperator()->isImmediateFunction();
@@ -4356,9 +4360,9 @@ FunctionDecl::getTemplateSpecializationKindForInstantiation() const {
43564360
void
43574361
FunctionDecl::setTemplateSpecializationKind(TemplateSpecializationKind TSK,
43584362
SourceLocation PointOfInstantiation) {
4359-
if (FunctionTemplateSpecializationInfo *FTSInfo
4360-
= TemplateOrSpecialization.dyn_cast<
4361-
FunctionTemplateSpecializationInfo*>()) {
4363+
if (FunctionTemplateSpecializationInfo *FTSInfo =
4364+
dyn_cast<FunctionTemplateSpecializationInfo *>(
4365+
TemplateOrSpecialization)) {
43624366
FTSInfo->setTemplateSpecializationKind(TSK);
43634367
if (TSK != TSK_ExplicitSpecialization &&
43644368
PointOfInstantiation.isValid() &&
@@ -4367,8 +4371,9 @@ FunctionDecl::setTemplateSpecializationKind(TemplateSpecializationKind TSK,
43674371
if (ASTMutationListener *L = getASTContext().getASTMutationListener())
43684372
L->InstantiationRequested(this);
43694373
}
4370-
} else if (MemberSpecializationInfo *MSInfo
4371-
= TemplateOrSpecialization.dyn_cast<MemberSpecializationInfo*>()) {
4374+
} else if (MemberSpecializationInfo *MSInfo =
4375+
dyn_cast<MemberSpecializationInfo *>(
4376+
TemplateOrSpecialization)) {
43724377
MSInfo->setTemplateSpecializationKind(TSK);
43734378
if (TSK != TSK_ExplicitSpecialization &&
43744379
PointOfInstantiation.isValid() &&

0 commit comments

Comments
 (0)