/external/clang/include/clang/AST/ |
H A D | CommentBriefParser.h | 36 Token Tok; member in class:clang::comments::BriefParser 39 SourceLocation Loc = Tok.getLocation(); 40 L.lex(Tok);
|
H A D | CommentParser.h | 56 Token Tok; member in class:clang::comments::Parser 63 L.lex(Tok); 65 Tok = MoreLATokens.back(); 71 MoreLATokens.push_back(Tok); 72 Tok = OldTok; 79 MoreLATokens.push_back(Tok); 86 Tok = Toks[0]; 90 return (Tok.is(tok::backslash_command) || Tok.is(tok::at_command)) && 91 Traits.getCommandInfo(Tok [all...] |
/external/clang/lib/Lex/ |
H A D | PPCaching.cpp | 97 void Preprocessor::AnnotatePreviousCachedTokens(const Token &Tok) { argument 98 assert(Tok.isAnnotation() && "Expected annotation token"); 100 assert(CachedTokens[CachedLexPos-1].getLastLoc() == Tok.getAnnotationEndLoc() 107 if (AnnotBegin->getLocation() == Tok.getLocation()) { 113 *AnnotBegin = Tok;
|
H A D | TokenConcatenation.cpp | 48 bool TokenConcatenation::IsIdentifierStringPrefix(const Token &Tok) const { 51 if (!Tok.needsCleaning()) { 52 if (Tok.getLength() < 1 || Tok.getLength() > 3) 55 const char *Ptr = SM.getCharacterData(SM.getSpellingLoc(Tok.getLocation())); 56 return IsStringPrefix(StringRef(Ptr, Tok.getLength()), 60 if (Tok.getLength() < 256) { 63 unsigned length = PP.getSpelling(Tok, TokPtr); 67 return IsStringPrefix(StringRef(PP.getSpelling(Tok)), LangOpts.CPlusPlus11); 119 /// GetFirstChar - Get the first character of the token \arg Tok, 121 GetFirstChar(Preprocessor &PP, const Token &Tok) argument [all...] |
H A D | MacroArgs.cpp | 174 Token &Tok = Result.back(); local 175 PP.Lex(Tok); 199 Token Tok; local 200 Tok.startToken(); 201 Tok.setKind(Charify ? tok::char_constant : tok::string_literal); 211 const Token &Tok = *ArgToks; local 212 if (!isFirst && (Tok.hasLeadingSpace() || Tok.isAtStartOfLine())) 218 if (tok::isStringLiteral(Tok.getKind()) || // "foo", u8R"x(foo)x"_bar, etc. 219 Tok [all...] |
H A D | PPExpressions.cpp | 750 Token Tok; local 751 LexNonComment(Tok); 758 if (EvaluateValue(ResVal, Tok, DT, true, *this)) { 760 if (Tok.isNot(tok::eod)) 771 if (Tok.is(tok::eod)) { 785 Tok, true, *this)) { 787 if (Tok.isNot(tok::eod)) 797 if (Tok.isNot(tok::eod)) { 798 Diag(Tok, diag::err_pp_expected_eol);
|
H A D | PPLexerChange.cpp | 159 void Preprocessor::EnterMacro(Token &Tok, SourceLocation ILEnd, argument 163 TokLexer = new TokenLexer(Tok, ILEnd, Macro, Args, *this); 166 TokLexer->Init(Tok, ILEnd, Macro, Args); 498 void Preprocessor::HandleMicrosoftCommentPaste(Token &Tok) { argument 527 if (!HandleEndOfTokenLexer(Tok)) Lex(Tok); 535 while (Tok.isNot(tok::eod) && Tok.isNot(tok::eof)) 536 Lex(Tok); 539 if (Tok [all...] |
H A D | PPMacroExpansion.cpp | 285 Callbacks->MacroExpands(Info.Tok, Info.MD, Info.Range, /*Args=*/0); 535 Token Tok; local 539 LexUnexpandedToken(Tok); 540 assert(Tok.is(tok::l_paren) && "Error computing l-paren-ness?"); 551 while (Tok.isNot(tok::r_paren)) { 552 if (ContainsCodeCompletionTok && (Tok.is(tok::eof) || Tok.is(tok::eod))) 555 assert((Tok.is(tok::l_paren) || Tok.is(tok::comma)) && 559 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); 342 Token &Tok = ResultToks[i]; local 343 if (Tok.is(tok::hashhash)) 344 Tok 421 Lex(Token &Tok) argument 514 PasteTokens(Token &Tok) argument 705 HandleMicrosoftCommentPaste(Token &Tok) argument 795 Token &Tok = *begin_tokens; local 819 Token &Tok = *begin_tokens; local [all...] |
/external/clang/lib/Rewrite/Core/ |
H A D | TokenRewriter.cpp | 37 if (Tok.is(tok::raw_identifier)) { 40 PP.LookUpIdentifierInfo(Tok); 87 Token Tok; local 88 Tok.startToken(); 90 Tok.setLocation(ScratchBuf->getToken(Val, Len, Spelling)); 91 Tok.setLength(Len); 95 Tok.setKind(tok::unknown); 97 return AddToken(Tok, RemapIterator(I));
|
H A D | HTMLRewrite.cpp | 371 Token Tok; local 372 L.LexFromRawLexer(Tok); 374 while (Tok.isNot(tok::eof)) { 377 unsigned TokOffs = SM.getFileOffset(Tok.getLocation()); 378 unsigned TokLen = Tok.getLength(); 379 switch (Tok.getKind()) { 386 PP.LookUpIdentifierInfo(Tok); 389 if (Tok.isNot(tok::identifier)) 417 if (!Tok.isAtStartOfLine()) 423 L.LexFromRawLexer(Tok); 457 Token Tok; local 510 Token Tok; local [all...] |
/external/clang/include/clang/Lex/ |
H A D | TokenLexer.h | 101 TokenLexer(Token &Tok, SourceLocation ILEnd, MacroInfo *MI, argument 104 Init(Tok, ILEnd, MI, ActualArgs); 111 void Init(Token &Tok, SourceLocation ILEnd, MacroInfo *MI, 139 void Lex(Token &Tok); 154 /// PasteTokens - Tok is the LHS of a ## operator, and CurToken is the ## 157 /// Tok. If this returns true, the caller should immediately return the 159 bool PasteTokens(Token &Tok); 170 void HandleMicrosoftCommentPaste(Token &Tok);
|
H A D | Lexer.h | 243 /// Tok.getLength() bytes long. The length of the actual result is returned. 250 static unsigned getSpelling(const Token &Tok, const char *&Buffer, 255 /// getSpelling() - Return the 'spelling' of the Tok token. The spelling of a 260 static std::string getSpelling(const Token &Tok, 505 inline char getAndAdvanceChar(const char *&Ptr, Token &Tok) { argument 511 char C = getCharAndSizeSlow(Ptr, Size, &Tok); 520 const char *ConsumeChar(const char *Ptr, unsigned Size, Token &Tok) { argument 528 getCharAndSizeSlow(Ptr, Size, &Tok); 550 char getCharAndSizeSlow(const char *Ptr, unsigned &Size, Token *Tok = 0); 608 /// \param Tok Th [all...] |
/external/clang/lib/Format/ |
H A D | BreakableToken.h | 69 BreakableToken(const FormatToken &Tok, bool InPPDirective, argument 71 : Tok(Tok), InPPDirective(InPPDirective), Encoding(Encoding) {} 73 const FormatToken &Tok; member in class:clang::format::BreakableToken 89 BreakableSingleLineToken(const FormatToken &Tok, unsigned StartColumn, 109 BreakableStringLiteral(const FormatToken &Tok, unsigned StartColumn,
|
H A D | BreakableToken.cpp | 138 const FormatToken &Tok, unsigned StartColumn, StringRef Prefix, 140 : BreakableToken(Tok, InPPDirective, Encoding), StartColumn(StartColumn), 142 assert(Tok.TokenText.startswith(Prefix) && Tok.TokenText.endswith(Postfix)); 143 Line = Tok.TokenText.substr( 144 Prefix.size(), Tok.TokenText.size() - Prefix.size() - Postfix.size()); 147 BreakableStringLiteral::BreakableStringLiteral(const FormatToken &Tok, argument 151 : BreakableSingleLineToken(Tok, StartColumn, "\"", "\"", InPPDirective, 165 Tok, Prefix.size() + TailOffset + Split.first, Split.second, Postfix, 205 Tok, OriginalPrefi 137 BreakableSingleLineToken( const FormatToken &Tok, unsigned StartColumn, StringRef Prefix, StringRef Postfix, bool InPPDirective, encoding::Encoding Encoding) argument [all...] |
H A D | WhitespaceManager.cpp | 41 void WhitespaceManager::replaceWhitespace(const FormatToken &Tok, argument 45 Changes.push_back(Change(true, Tok.WhitespaceRange, Spaces, 47 Tok.Tok.getKind(), InPPDirective && !Tok.IsFirst)); 50 void WhitespaceManager::addUntouchableToken(const FormatToken &Tok, argument 53 Change(false, Tok.WhitespaceRange, /*Spaces=*/0, 54 SourceMgr.getSpellingColumnNumber(Tok.Tok.getLocation()) - 1, 55 Tok 59 replaceWhitespaceInToken( const FormatToken &Tok, unsigned Offset, unsigned ReplaceChars, StringRef PreviousPostfix, StringRef CurrentPrefix, bool InPPDirective, unsigned Newlines, unsigned Spaces) argument [all...] |
/external/clang/lib/Parse/ |
H A D | ParseAST.cpp | 45 const Token &Tok = P.getCurToken(); local 46 if (Tok.is(tok::eof)) { 51 if (Tok.getLocation().isInvalid()) { 57 Tok.getLocation().print(OS, PP.getSourceManager()); 58 if (Tok.isAnnotation()) { 61 // Do the equivalent of PP.getSpelling(Tok) except for the parts that would 65 unsigned Length = Tok.getLength(); 66 const char *Spelling = SM.getCharacterData(Tok.getLocation(), &Invalid);
|
H A D | ParsePragma.cpp | 28 assert(Tok.is(tok::annot_pragma_unused)); 30 Actions.ActOnPragmaUnused(Tok, getCurScope(), UnusedLoc); 35 assert(Tok.is(tok::annot_pragma_vis)); 37 static_cast<IdentifierInfo *>(Tok.getAnnotationValue()); 51 assert(Tok.is(tok::annot_pragma_pack)); 53 static_cast<PragmaPackInfo *>(Tok.getAnnotationValue()); 66 assert(Tok.is(tok::annot_pragma_msstruct)); 69 reinterpret_cast<uintptr_t>(Tok.getAnnotationValue())); 75 assert(Tok.is(tok::annot_pragma_align)); 78 reinterpret_cast<uintptr_t>(Tok 193 Token Tok; local 252 Token Tok; local 368 Token Tok; local 409 Token Tok; local 494 Token Tok; local 574 Token Tok; local 635 Token Tok; local 676 HandlePragma(Preprocessor &PP, PragmaIntroducerKind Introducer, Token &Tok) argument 697 HandlePragma(Preprocessor &PP, PragmaIntroducerKind Introducer, Token &Tok) argument 776 Token Tok; local 807 HandlePragma(Preprocessor &PP, PragmaIntroducerKind Introducer, Token &Tok) argument 863 HandlePragma(Preprocessor &PP, PragmaIntroducerKind Introducer, Token &Tok) argument [all...] |
/external/clang/unittests/AST/ |
H A D | CommentLexer.cpp | 48 StringRef getCommandName(const Token &Tok) { argument 49 return Traits.getCommandInfo(Tok.getCommandID())->Name; 52 StringRef getVerbatimBlockName(const Token &Tok) { argument 53 return Traits.getCommandInfo(Tok.getVerbatimBlockID())->Name; 56 StringRef getVerbatimLineName(const Token &Tok) { argument 57 return Traits.getCommandInfo(Tok.getVerbatimLineID())->Name; 70 Token Tok; local 71 L.lex(Tok); 72 if (Tok.is(tok::eof)) 74 Toks.push_back(Tok); [all...] |
/external/llvm/lib/IR/ |
H A D | DataLayout.cpp | 212 StringRef &Tok = Split.first; // Current token. local 215 char Specifier = Tok.front(); 216 Tok = Tok.substr(1); 227 unsigned AddrSpace = Tok.empty() ? 0 : getInt(Tok); 233 unsigned PointerMemSize = inBytes(getInt(Tok)); 237 unsigned PointerABIAlign = inBytes(getInt(Tok)); 243 PointerPrefAlign = inBytes(getInt(Tok)); 266 unsigned Size = Tok [all...] |
/external/llvm/lib/TableGen/ |
H A D | TGLexer.cpp | 293 tgtok::TokKind Tok = LexToken(); local 294 if (Tok == tgtok::Error) return true; 295 if (Tok != tgtok::StrVal) {
|
/external/clang/lib/Frontend/ |
H A D | FrontendActions.cpp | 471 Token Tok; local 474 PP.Lex(Tok); 475 PP.DumpToken(Tok, true); 477 } while (Tok.isNot(tok::eof)); 501 Token Tok; local 505 PP.Lex(Tok); 506 } while (Tok.isNot(tok::eof));
|
/external/clang/unittests/Lex/ |
H A D | PPCallbacksTest.cpp | 153 Token Tok; local 154 PP.Lex(Tok); 155 if (Tok.is(tok::eof))
|
/external/llvm/tools/llvm-mc/ |
H A D | llvm-mc.cpp | 249 AsmToken Tok = Lexer.getTok(); local 251 switch (Tok.getKind()) { 313 Out->os().write_escaped(Tok.getString());
|
/external/clang/lib/Rewrite/Frontend/ |
H A D | InclusionRewriter.cpp | 85 const DirectoryLookup *Lookup, Token &Tok, 275 FileID FileId, Lexer &RawLex, const DirectoryLookup *Lookup, Token &Tok, 278 RawLex.LexFromRawLexer(Tok); 279 if (Tok.isNot(tok::l_paren)) 282 RawLex.LexFromRawLexer(Tok); 289 if (Tok.is(tok::less)) { 290 RawLex.LexFromRawLexer(Tok); 294 if (Tok.is(tok::eod)) // Sanity check. 297 if (Tok.is(tok::raw_identifier)) 298 PP.LookUpIdentifierInfo(Tok); 274 HandleHasInclude( FileID FileId, Lexer &RawLex, const DirectoryLookup *Lookup, Token &Tok, bool &FileExists) argument 527 Token Tok; local [all...] |