Skip to content

Commit fb4af96

Browse files
committed
[NFC] Add DeclNameLoc to specialize/dynamicReplacement
1 parent 84625f3 commit fb4af96

File tree

7 files changed

+76
-47
lines changed

7 files changed

+76
-47
lines changed

include/swift/AST/ASTBridging.h

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1013,11 +1013,12 @@ BridgedDocumentationAttr BridgedDocumentationAttr_createParsed(
10131013

10141014
SWIFT_NAME(
10151015
"BridgedDynamicReplacementAttr.createParsed(_:atLoc:attrNameLoc:lParenLoc:"
1016-
"replacedFunction:rParenLoc:)")
1016+
"replacedFunction:replacedFunctionLoc:rParenLoc:)")
10171017
BridgedDynamicReplacementAttr BridgedDynamicReplacementAttr_createParsed(
10181018
BridgedASTContext cContext, BridgedSourceLoc cAtLoc,
10191019
BridgedSourceLoc cAttrNameLoc, BridgedSourceLoc cLParenLoc,
1020-
BridgedDeclNameRef cReplacedFunction, BridgedSourceLoc cRParenLoc);
1020+
BridgedDeclNameRef cReplacedFunction,
1021+
BridgedDeclNameLoc cReplacedFunctionLoc, BridgedSourceLoc cRParenLoc);
10211022

10221023
enum ENUM_EXTENSIBILITY_ATTR(closed) BridgedEffectsKind {
10231024
BridgedEffectsKindReadNone,
@@ -1374,13 +1375,14 @@ enum ENUM_EXTENSIBILITY_ATTR(closed) BridgedSpecializationKind : uint8_t {
13741375
};
13751376

13761377
SWIFT_NAME("BridgedSpecializeAttr.createParsed(_:atLoc:range:whereClause:"
1377-
"exported:kind:taretFunction:spiGroups:availableAttrs:)")
1378+
"exported:kind:targetFunction:targetFunctionLoc:spiGroups:"
1379+
"availableAttrs:)")
13781380
BridgedSpecializeAttr BridgedSpecializeAttr_createParsed(
13791381
BridgedASTContext cContext, BridgedSourceLoc cAtLoc,
13801382
BridgedSourceRange cRange, BridgedNullableTrailingWhereClause cWhereClause,
13811383
bool exported, BridgedSpecializationKind cKind,
1382-
BridgedDeclNameRef cTargetFunction, BridgedArrayRef cSPIGroups,
1383-
BridgedArrayRef cAvailableAttrs);
1384+
BridgedDeclNameRef cTargetFunction, BridgedDeclNameLoc cTargetFunctionLoc,
1385+
BridgedArrayRef cSPIGroups, BridgedArrayRef cAvailableAttrs);
13841386

13851387
SWIFT_NAME(
13861388
"BridgedSPIAccessControlAttr.createParsed(_:atLoc:range:spiGroupName:)")

include/swift/AST/Attr.h

Lines changed: 22 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1203,19 +1203,22 @@ class DynamicReplacementAttr final
12031203
friend class DynamicallyReplacedDeclRequest;
12041204

12051205
DeclNameRef ReplacedFunctionName;
1206+
DeclNameLoc ReplacedFunctionNameLoc;
12061207
LazyMemberLoader *Resolver = nullptr;
12071208
uint64_t ResolverContextData;
12081209

12091210
/// Create an @_dynamicReplacement(for:) attribute written in the source.
12101211
DynamicReplacementAttr(SourceLoc atLoc, SourceRange baseRange,
12111212
DeclNameRef replacedFunctionName,
1213+
DeclNameLoc replacedFunctionNameLoc,
12121214
SourceRange parenRange);
12131215

