diff options
| author | Chris Lattner <sabre@nondot.org> | 2007-10-09 18:02:16 +0000 |
|---|---|---|
| committer | Chris Lattner <sabre@nondot.org> | 2007-10-09 18:02:16 +0000 |
| commit | 98c1f7cfded03d3f5656611059796da514a9211e (patch) | |
| tree | bf62f78ec92fcf77b84006df7861934ed3261895 /clang/Lex/Lexer.cpp | |
| parent | 0ef1352a94f47178a3541ca008c54f8aa525361a (diff) | |
| download | bcm5719-llvm-98c1f7cfded03d3f5656611059796da514a9211e.tar.gz bcm5719-llvm-98c1f7cfded03d3f5656611059796da514a9211e.zip | |
Switch lexer/pp over to new Token::is/isNot api
llvm-svn: 42799
Diffstat (limited to 'clang/Lex/Lexer.cpp')
| -rw-r--r-- | clang/Lex/Lexer.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/clang/Lex/Lexer.cpp b/clang/Lex/Lexer.cpp index 0c67d2ab735..a14e51fa6a6 100644 --- a/clang/Lex/Lexer.cpp +++ b/clang/Lex/Lexer.cpp @@ -41,8 +41,8 @@ static void InitCharacterInfo(); /// isObjCAtKeyword - Return true if we have an ObjC keyword identifier. bool Token::isObjCAtKeyword(tok::ObjCKeywordKind objcKey) const { - return getKind() == tok::identifier && - getIdentifierInfo()->getObjCKeywordID() == objcKey; + return is(tok::identifier) && + getIdentifierInfo()->getObjCKeywordID() == objcKey; } /// getObjCKeywordID - Return the ObjC keyword kind. @@ -979,7 +979,7 @@ void Lexer::LexIncludeFilename(Token &FilenameTok) { ParsingFilename = false; // No filename? - if (FilenameTok.getKind() == tok::eom) + if (FilenameTok.is(tok::eom)) Diag(FilenameTok.getLocation(), diag::err_pp_expects_filename); } @@ -1015,7 +1015,7 @@ std::string Lexer::ReadToEndOfLine() { // Next, lex the character, which should handle the EOM transition. Lex(Tmp); - assert(Tmp.getKind() == tok::eom && "Unexpected token!"); + assert(Tmp.is(tok::eom) && "Unexpected token!"); // Finally, we're done, return the string we found. return Result; @@ -1096,9 +1096,9 @@ unsigned Lexer::isNextPPTokenLParen() { // Restore the lexer back to non-skipping mode. LexingRawMode = false; - if (Tok.getKind() == tok::eof) + if (Tok.is(tok::eof)) return 2; - return Tok.getKind() == tok::l_paren; + return Tok.is(tok::l_paren); } |

