Skip to content

Commit 0fac90d

Browse files
authored
Merge pull request #62512 from DougGregor/remove-double-underscored-file
2 parents 724d493 + 41e0125 commit 0fac90d

File tree

2 files changed

+0
-14
lines changed

2 files changed

+0
-14
lines changed

lib/Parse/Lexer.cpp

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -641,13 +641,6 @@ bool Lexer::isOperator(StringRef string) {
641641

642642

643643
tok Lexer::kindOfIdentifier(StringRef Str, bool InSILMode) {
644-
// Temporary: treat the deprecated __FILE__, __LINE__, etc. as normal
645-
// identifiers. This can go away when we remove them as keywords.
646-
if (Str.startswith("__") &&
647-
(Str == "__FILE__" || Str == "__LINE__" || Str == "__COLUMN__" ||
648-
Str == "__FUNCTION__" || Str == "__DSO_HANDLE__"))
649-
return tok::identifier;
650-
651644
#define SIL_KEYWORD(kw)
652645
#define KEYWORD(kw) if (Str == #kw) return tok::kw_##kw;
653646
#include "swift/AST/TokenKinds.def"

lib/Parse/ParseExpr.cpp

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1580,13 +1580,6 @@ ParserResult<Expr> Parser::parseExprPrimary(Diag<> ID, bool isExprBasic) {
15801580
Kind, Loc, /*implicit=*/false));
15811581
}
15821582

1583-
case tok::kw___FILE__:
1584-
case tok::kw___LINE__:
1585-
case tok::kw___COLUMN__:
1586-
case tok::kw___FUNCTION__:
1587-
case tok::kw___DSO_HANDLE__:
1588-
llvm_unreachable("Lexer doesn't produce these tokens any more");
1589-
15901583
case tok::identifier: // foo
15911584
case tok::kw_self: // self
15921585

0 commit comments

Comments
 (0)