12141216
DynamicReplacementAttr(DeclNameRef name, AbstractFunctionDecl *f)
12151217
: DeclAttribute(DeclAttrKind::DynamicReplacement, SourceLoc(),
12161218
SourceRange(),
12171219
/*Implicit=*/false),
1218-
ReplacedFunctionName(name), Resolver(nullptr), ResolverContextData(0) {
1220+
ReplacedFunctionName(name), ReplacedFunctionNameLoc(),
1221+
Resolver(nullptr), ResolverContextData(0) {
12191222
Bits.DynamicReplacementAttr.HasTrailingLocationInfo = false;
12201223
}
12211224

@@ -1224,8 +1227,8 @@ class DynamicReplacementAttr final
12241227
: DeclAttribute(DeclAttrKind::DynamicReplacement, SourceLoc(),
12251228
SourceRange(),
12261229
/*Implicit=*/false),
1227-
ReplacedFunctionName(name), Resolver(Resolver),
1228-
ResolverContextData(Data) {
1230+
ReplacedFunctionName(name), ReplacedFunctionNameLoc(),
1231+
Resolver(Resolver), ResolverContextData(Data) {
12291232
Bits.DynamicReplacementAttr.HasTrailingLocationInfo = false;
12301233
}
12311234

@@ -1246,7 +1249,8 @@ class DynamicReplacementAttr final
12461249
public:
12471250
static DynamicReplacementAttr *
12481251
create(ASTContext &Context, SourceLoc AtLoc, SourceLoc DynReplLoc,
1249-
SourceLoc LParenLoc, DeclNameRef replacedFunction, SourceLoc RParenLoc);
1252+
SourceLoc LParenLoc, DeclNameRef replacedFunction,
1253+
DeclNameLoc replacedFunctionNameLoc, SourceLoc RParenLoc);
12501254

12511255
static DynamicReplacementAttr *create(ASTContext &ctx,
12521256
DeclNameRef replacedFunction,
@@ -1261,6 +1265,10 @@ class DynamicReplacementAttr final
12611265
return ReplacedFunctionName;
12621266
}
12631267

1268+
DeclNameLoc getReplacedFunctionNameLoc() const {
1269+
return ReplacedFunctionNameLoc;
1270+
}
1271+
12641272
/// Retrieve the location of the opening parentheses, if there is one.
12651273
SourceLoc getLParenLoc() const;
12661274

@@ -1748,6 +1756,7 @@ class SpecializeAttr final
17481756
GenericSignature specializedSignature;
17491757

17501758
DeclNameRef targetFunctionName;
1759+
DeclNameLoc targetFunctionNameLoc;
17511760
LazyMemberLoader *resolver = nullptr;
17521761
uint64_t resolverContextData;
17531762
size_t numSPIGroups;
@@ -1758,15 +1767,18 @@ class SpecializeAttr final
17581767
SpecializeAttr(SourceLoc atLoc, SourceRange Range,
17591768
TrailingWhereClause *clause, bool exported,
17601769
SpecializationKind kind, GenericSignature specializedSignature,
1761-
DeclNameRef targetFunctionName, ArrayRef<Identifier> spiGroups,
1770+
DeclNameRef targetFunctionName,
1771+
DeclNameLoc targetFunctionNameLoc,
1772+
ArrayRef<Identifier> spiGroups,
17621773
ArrayRef<AvailableAttr *> availabilityAttrs,
17631774
size_t typeErasedParamsCount);
17641775

17651776
public:
17661777
static SpecializeAttr *
17671778
create(ASTContext &Ctx, SourceLoc atLoc, SourceRange Range,
17681779
TrailingWhereClause *clause, bool exported, SpecializationKind kind,
1769-
DeclNameRef targetFunctionName, ArrayRef<Identifier> spiGroups,
1780+
DeclNameRef targetFunctionName, DeclNameLoc targetFunctionNameLoc,
1781+
ArrayRef<Identifier> spiGroups,
17701782
ArrayRef<AvailableAttr *> availabilityAttrs,
17711783
GenericSignature specializedSignature = nullptr);
17721784

@@ -1845,6 +1857,10 @@ class SpecializeAttr final
18451857
return targetFunctionName;
18461858
}
18471859

1860+
DeclNameLoc getTargetFunctionNameLoc() const {
1861+
return targetFunctionNameLoc;
1862+
}
1863+
18481864
/// \p forDecl is the value decl that the attribute belongs to.
18491865
ValueDecl *getTargetFunctionDecl(const ValueDecl *forDecl) const;
18501866

