forked from OSchip/llvm-project
Objective-C keywords are not always identifiers. Some are also C++ keywords
llvm-svn: 60373
This commit is contained in:
parent
dce30aa0f9
commit
90abb6dead
|
@ -41,8 +41,9 @@ static void InitCharacterInfo();
|
|||
|
||||
/// isObjCAtKeyword - Return true if we have an ObjC keyword identifier.
|
||||
bool Token::isObjCAtKeyword(tok::ObjCKeywordKind objcKey) const {
|
||||
return is(tok::identifier) &&
|
||||
getIdentifierInfo()->getObjCKeywordID() == objcKey;
|
||||
if (IdentifierInfo *II = getIdentifierInfo())
|
||||
return II->getObjCKeywordID() == objcKey;
|
||||
return false;
|
||||
}
|
||||
|
||||
/// getObjCKeywordID - Return the ObjC keyword kind.
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
// RUN: clang -fsyntax-only -verify %s
|
||||
|
||||
// RUN: clang -fsyntax-only -verify %s &&
|
||||
// RUN: clang -fsyntax-only -verify -x objective-c++ %s
|
||||
void * proc();
|
||||
|
||||
@interface NSConstantString
|
||||
|
|
Loading…
Reference in New Issue