/external/clang/lib/AST/ |
CommentParser.cpp | 30 /// Re-lexes a sequence of tok::text tokens. 60 const Token &Tok = Toks[Pos.CurToken]; 62 Pos.BufferStart = Tok.getText().begin(); 63 Pos.BufferEnd = Tok.getText().end(); 65 Pos.BufferStartLoc = Tok.getLocation(); 100 if (P.Tok.is(tok::newline)) { 102 Token Newline = P.Tok; 104 if (P.Tok.isNot(tok::text)) [all...] |
/external/clang/lib/Format/ |
TokenAnnotator.cpp | 38 Contexts.push_back(Context(tok::unknown, 1, /*IsExpression=*/false)); 46 ScopedContextCreator ContextCreator(*this, tok::less, 10); 52 Left->Previous && Left->Previous->Tok.isNot(tok::kw_template); 55 if (CurrentToken->is(tok::greater)) { 62 if (CurrentToken->isOneOf(tok::r_paren, tok::r_square, tok::r_brace, 63 tok::question, tok::colon) [all...] |
UnwrappedLineParser.cpp | 101 FormatTok.Tok.startToken(); 102 FormatTok.Tok.setKind(tok::eof); 275 switch (FormatTok->Tok.getKind()) { 276 case tok::comment: 280 case tok::l_brace: 286 case tok::r_brace: 293 case tok::kw_default: 294 case tok::kw_case: 315 FormatToken *Tok = FormatTok [all...] |
FormatToken.h | 118 Token Tok; 161 /// This can be different to Tok.getLocation(), which includes leading escaped 269 bool is(tok::TokenKind Kind) const { return Tok.is(Kind); } 271 bool isOneOf(tok::TokenKind K1, tok::TokenKind K2) const { 275 bool isOneOf(tok::TokenKind K1, tok::TokenKind K2, tok::TokenKind K3) const { 279 bool isOneOf(tok::TokenKind K1, tok::TokenKind K2, tok::TokenKind K3 [all...] |
Format.cpp | 605 if (TheLine->Last->is(tok::l_brace)) { 627 if (TheLine->First->is(tok::kw_if)) { 632 if (TheLine->First->isOneOf(tok::kw_for, tok::kw_while)) { 667 (I[1]->First->is(tok::l_brace) && !Style.AllowShortBlocksOnASingleLine)) 674 if (Line.Last->isNot(tok::r_paren)) 678 if (I[1]->First->isOneOf(tok::semi, tok::kw_if, tok::kw_for, 679 tok::kw_while) | [all...] |
/external/clang/lib/Frontend/ |
CacheTokens.cpp | 305 Token Tok; 308 L.LexFromRawLexer(Tok); 311 if ((Tok.isAtStartOfLine() || Tok.is(tok::eof)) && 316 // 'Tok' when we exit this branch. 317 Token Tmp = Tok; 318 Tmp.setKind(tok::eod); 325 if (Tok.is(tok::raw_identifier)) [all...] |
VerifyDiagnosticConsumer.cpp | 597 Token Tok; 598 Tok.setKind(tok::comment); 601 while (Tok.isNot(tok::eof)) { 602 RawLex.LexFromRawLexer(Tok); 603 if (!Tok.is(tok::comment)) continue; 605 std::string Comment = RawLex.getSpelling(Tok, SM, LangOpts); 609 if (ParseDirective(Comment, nullptr, SM, nullptr, Tok.getLocation() [all...] |
/external/clang/lib/Lex/ |
Pragma.cpp | 81 Token &Tok) { 84 PP.LexUnexpandedToken(Tok); 88 = FindHandler(Tok.getIdentifierInfo() ? Tok.getIdentifierInfo()->getName() 92 PP.Diag(Tok, diag::warn_pragma_ignored); 97 Handler->HandlePragma(PP, Introducer, Tok); 117 Token Tok; 118 PragmaHandlers->HandlePragma(*this, Introducer, Tok); 137 Token &Tok) 139 Failed(false), OutTok(Tok) { [all...] |
PPDirectives.cpp | 122 /// the tok::eod token is found. 127 assert(Tmp.isNot(tok::eof) && "EOF seen while discarding directive tokens"); 128 } while (Tmp.isNot(tok::eod)); 133 if (MacroNameTok.is(tok::eod)) 159 if (isDefineUndef && II->getPPKeywordID() == tok::pp_defined) { 186 if (MacroNameTok.is(tok::code_completion)) { 197 // token kind to tok::eod if necessary. 198 if (MacroNameTok.isNot(tok::eod)) { 199 MacroNameTok.setKind(tok::eod); 204 /// \brief Ensure that the next token is a tok::eod token [all...] |
Lexer.cpp | 36 bool Token::isObjCAtKeyword(tok::ObjCKeywordKind objcKey) const { 43 tok::ObjCKeywordKind Token::getObjCKeywordID() const { 45 return specId ? specId->getObjCKeywordID() : tok::objc_not_keyword; 237 static size_t getSpellingSlow(const Token &Tok, const char *BufPtr, 239 assert(Tok.needsCleaning() && "getSpellingSlow called on simple token"); 242 const char *BufEnd = BufPtr + Tok.getLength(); 244 if (Tok.is(tok::string_literal)) { 281 assert(Length < Tok.getLength() && 332 std::string Lexer::getSpelling(const Token &Tok, const SourceManager &SourceMgr [all...] |
ModuleMap.cpp | [all...] |
/external/llvm/lib/Target/Sparc/AsmParser/ |
SparcAsmParser.cpp | 72 // returns true if Tok is matched to a register and returns register in RegNo. 73 bool matchRegisterName(const AsmToken &Tok, unsigned &RegNo, 173 struct Token Tok; 200 return StringRef(Tok.Data, Tok.Length); 292 Op->Tok.Data = Str.data(); 293 Op->Tok.Length = Str.size(); 431 const AsmToken &Tok = Parser.getTok(); 432 StartLoc = Tok.getLoc(); 433 EndLoc = Tok.getEndLoc() [all...] |
/external/llvm/lib/Target/X86/AsmParser/ |
X86Operand.h | 59 struct TokOp Tok; 85 return StringRef(Tok.Data, Tok.Length); 89 Tok.Data = Value.data(); 90 Tok.Length = Value.size(); 417 Res->Tok.Data = Str.data(); 418 Res->Tok.Length = Str.size();
|
X86AsmParser.cpp | 842 const AsmToken &Tok = Parser.getTok(); 843 EndLoc = Tok.getEndLoc(); 845 if (Tok.isNot(AsmToken::Identifier)) { 851 RegNo = MatchRegisterName(Tok.getString()); 855 RegNo = MatchRegisterName(Tok.getString().lower()); 868 + Tok.getString() + " is only available in 64-bit mode", 873 if (RegNo == 0 && (Tok.getString() == "st" || Tok.getString() == "ST")) { 910 if (RegNo == 0 && Tok.getString().size() == 3 && 911 Tok.getString().startswith("db")) [all...] |
/external/clang/lib/Parse/ |
ParsePragma.cpp | 289 assert(Tok.is(tok::annot_pragma_unused)); 291 Actions.ActOnPragmaUnused(Tok, getCurScope(), UnusedLoc); 296 assert(Tok.is(tok::annot_pragma_vis)); 298 static_cast<IdentifierInfo *>(Tok.getAnnotationValue()); 312 assert(Tok.is(tok::annot_pragma_pack)); 314 static_cast<PragmaPackInfo *>(Tok.getAnnotationValue()); 317 if (Info->Alignment.is(tok::numeric_constant)) [all...] |
/external/clang/lib/Sema/ |
SemaObjCProperty.cpp | 145 tok::ObjCKeywordKind MethodImplKind, 292 Token Tok; 294 lexer.LexFromRawLexer(Tok); 295 if (Tok.is(tok::raw_identifier) && Tok.getRawIdentifier() == attrName) { 296 Loc = Tok.getLocation(); 299 } while (Tok.isNot(tok::r_paren)); 325 tok::ObjCKeywordKind MethodImplKind) [all...] |
/external/llvm/lib/Target/PowerPC/AsmParser/ |
PPCAsmParser.cpp | 230 bool MatchRegisterName(const AsmToken &Tok, 323 struct TokOp Tok; 338 Tok = o.Tok; 544 return StringRef(Tok.Data, Tok.Length); 552 Op->Tok.Data = Str.data(); 553 Op->Tok.Length = Str.size(); 569 Op->Tok.Data = (const char *)(Op.get() + 1); 570 Op->Tok.Length = Str.size() [all...] |
/external/clang/include/clang/Lex/ |
Preprocessor.h | 64 tok::TokenKind Kind; 68 TokenValue(tok::TokenKind Kind) : Kind(Kind), II(nullptr) { 69 assert(Kind != tok::raw_identifier && "Raw identifiers are not supported."); 70 assert(Kind != tok::identifier && 72 assert(!tok::isLiteral(Kind) && "Literals are not supported."); 73 assert(!tok::isAnnotation(Kind) && "Annotations are not supported."); 75 TokenValue(IdentifierInfo *II) : Kind(tok::identifier), II(II) {} 76 bool operator==(const Token &Tok) const { 77 return Tok.getKind() == Kind && 78 (!II || II == Tok.getIdentifierInfo()) [all...] |
/external/llvm/lib/Support/ |
YAMLParser.cpp | 188 /// others) before the SimpleKey's Tok. 190 TokenQueueT::iterator Tok; 197 return Tok == Other.Tok; 394 void saveSimpleKeyCandidate( TokenQueueT::iterator Tok 749 SK.Tok = TokenQueue.front(); 903 void Scanner::saveSimpleKeyCandidate( TokenQueueT::iterator Tok 908 SK.Tok = Tok; 923 , i->Tok->Range.begin()) [all...] |
/external/llvm/utils/TableGen/ |
AsmMatcherEmitter.cpp | [all...] |
/external/clang/include/clang/Parse/ |
Parser.h | 64 /// Tok - The current token we are peeking ahead. All parsing methods assume 66 Token Tok; 140 llvm::SmallDenseMap<const IdentifierInfo *, tok::TokenKind> 245 const Token &getCurToken() const { return Tok; } 299 PrevTokLocation = Tok.getLocation(); 300 PP.Lex(Tok); 304 bool TryConsumeToken(tok::TokenKind Expected) { 305 if (Tok.isNot(Expected)) 309 PrevTokLocation = Tok.getLocation(); 310 PP.Lex(Tok); [all...] |
/external/clang/lib/ARCMigrate/ |
ObjCMT.cpp | 684 Token Tok; 685 if (!PP.getRawToken(EndLoc, Tok, /*IgnoreWhiteSpace=*/true)) 686 if (Tok.isLiteral() && Tok.getLength() > 2) { 687 if (const char *StringLit = Tok.getLiteralData()) [all...] |
/external/llvm/lib/Target/Mips/AsmParser/ |
MipsAsmParser.cpp | 372 struct Token Tok; 685 return StringRef(Tok.Data, Tok.Length); 726 Op->Tok.Data = Str.data(); 727 Op->Tok.Length = Str.size(); 886 OS << Tok.Data; [all...] |
/external/llvm/lib/Target/AArch64/AsmParser/ |
AArch64AsmParser.cpp | 236 struct TokOp Tok; 265 Tok = o.Tok; 313 return StringRef(Tok.Data, Tok.Length); 318 return Tok.IsSuffix; [all...] |
/external/clang/lib/Serialization/ |
ASTReader.cpp | 757 if (HasRevertedTokenIDToIdentifier && II->getTokenID() != tok::identifier) [all...] |