include/swift/Parse/Parser.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1081,7 +1081,7 @@ class Parser {
10811081
std::optional<bool> &Exported,
10821082
std::optional<SpecializeAttr::SpecializationKind> &Kind,
10831083
TrailingWhereClause *&TrailingWhereClause, DeclNameRef &targetFunction,
1084-
AvailabilityRange *SILAvailability,
1084+
DeclNameLoc &targetFunctionLoc, AvailabilityRange *SILAvailability,
10851085
SmallVectorImpl<Identifier> &spiGroups,
10861086
SmallVectorImpl<AvailableAttr *> &availableAttrs,
10871087
llvm::function_ref<bool(Parser &)> parseSILTargetName,

lib/AST/Attr.cpp

Lines changed: 15 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2061,10 +2061,11 @@ PrivateImportAttr *PrivateImportAttr::create(ASTContext &Ctxt, SourceLoc AtLoc,
20612061
DynamicReplacementAttr::DynamicReplacementAttr(SourceLoc atLoc,
20622062
SourceRange baseRange,
20632063
DeclNameRef name,
2064+
DeclNameLoc nameLoc,
20642065
SourceRange parenRange)
20652066
: DeclAttribute(DeclAttrKind::DynamicReplacement, atLoc, baseRange,
20662067
/*Implicit=*/false),
2067-
ReplacedFunctionName(name) {
2068+
ReplacedFunctionName(name), ReplacedFunctionNameLoc(nameLoc) {
20682069
Bits.DynamicReplacementAttr.HasTrailingLocationInfo = true;
20692070
getTrailingLocations()[0] = parenRange.Start;
20702071
getTrailingLocations()[1] = parenRange.End;
@@ -2073,11 +2074,12 @@ DynamicReplacementAttr::DynamicReplacementAttr(SourceLoc atLoc,
20732074
DynamicReplacementAttr *
20742075
DynamicReplacementAttr::create(ASTContext &Ctx, SourceLoc AtLoc,
20752076
SourceLoc DynReplLoc, SourceLoc LParenLoc,
2076-
DeclNameRef ReplacedFunction, SourceLoc RParenLoc) {
2077+
DeclNameRef ReplacedFunction,
2078+
DeclNameLoc nameLoc, SourceLoc RParenLoc) {
20772079
void *mem = Ctx.Allocate(totalSizeToAlloc<SourceLoc>(2),
20782080
alignof(DynamicReplacementAttr));
20792081
return new (mem) DynamicReplacementAttr(
2080-
AtLoc, SourceRange(DynReplLoc, RParenLoc), ReplacedFunction,
2082+
AtLoc, SourceRange(DynReplLoc, RParenLoc), ReplacedFunction, nameLoc,
20812083
SourceRange(LParenLoc, RParenLoc));
20822084
}
20832085

@@ -2427,13 +2429,16 @@ SpecializeAttr::SpecializeAttr(SourceLoc atLoc, SourceRange range,
24272429
SpecializationKind kind,
24282430
GenericSignature specializedSignature,
24292431
DeclNameRef targetFunctionName,
2432+
DeclNameLoc targetFunctionNameLoc,
24302433
ArrayRef<Identifier> spiGroups,
24312434
ArrayRef<AvailableAttr *> availableAttrs,
24322435
size_t typeErasedParamsCount)
24332436
: DeclAttribute(DeclAttrKind::Specialize, atLoc, range,
24342437
/*Implicit=*/clause == nullptr),
24352438
trailingWhereClause(clause), specializedSignature(specializedSignature),
2436-
targetFunctionName(targetFunctionName), numSPIGroups(spiGroups.size()),
2439+
targetFunctionName(targetFunctionName),
2440+
targetFunctionNameLoc(targetFunctionNameLoc),
2441+
numSPIGroups(spiGroups.size()),
24372442
numAvailableAttrs(availableAttrs.size()),
24382443
numTypeErasedParams(typeErasedParamsCount),
24392444
typeErasedParamsInitialized(false) {
@@ -2455,6 +2460,7 @@ SpecializeAttr *SpecializeAttr::create(ASTContext &Ctx, SourceLoc atLoc,
24552460
TrailingWhereClause *clause,
24562461
bool exported, SpecializationKind kind,
24572462
DeclNameRef targetFunctionName,
2463+
DeclNameLoc targetFunctionNameLoc,
24582464
ArrayRef<Identifier> spiGroups,
24592465
ArrayRef<AvailableAttr *> availableAttrs,
24602466
GenericSignature specializedSignature) {
@@ -2480,7 +2486,8 @@ SpecializeAttr *SpecializeAttr::create(ASTContext &Ctx, SourceLoc atLoc,
24802486

24812487
return new (mem)
24822488
SpecializeAttr(atLoc, range, clause, exported, kind, specializedSignature,
2483-
targetFunctionName, spiGroups, availableAttrs, typeErasedParamsCount);
2489+
targetFunctionName, targetFunctionNameLoc, spiGroups,
2490+
availableAttrs, typeErasedParamsCount);
24842491
}
24852492

24862493
SpecializeAttr *SpecializeAttr::create(ASTContext &ctx, bool exported,
@@ -2494,7 +2501,7 @@ SpecializeAttr *SpecializeAttr::create(ASTContext &ctx, bool exported,
24942501
void *mem = ctx.Allocate(size, alignof(SpecializeAttr));
24952502
return new (mem) SpecializeAttr(
24962503
SourceLoc(), SourceRange(), nullptr, exported, kind, specializedSignature,
2497-
targetFunctionName, spiGroups, availableAttrs, 0);
2504+
targetFunctionName, DeclNameLoc(), spiGroups, availableAttrs, 0);
24982505
}
24992506

25002507
SpecializeAttr *SpecializeAttr::create(
@@ -2508,7 +2515,8 @@ SpecializeAttr *SpecializeAttr::create(
25082515
void *mem = ctx.Allocate(size, alignof(SpecializeAttr));
25092516
auto *attr = new (mem) SpecializeAttr(
25102517
SourceLoc(), SourceRange(), nullptr, exported, kind, specializedSignature,
2511-
targetFunctionName, spiGroups, availableAttrs, typeErasedParams.size());
2518+
targetFunctionName, DeclNameLoc(), spiGroups, availableAttrs,
2519+
typeErasedParams.size());
25122520
attr->setTypeErasedParams(typeErasedParams);
25132521
attr->resolver = resolver;
25142522
attr->resolverContextData = data;

lib/AST/Bridging/DeclAttributeBridging.cpp

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -322,11 +322,12 @@ BridgedDifferentiableAttr BridgedDifferentiableAttr_createParsed(
322322
BridgedDynamicReplacementAttr BridgedDynamicReplacementAttr_createParsed(
323323
BridgedASTContext cContext, BridgedSourceLoc cAtLoc,
324324
BridgedSourceLoc cAttrNameLoc, BridgedSourceLoc cLParenLoc,
325-
BridgedDeclNameRef cReplacedFunction, BridgedSourceLoc cRParenLoc) {
325+
BridgedDeclNameRef cReplacedFunction,
326+
BridgedDeclNameLoc cReplacedFunctionLoc, BridgedSourceLoc cRParenLoc) {
326327
return DynamicReplacementAttr::create(
327328
cContext.unbridged(), cAtLoc.unbridged(), cAttrNameLoc.unbridged(),
328329
cLParenLoc.unbridged(), cReplacedFunction.unbridged(),
329-
cRParenLoc.unbridged());
330+
cReplacedFunctionLoc.unbridged(), cRParenLoc.unbridged());
330331
}
331332

332333
BridgedDocumentationAttr BridgedDocumentationAttr_createParsed(
@@ -834,8 +835,8 @@ BridgedSpecializeAttr BridgedSpecializeAttr_createParsed(
834835
BridgedASTContext cContext, BridgedSourceLoc cAtLoc,
835836
BridgedSourceRange cRange, BridgedNullableTrailingWhereClause cWhereClause,
836837
bool exported, BridgedSpecializationKind cKind,
837-
BridgedDeclNameRef cTargetFunction, BridgedArrayRef cSPIGroups,
838-
BridgedArrayRef cAvailableAttrs) {
838+
BridgedDeclNameRef cTargetFunction, BridgedDeclNameLoc cTargetFunctionLoc,
839+
BridgedArrayRef cSPIGroups, BridgedArrayRef cAvailableAttrs) {
839840
SmallVector<Identifier, 2> spiGroups;
840841
for (auto bridging : cSPIGroups.unbridged<BridgedIdentifier>())
841842
spiGroups.push_back(bridging.unbridged());
@@ -846,7 +847,8 @@ BridgedSpecializeAttr BridgedSpecializeAttr_createParsed(
846847
return SpecializeAttr::create(
847848
cContext.unbridged(), cAtLoc.unbridged(), cRange.unbridged(),
848849
cWhereClause.unbridged(), exported, unbridge(cKind),
849-
cTargetFunction.unbridged(), spiGroups, availableAttrs);
850+
cTargetFunction.unbridged(), cTargetFunctionLoc.unbridged(),
851+
spiGroups, availableAttrs);
850852
}
851853

852854
BridgedSPIAccessControlAttr BridgedSPIAccessControlAttr_createParsed(
@@ -899,4 +901,4 @@ BridgedUnavailableFromAsyncAttr BridgedUnavailableFromAsyncAttr_createParsed(
899901
return new (cContext.unbridged())
900902
UnavailableFromAsyncAttr(cMessage.unbridged(), cAtLoc.unbridged(),
901903
cRange.unbridged(), /*implicit=*/false);
902-
}
904+
}

lib/ASTGen/Sources/ASTGen/DeclAttrs.swift

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -738,6 +738,7 @@ extension ASTGenVisitor {
738738
attrNameLoc: self.generateSourceLoc(node.attributeName),
739739
lParenLoc: self.generateSourceLoc(node.leftParen),
740740
replacedFunction: replacedFunction.name,
741+
replacedFunctionLoc: replacedFunction.loc,
741742
rParenLoc: self.generateSourceLoc(node.rightParen)
742743
)
743744
}
@@ -1860,7 +1861,7 @@ extension ASTGenVisitor {
18601861
var exported: Bool?
18611862
var kind: BridgedSpecializationKind? = nil
18621863
var whereClause: BridgedTrailingWhereClause? = nil
1863-
var targetFunction: BridgedDeclNameRef? = nil
1864+
var targetFunction: (name: BridgedDeclNameRef, loc: BridgedDeclNameLoc)?
18641865
var spiGroups: [BridgedIdentifier] = []
18651866
var availableAttrs: [BridgedAvailableAttr] = []
18661867

@@ -1872,7 +1873,7 @@ extension ASTGenVisitor {
18721873
if targetFunction != nil {
18731874
// TODO: Diangose.
18741875
}
1875-
targetFunction = self.generateDeclNameRef(declReferenceExpr: arg.declName).name
1876+
targetFunction = self.generateDeclNameRef(declReferenceExpr: arg.declName)
18761877
case .specializeAvailabilityArgument(let arg):
18771878
availableAttrs = self.generateAvailableAttr(
18781879
atLoc: self.generateSourceLoc(arg.availabilityLabel),
@@ -1936,7 +1937,8 @@ extension ASTGenVisitor {
19361937
whereClause: whereClause.asNullable,
19371938
exported: exported ?? false,
19381939
kind: kind ?? .full,
1939-
taretFunction: targetFunction ?? BridgedDeclNameRef(),
1940+
targetFunction: targetFunction?.name ?? BridgedDeclNameRef(),
1941+
targetFunctionLoc: targetFunction?.loc ?? BridgedDeclNameLoc(),
19401942
spiGroups: spiGroups.lazy.bridgedArray(in: self),
19411943
availableAttrs: availableAttrs.lazy.bridgedArray(in: self)
19421944
)

lib/Parse/ParseDecl.cpp

Lines changed: 18 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -564,8 +564,8 @@ bool Parser::parseSpecializeAttributeArguments(
564564
std::optional<bool> &Exported,
565565
std::optional<SpecializeAttr::SpecializationKind> &Kind,
566566
swift::TrailingWhereClause *&TrailingWhereClause,
567-
DeclNameRef &targetFunction, AvailabilityRange *SILAvailability,
568-
SmallVectorImpl<Identifier> &spiGroups,
567+
DeclNameRef &targetFunction, DeclNameLoc &targetFunctionLoc,
568+
AvailabilityRange *SILAvailability, SmallVectorImpl<Identifier> &spiGroups,
569569
SmallVectorImpl<AvailableAttr *> &availableAttrs,
570570
llvm::function_ref<bool(Parser &)> parseSILTargetName,
571571
llvm::function_ref<bool(Parser &)> parseSILSIPModule) {
@@ -666,9 +666,8 @@ bool Parser::parseSpecializeAttributeArguments(
666666
}
667667
if (ParamLabel == "target") {
668668
if (!parseSILTargetName(*this)) {
669-
DeclNameLoc loc;
670669
targetFunction = parseDeclNameRef(
671-
loc, diag::attr_specialize_expected_function,
670+
targetFunctionLoc, diag::attr_specialize_expected_function,
672671
DeclNameFlag::AllowZeroArgCompoundNames |
673672
DeclNameFlag::AllowKeywordsUsingSpecialNames |
674673
DeclNameFlag::AllowOperators |
@@ -881,12 +880,13 @@ bool Parser::parseSpecializeAttribute(
881880
TrailingWhereClause *trailingWhereClause = nullptr;
882881

883882
DeclNameRef targetFunction;
883+
DeclNameLoc targetFunctionLoc;
884884
SmallVector<Identifier, 4> spiGroups;
885885
SmallVector<AvailableAttr *, 4> availableAttrs;
886886
if (!parseSpecializeAttributeArguments(
887887
ClosingBrace, DiscardAttribute, exported, kind, trailingWhereClause,
888-
targetFunction, SILAvailability, spiGroups, availableAttrs,
889-
parseSILTargetName, parseSILSIPModule)) {
888+
targetFunction, targetFunctionLoc, SILAvailability, spiGroups,
889+
availableAttrs, parseSILTargetName, parseSILSIPModule)) {
890890
return false;
891891
}
892892

@@ -916,8 +916,8 @@ bool Parser::parseSpecializeAttribute(
916916
// Store the attribute.
917917
Attr = SpecializeAttr::create(Context, AtLoc, SourceRange(Loc, rParenLoc),
918918
trailingWhereClause, exported.value(),
919-
kind.value(), targetFunction, spiGroups,
920-
availableAttrs);
919+
kind.value(), targetFunction, targetFunctionLoc,
920+
spiGroups, availableAttrs);
921921
return true;
922922
}
923923

@@ -3517,6 +3517,7 @@ ParserStatus Parser::parseNewDeclAttribute(DeclAttributes &Attributes,
35173517

35183518
SourceLoc LParenLoc = consumeAttributeLParen();
35193519
DeclNameRef replacedFunction;
3520+
DeclNameLoc replacedFunctionLoc;
35203521
{
35213522
// Parse 'for'.
35223523
if (Tok.getText() != "for") {
@@ -3531,16 +3532,13 @@ ParserStatus Parser::parseNewDeclAttribute(DeclAttributes &Attributes,
35313532
return makeParserSuccess();
35323533
}
35333534
consumeToken(tok::colon);
3534-
{
3535-
DeclNameLoc loc;
3536-
replacedFunction = parseDeclNameRef(
3537-
loc, diag::attr_dynamic_replacement_expected_function,
3538-
DeclNameFlag::AllowZeroArgCompoundNames |
3539-
DeclNameFlag::AllowKeywordsUsingSpecialNames |
3540-
DeclNameFlag::AllowOperators |
3541-
DeclNameFlag::AllowLowercaseAndUppercaseSelf |
3542-
DeclNameFlag::AllowModuleSelector);
3543-
}
3535+
replacedFunction = parseDeclNameRef(
3536+
replacedFunctionLoc, diag::attr_dynamic_replacement_expected_function,
3537+
DeclNameFlag::AllowZeroArgCompoundNames |
3538+
DeclNameFlag::AllowKeywordsUsingSpecialNames |
3539+
DeclNameFlag::AllowOperators |
3540+
DeclNameFlag::AllowLowercaseAndUppercaseSelf |
3541+
DeclNameFlag::AllowModuleSelector);
35443542
}
35453543

35463544
// Parse the matching ')'.
@@ -3554,7 +3552,8 @@ ParserStatus Parser::parseNewDeclAttribute(DeclAttributes &Attributes,
35543552

35553553

35563554
DynamicReplacementAttr *attr = DynamicReplacementAttr::create(
3557-
Context, AtLoc, Loc, LParenLoc, replacedFunction, RParenLoc);
3555+
Context, AtLoc, Loc, LParenLoc, replacedFunction, replacedFunctionLoc,
3556+
RParenLoc);
35583557
Attributes.add(attr);
35593558
break;
35603559
}

0 commit comments

Comments
 (0)