Skip to content

Commit 0380443

Browse files
committed
---
yaml --- r: 343727 b: refs/heads/master-rebranch c: 019a13a h: refs/heads/master i: 343725: d1c3a55 343723: d2b5711 343719: 1b8238c 343711: 1432671
1 parent 2206c97 commit 0380443

File tree

3 files changed

+3
-18
lines changed

3 files changed

+3
-18
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1455,7 +1455,7 @@ refs/tags/swift-DEVELOPMENT-SNAPSHOT-2019-08-02-a: ddd2b2976aa9bfde5f20fe37f6bd2
14551455
refs/tags/swift-DEVELOPMENT-SNAPSHOT-2019-08-03-a: 171cc166f2abeb5ca2a4003700a8a78a108bd300
14561456
refs/heads/benlangmuir-patch-1: baaebaf39d52f3bf36710d4fe40cf212e996b212
14571457
refs/heads/i-do-redeclare: 8c4e6d5de5c1e3f0a2cedccf319df713ea22c48e
1458-
refs/heads/master-rebranch: c13f68881a1e15369c789db476e05269f1df1384
1458+
refs/heads/master-rebranch: 019a13ab7027a2d3a58c184e53e38a5f01dc7a22
14591459
refs/heads/rdar-53901732: 9bd06af3284e18a109cdbf9aa59d833b24eeca7b
14601460
refs/heads/revert-26776-subst-always-returns-a-type: 1b8e18fdd391903a348970a4c848995d4cdd789c
14611461
refs/heads/tensorflow-merge: 8b854f62f80d4476cb383d43c4aac2001dde3cec

branches/master-rebranch/include/swift/Parse/ASTGen.h

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -97,10 +97,6 @@ class ASTGen {
9797

9898
static SourceLoc advanceLocBegin(const SourceLoc &Loc,
9999
const syntax::Syntax &Node);
100-
static SourceLoc advanceLocEnd(const SourceLoc &Loc,
101-
const syntax::TokenSyntax &Token);
102-
static SourceLoc advanceLocAfter(const SourceLoc &Loc,
103-
const syntax::Syntax &Node);
104100

105101
static MagicIdentifierLiteralExpr::Kind getMagicIdentifierLiteralKind(tok Kind);
106102

branches/master-rebranch/lib/Parse/ASTGen.cpp

Lines changed: 2 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -224,10 +224,8 @@ TypeRepr *ASTGen::generate(AttributedTypeSyntax Type, SourceLoc &Loc) {
224224

225225
if (AttrKind == TAK_convention) {
226226
auto Argument = Attr.getArgument()->castTo<TokenSyntax>();
227-
auto Begin = advanceLocBegin(Loc, Argument);
228-
auto End = advanceLocEnd(Loc, Argument);
229-
CharSourceRange Range{Context.SourceMgr, Begin, End};
230-
TypeAttrs.convention = Range.str();
227+
auto Convention = Context.getIdentifier(Argument.getText());
228+
TypeAttrs.convention = Convention.str();
231229
}
232230

233231
if (AttrKind == TAK_opened) {
@@ -545,15 +543,6 @@ SourceLoc ASTGen::advanceLocBegin(const SourceLoc &Loc, const Syntax &Node) {
545543
return Loc.getAdvancedLoc(Node.getAbsolutePosition().getOffset());
546544
}
547545

548-
SourceLoc ASTGen::advanceLocEnd(const SourceLoc &Loc, const TokenSyntax &Token) {
549-
return advanceLocAfter(Loc, Token.withTrailingTrivia({}));
550-
}
551-
552-
SourceLoc ASTGen::advanceLocAfter(const SourceLoc &Loc, const Syntax &Node) {
553-
return Loc.getAdvancedLoc(
554-
Node.getAbsoluteEndPositionAfterTrailingTrivia().getOffset());
555-
}
556-
557546
StringRef ASTGen::copyAndStripUnderscores(StringRef Orig) {
558547
return copyAndStripUnderscores(Orig, Context);
559548
}

0 commit comments

Comments
 (0)