Skip to content

Conversation

@nkcsgexi
Copy link
Contributor

No description provided.

@nkcsgexi
Copy link
Contributor Author

@swift-ci please smoke test and merge

@swift-ci swift-ci merged commit bb884f5 into swiftlang:master Feb 22, 2017

uint8_t swift::getKeywordLen(tok keyword) {
switch (keyword) {
#define KEYWORD(KW) case tok::kw_##KW: return StringRef(#KW).size();
Copy link
Member

@rintaro rintaro Feb 22, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How about sizeof(#KW) - 1; or strlen(#KW)?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

oh, i think that would work too : )

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.

3 participants