/external/clang/lib/Frontend/Rewrite/ |
H A D | InclusionRewriter.cpp | 83 const DirectoryLookup *Lookup, Token &Tok, 314 FileID FileId, Lexer &RawLex, const DirectoryLookup *Lookup, Token &Tok, 317 RawLex.LexFromRawLexer(Tok); 318 if (Tok.isNot(tok::l_paren)) 321 RawLex.LexFromRawLexer(Tok); 328 if (Tok.is(tok::less)) { 329 RawLex.LexFromRawLexer(Tok); 333 if (Tok.is(tok::eod)) // Sanity check. 336 if (Tok.is(tok::raw_identifier)) 337 PP.LookUpIdentifierInfo(Tok); 313 HandleHasInclude( FileID FileId, Lexer &RawLex, const DirectoryLookup *Lookup, Token &Tok, bool &FileExists) argument 574 Token Tok; local [all...] |
/external/clang/lib/Lex/ |
H A D | PPMacroExpansion.cpp | 293 Callbacks->MacroExpands(Info.Tok, Info.MD, Info.Range, 527 Token Tok; local 531 LexUnexpandedToken(Tok); 532 assert(Tok.is(tok::l_paren) && "Error computing l-paren-ness?"); 543 while (Tok.isNot(tok::r_paren)) { 544 if (ContainsCodeCompletionTok && (Tok.is(tok::eof) || Tok.is(tok::eod))) 547 assert((Tok.is(tok::l_paren) || Tok.is(tok::comma)) && 551 SourceLocation ArgStartLoc = Tok [all...] |
H A D | TokenLexer.cpp | 26 void TokenLexer::Init(Token &Tok, SourceLocation ELEnd, MacroInfo *MI, argument 36 ExpandLocStart = Tok.getLocation(); 38 AtStartOfLine = Tok.isAtStartOfLine(); 39 HasLeadingSpace = Tok.hasLeadingSpace(); 292 Token &Tok = ResultToks[i]; local 293 if (Tok.is(tok::hashhash)) 294 Tok.setKind(tok::unknown); 336 Token &Tok = ResultToks[i]; local 337 if (Tok.is(tok::hashhash)) 338 Tok 419 Lex(Token &Tok) argument 523 PasteTokens(Token &Tok) argument 715 HandleMicrosoftCommentPaste(Token &Tok) argument 805 Token &Tok = *begin_tokens; local 829 Token &Tok = *begin_tokens; local [all...] |
H A D | Preprocessor.cpp | 205 void Preprocessor::DumpToken(const Token &Tok, bool DumpFlags) const { argument 206 llvm::errs() << tok::getTokenName(Tok.getKind()) << " '" 207 << getSpelling(Tok) << "'"; 212 if (Tok.isAtStartOfLine()) 214 if (Tok.hasLeadingSpace()) 216 if (Tok.isExpandDisabled()) 218 if (Tok.needsCleaning()) { 219 const char *Start = SourceMgr.getCharacterData(Tok.getLocation()); 220 llvm::errs() << " [UnClean='" << StringRef(Start, Tok.getLength()) 225 DumpLocation(Tok 423 getSpelling(const Token &Tok, SmallVectorImpl<char> &Buffer, bool *Invalid) const argument 445 CreateString(StringRef Str, Token &Tok, SourceLocation ExpansionLocStart, SourceLocation ExpansionLocEnd) argument 802 parseSimpleIntegerLiteral(Token &Tok, uint64_t &Value) argument [all...] |
H A D | PTHLexer.cpp | 45 bool PTHLexer::Lex(Token& Tok) { argument 71 Tok.startToken(); 72 Tok.setKind(TKind); 73 Tok.setFlag(TFlags); 75 Tok.setLocation(FileStartLoc.getLocWithOffset(FileOffset)); 76 Tok.setLength(Len); 79 if (Tok.isLiteral()) { 80 Tok.setLiteralData((const char*) (PTHMgr.SpellingBase + IdentifierID)); 86 Tok.setIdentifierInfo(II); 90 Tok 154 getEOF(Token& Tok) argument [all...] |
H A D | Pragma.cpp | 79 Token &Tok) { 82 PP.LexUnexpandedToken(Tok); 86 = FindHandler(Tok.getIdentifierInfo() ? Tok.getIdentifierInfo()->getName() 90 PP.Diag(Tok, diag::warn_pragma_ignored); 95 Handler->HandlePragma(PP, Introducer, Tok); 115 Token Tok; local 116 PragmaHandlers->HandlePragma(*this, Introducer, Tok); 135 Token &Tok) 137 Failed(false), OutTok(Tok) { 77 HandlePragma(Preprocessor &PP, PragmaIntroducerKind Introducer, Token &Tok) argument 134 LexingFor_PragmaRAII(Preprocessor &PP, bool InMacroArgPreExpansion, Token &Tok) argument 164 Handle_Pragma(Token &Tok) argument 374 Token Tok; local 503 ParsePragmaPushOrPopMacro(Token &Tok) argument 619 HandlePragmaIncludeAlias(Token &Tok) argument 781 Token Tok; local 859 Token Tok; local 947 Token Tok; local 1281 Token Tok; local [all...] |
H A D | Lexer.cpp | 231 static size_t getSpellingSlow(const Token &Tok, const char *BufPtr, argument 233 assert(Tok.needsCleaning() && "getSpellingSlow called on simple token"); 236 const char *BufEnd = BufPtr + Tok.getLength(); 238 if (Tok.is(tok::string_literal)) { 275 assert(Length < Tok.getLength() && 326 std::string Lexer::getSpelling(const Token &Tok, const SourceManager &SourceMgr, 328 assert((int)Tok.getLength() >= 0 && "Token character range is bogus!"); 331 const char *TokStart = SourceMgr.getCharacterData(Tok.getLocation(), 339 if (!Tok.needsCleaning()) 340 return std::string(TokStart, TokStart + Tok 358 getSpelling(const Token &Tok, const char *&Buffer, const SourceManager &SourceMgr, const LangOptions &LangOpts, bool *Invalid) argument 1182 Token Tok; local 1228 getCharAndSizeSlow(const char *Ptr, unsigned &Size, Token *Tok) argument 2558 Token Tok; local [all...] |
H A D | ModuleMap.cpp | 1033 MMToken Tok; member in class:clang::ModuleMapParser 1077 Tok.clear(); 1087 SourceLocation Result = Tok.getLocation(); 1088 Tok.clear(); 1092 Tok.Location = LToken.getLocation().getRawEncoding(); 1096 Tok.StringData = RI.data(); 1097 Tok.StringLength = RI.size(); 1098 Tok.Kind = llvm::StringSwitch<MMToken::TokenKind>(RI) 1119 Tok.Kind = MMToken::Comma; 1123 Tok [all...] |
H A D | PPDirectives.cpp | 313 Token Tok; local 315 CurLexer->Lex(Tok); 317 if (Tok.is(tok::code_completion)) { 325 if (Tok.is(tok::eof)) { 340 if (Tok.isNot(tok::hash) || !Tok.isAtStartOfLine()) 351 LexUnexpandedToken(Tok); 355 if (Tok.isNot(tok::raw_identifier)) { 367 StringRef RI = Tok.getRawIdentifier(); 379 // that we can't use Tok 528 Token Tok; local 1001 HandleLineDirective(Token &Tok) argument 1220 HandleUserDiagnosticDirective(Token &Tok, bool isWarning) argument 1246 HandleIdentSCCSDirective(Token &Tok) argument 1280 HandleMacroPublicDirective(Token &Tok) argument 1307 HandleMacroPrivateDirective(Token &Tok) argument 1447 Token *Tok = new Token[1]; local 1827 HandleMicrosoftImportDirective(Token &Tok) argument 1887 ReadMacroDefinitionArgList(MacroInfo *MI, Token &Tok) argument 2047 Token Tok; local [all...] |
/external/clang/lib/Parse/ |
H A D | ParseStmtAsm.cpp | 164 const Token &Tok = AsmToks[TokIndex]; local 165 Loc = Tok.getLocation(); 200 LineToks.push_back(Tok); 227 if (Tok.is(EndOfStream)) { 230 while (LineToks[LineIndex].getLocation() != Tok.getLocation()) { 238 if (Invalid || Tok.is(EndOfStream)) { 250 assert(Tok.is(EndOfStream)); 274 const Token &Tok = AsmToks[i]; 277 if (!isNewStatement && (Tok.is(tok::kw_asm) || Tok [all...] |
H A D | ParseTemplate.cpp | 33 if (Tok.is(tok::kw_template) && NextToken().isNot(tok::less)) { 64 assert((Tok.is(tok::kw_export) || Tok.is(tok::kw_template)) && 109 Diag(Tok.getLocation(), diag::err_expected_template); 137 } while (Tok.is(tok::kw_export) || Tok.is(tok::kw_template)); 169 if (Tok.is(tok::kw_static_assert)) { 171 Diag(Tok.getLocation(), diag::err_templated_invalid_declaration) 187 if (Tok.is(tok::kw_using)) 198 if (Tok 1056 isEndOfTemplateArgument(Token Tok) argument [all...] |
H A D | ParsePragma.cpp | 315 assert(Tok.is(tok::annot_pragma_unused)); 317 Actions.ActOnPragmaUnused(Tok, getCurScope(), UnusedLoc); 322 assert(Tok.is(tok::annot_pragma_vis)); 324 static_cast<IdentifierInfo *>(Tok.getAnnotationValue()); 338 assert(Tok.is(tok::annot_pragma_pack)); 340 static_cast<PragmaPackInfo *>(Tok.getAnnotationValue()); 353 assert(Tok.is(tok::annot_pragma_msstruct)); 356 reinterpret_cast<uintptr_t>(Tok.getAnnotationValue())); 362 assert(Tok.is(tok::annot_pragma_align)); 365 reinterpret_cast<uintptr_t>(Tok 876 Token Tok; local 937 Token Tok; local 1054 Token Tok; local 1097 Token Tok; local 1184 Token Tok; local 1264 Token Tok; local 1327 Token Tok; local 1369 HandlePragma(Preprocessor &PP, PragmaIntroducerKind Introducer, Token &Tok) argument 1391 HandlePragma(Preprocessor &PP, PragmaIntroducerKind Introducer, Token &Tok) argument 1474 Token Tok; local 1503 HandlePragma(Preprocessor &PP, PragmaIntroducerKind Introducer, Token &Tok) argument 1601 HandlePragma(Preprocessor &PP, PragmaIntroducerKind Introducer, Token &Tok) argument 1688 HandlePragma(Preprocessor &PP, PragmaIntroducerKind Introducer, Token &Tok) argument 1726 HandlePragma(Preprocessor &PP, PragmaIntroducerKind Introducer, Token &Tok) argument 1782 HandlePragma(Preprocessor &PP, PragmaIntroducerKind Introducer, Token &Tok) argument 1860 Token Tok; local 1894 ParseLoopHintValue(Preprocessor &PP, Token &Tok, Token PragmaName, Token Option, bool ValueInParens, PragmaLoopHintInfo &Info) argument 1979 HandlePragma(Preprocessor &PP, PragmaIntroducerKind Introducer, Token &Tok) argument 2066 HandlePragma(Preprocessor &PP, PragmaIntroducerKind Introducer, Token &Tok) argument [all...] |
H A D | Parser.cpp | 57 Tok.startToken(); 58 Tok.setKind(tok::eof); 78 DiagnosticBuilder Parser::Diag(const Token &Tok, unsigned DiagID) { argument 79 return Diag(Tok.getLocation(), DiagID); 103 static bool IsCommonTypo(tok::TokenKind ExpectedTok, const Token &Tok) { argument 106 return Tok.is(tok::colon) || Tok.is(tok::comma); // : or , for ; 113 if (Tok.is(ExpectedTok) || Tok.is(tok::code_completion)) { 119 if (IsCommonTypo(ExpectedTok, Tok)) { [all...] |
/external/clang/unittests/AST/ |
H A D | CommentParser.cpp | 72 Token Tok; local 73 L.lex(Tok); 74 if (Tok.is(tok::eof))
|
/external/llvm/utils/TableGen/ |
H A D | CodeGenInstruction.cpp | 205 std::string Tok = CStr.substr(start, wpos - start); local 206 if (Tok == "@earlyclobber") {
|
/external/clang/lib/AST/ |
H A D | CommentParser.cpp | 60 const Token &Tok = Toks[Pos.CurToken]; local 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)) { 110 if (P.Tok.isNot(tok::text)) { 115 Toks.push_back(P.Tok); 154 bool lexWord(Token &Tok) { argument 187 lexDelimitedSeq(Token &Tok, char OpenDelim, char CloseDelim) argument [all...] |
/external/clang/lib/Format/ |
H A D | TokenAnnotator.cpp | 52 Left->Previous && Left->Previous->Tok.isNot(tok::kw_template); 230 FormatToken *Tok = CurrentToken; local 233 updateParameterCount(Left, Tok); 257 getBinOpPrecedence(Parent->Tok.getKind(), true, true) > prec::Unknown); 316 FormatToken *Tok = CurrentToken; local 319 updateParameterCount(Left, Tok); 408 FormatToken *Tok = CurrentToken; local 410 switch (Tok->Tok.getKind()) { 413 if (!Tok 689 IsImportStatement(const FormatToken &Tok) argument 924 isStartOfName(const FormatToken &Tok) argument 960 rParenEndsCast(const FormatToken &Tok) argument 1032 determineStarAmpUsage(const FormatToken &Tok, bool IsExpression, bool InTemplateArgument) argument 1097 determinePlusMinusCaretUsage(const FormatToken &Tok) argument 1117 determineIncrementUsage(const FormatToken &Tok) argument 1511 splitPenalty(const AnnotatedLine &Line, const FormatToken &Tok, bool InFunctionDecl) argument 1888 isAllmanBrace(const FormatToken &Tok) argument 2122 const FormatToken *Tok = Line.First; local [all...] |
H A D | UnwrappedLineParser.cpp | 103 FormatTok.Tok.startToken(); 104 FormatTok.Tok.setKind(tok::eof); 277 switch (FormatTok->Tok.getKind()) { 316 FormatToken *Tok = FormatTok; local 321 assert(Tok->Tok.is(tok::l_brace)); 331 switch (Tok->Tok.getKind()) { 333 LBraceStack.push_back(Tok); 362 Tok 610 tokenCanStartNewLine(const clang::Token &Tok) argument 1474 FormatToken *Tok = Tokens->getNextToken(); local 1806 pushToken(FormatToken *Tok) argument [all...] |
H A D | Format.cpp | 622 } while (Tokens.back()->Tok.isNot(tok::eof)); 683 First[0]->Tok.setKind(tok::lessless); 724 resetLexer(SourceMgr.getFileOffset(Tokens.back()->Tok.getLocation()) + 1); 761 SourceLocation Loc = Tokens.back()->Tok.getLocation(); 765 Tokens.back()->Tok.setKind(tok::unknown); 828 SourceLocation Loc = EndBacktick->Tok.getLocation(); 943 Tokens.back()->Tok.setKind(tok::kw___unknown_anytype); 954 Token Tok = FormatTok->Tok; local 959 FormatTok->Tok 1133 readRawToken(FormatToken &Tok) argument 1374 affectsLeadingEmptyLines(const FormatToken &Tok) argument 1407 FormatToken *Tok = AnnotatedLines[i]->First->Next; local [all...] |
H A D | FormatToken.h | 125 Token Tok; member in struct:clang::format::FormatToken 168 /// This can be different to Tok.getLocation(), which includes leading escaped 276 bool is(tok::TokenKind Kind) const { return Tok.is(Kind); } 279 return II && II == Tok.getIdentifierInfo(); 290 bool isStringLiteral() const { return tok::isStringLiteral(Tok.getKind()); } 293 return Tok.isObjCAtKeyword(Kind); 311 /// \brief Returns whether \p Tok is ([{ or a template opening <. 316 /// \brief Returns whether \p Tok is )]} or a template closing >. 330 switch (Tok.getKind()) { 358 switch (Tok 381 FormatToken *Tok = Previous; local 389 const FormatToken *Tok = Next; local [all...] |
/external/clang/lib/Frontend/ |
H A D | CacheTokens.cpp | 305 Token Tok; local 308 L.LexFromRawLexer(Tok); 311 if ((Tok.isAtStartOfLine() || Tok.is(tok::eof)) && 316 // 'Tok' when we exit this branch. 317 Token Tmp = Tok; 325 if (Tok.is(tok::raw_identifier)) { 326 PP.LookUpIdentifierInfo(Tok); 327 EmitToken(Tok); 331 if (Tok 591 Token Tok; local [all...] |
H A D | PrintPreprocessedOutput.cpp | 145 bool HandleFirstTokOnLine(Token &Tok); 159 const Token &Tok) { 160 return ConcatInfo.AvoidConcat(PrevPrevTok, PrevTok, Tok); 505 bool PrintPPOutputPPCallbacks::HandleFirstTokOnLine(Token &Tok) { argument 508 if (!MoveToLine(Tok.getLocation())) 513 unsigned ColNo = SM.getExpansionColumnNumber(Tok.getLocation()); 519 if (ColNo == 1 && Tok.hasLeadingSpace()) 528 if (ColNo <= 1 && Tok.is(tok::hash)) 595 static void PrintPreprocessedTokens(Preprocessor &PP, Token &Tok, argument 608 Callbacks->MoveToLine(Tok 158 AvoidConcat(const Token &PrevPrevTok, const Token &PrevTok, const Token &Tok) argument 682 Token Tok; local 735 Token Tok; local [all...] |
H A D | VerifyDiagnosticConsumer.cpp | 594 Token Tok; local 595 Tok.setKind(tok::comment); 598 while (Tok.isNot(tok::eof)) { 599 RawLex.LexFromRawLexer(Tok); 600 if (!Tok.is(tok::comment)) continue; 602 std::string Comment = RawLex.getSpelling(Tok, SM, LangOpts); 606 if (ParseDirective(Comment, nullptr, SM, nullptr, Tok.getLocation(),
|
/external/llvm/lib/Target/Sparc/AsmParser/ |
H A D | 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; member in union:__anon10870::SparcOperand::__anon10871 200 return StringRef(Tok.Data, Tok.Length); 292 Op->Tok.Data = Str.data(); 293 Op->Tok.Length = Str.size(); 428 const AsmToken &Tok = Parser.getTok(); local 429 StartLoc = Tok.getLoc(); 430 EndLoc = Tok 730 matchRegisterName(const AsmToken &Tok, unsigned &RegNo, unsigned &RegKind) argument 869 AsmToken Tok = Parser.getTok(); local [all...] |
/external/llvm/lib/Target/X86/AsmParser/ |
H A D | X86Operand.h | 60 struct TokOp Tok; member in union:llvm::X86Operand::__anon10905 86 return StringRef(Tok.Data, Tok.Length); 90 Tok.Data = Value.data(); 91 Tok.Length = Value.size(); 450 Res->Tok.Data = Str.data(); 451 Res->Tok.Length = Str.size();
|