File tree Expand file tree Collapse file tree 1 file changed +1
-12
lines changed Expand file tree Collapse file tree 1 file changed +1
-12
lines changed Original file line number Diff line number Diff line change @@ -474,18 +474,7 @@ TypeRepr *ASTGen::generate(UnknownTypeSyntax Type, SourceLoc &Loc) {
474
474
475
475
if (ChildrenCount == 1 ) {
476
476
auto Keyword = Type.getChild (0 )->getAs <TokenSyntax>();
477
-
478
- auto IsAtStartOfLine = [](const TokenSyntax Token) {
479
- auto LeadingTrivia = Token.getLeadingTrivia ();
480
- if (LeadingTrivia.empty ())
481
- return false ;
482
- auto LastLeadingTriviaKind = Token.getLeadingTrivia ().back ().getKind ();
483
- return LastLeadingTriviaKind == TriviaKind::Newline ||
484
- LastLeadingTriviaKind == TriviaKind::CarriageReturnLineFeed;
485
- };
486
-
487
- if (Keyword && isTokenKeyword (Keyword->getTokenKind ()) &&
488
- !IsAtStartOfLine (*Keyword)) {
477
+ if (Keyword && isTokenKeyword (Keyword->getTokenKind ())) {
489
478
auto ErrorLoc = generate (*Keyword, Loc);
490
479
return new (Context) ErrorTypeRepr (ErrorLoc);
491
480
}
You can’t perform that action at this time.
0 commit comments