Skip to content

Conversation

@tanadeau
Copy link
Contributor

No description provided.

@lattner
Copy link
Contributor

lattner commented Jan 26, 2016

Thanks for tackling this, some comments:

  • The patch will have the check be performed once per token lexed, it would make more sense for this to happen once per source file. As such, please move this to Lexer::Lexer or perhaps Lexer::primeLexer.
  • Please include a test case.

Thanks!

@lattner
Copy link
Contributor

lattner commented Jan 26, 2016

FWIW, the analogous code in clang is here:
https://github.com/apple/swift-clang/blob/stable/lib/Lex/Lexer.cpp#L68

@tanadeau
Copy link
Contributor Author

I moved the check to the Lexer's constructor and added a test case.

lattner added a commit that referenced this pull request Jan 26, 2016
[SR-615][Compiler] Don't error when lexing UTF-8 BOM
@lattner lattner merged commit 22e5ad8 into swiftlang:master Jan 26, 2016
@lattner
Copy link
Contributor

lattner commented Jan 26, 2016

LGTM, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants