forked from OSchip/llvm-project
Map Objective-C keywords to CXToken_Keyword.
llvm-svn: 103063
This commit is contained in:
parent
458c2f190a
commit
15cbc3a8a5
|
@ -2286,9 +2286,15 @@ void clang_tokenize(CXTranslationUnit TU, CXSourceRange Range,
|
|||
const char *StartPos = Buf.data() + LocInfo.second;
|
||||
IdentifierInfo *II
|
||||
= CXXUnit->getPreprocessor().LookUpIdentifierInfo(Tok, StartPos);
|
||||
CXTok.int_data[0] = II->getTokenID() == tok::identifier?
|
||||
CXToken_Identifier
|
||||
: CXToken_Keyword;
|
||||
|
||||
if (II->getObjCKeywordID() != tok::objc_not_keyword) {
|
||||
CXTok.int_data[0] = CXToken_Keyword;
|
||||
}
|
||||
else {
|
||||
CXTok.int_data[0] = II->getTokenID() == tok::identifier?
|
||||
CXToken_Identifier
|
||||
: CXToken_Keyword;
|
||||
}
|
||||
CXTok.ptr_data = II;
|
||||
} else if (Tok.is(tok::comment)) {
|
||||
CXTok.int_data[0] = CXToken_Comment;
|
||||
|
|
Loading…
Reference in New Issue