/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.pop_back_val(); 69 MoreLATokens.push_back(Tok); 70 Tok = OldTok; 77 MoreLATokens.push_back(Tok); 80 Tok = Toks[0]; 84 return (Tok.is(tok::backslash_command) || Tok.is(tok::at_command)) && 85 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); 123 /// GetFirstChar - Get the first character of the token \arg Tok, 125 GetFirstChar(Preprocessor &PP, const Token &Tok) argument [all...] |
H A D | MacroArgs.cpp | 173 Token &Tok = Result.back(); local 174 PP.Lex(Tok); 198 Token Tok; local 199 Tok.startToken(); 200 Tok.setKind(Charify ? tok::char_constant : tok::string_literal); 210 const Token &Tok = *ArgToks; local 211 if (!isFirst && (Tok.hasLeadingSpace() || Tok.isAtStartOfLine())) 217 if (tok::isStringLiteral(Tok.getKind()) || // "foo", u8R"x(foo)x"_bar, etc. 218 Tok [all...] |
H A D | PPExpressions.cpp | 743 Token Tok; local 744 LexNonComment(Tok); 751 if (EvaluateValue(ResVal, Tok, DT, true, *this)) { 753 if (Tok.isNot(tok::eod)) 764 if (Tok.is(tok::eod)) { 778 Tok, true, *this)) { 780 if (Tok.isNot(tok::eod)) 790 if (Tok.isNot(tok::eod)) { 791 Diag(Tok, diag::err_pp_expected_eol);
|
H A D | PPLexerChange.cpp | 162 void Preprocessor::EnterMacro(Token &Tok, SourceLocation ILEnd, argument 166 TokLexer = llvm::make_unique<TokenLexer>(Tok, ILEnd, Macro, Args, *this); 169 TokLexer->Init(Tok, ILEnd, Macro, Args); 561 void Preprocessor::HandleMicrosoftCommentPaste(Token &Tok) { argument 590 if (!HandleEndOfTokenLexer(Tok)) Lex(Tok); 598 while (Tok.isNot(tok::eod) && Tok.isNot(tok::eof)) 599 Lex(Tok); 602 if (Tok [all...] |
/external/clang/lib/Rewrite/ |
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 | 109 TokenLexer(Token &Tok, SourceLocation ILEnd, MacroInfo *MI, argument 112 Init(Tok, ILEnd, MI, ActualArgs); 119 void Init(Token &Tok, SourceLocation ILEnd, MacroInfo *MI, 147 bool Lex(Token &Tok); 162 /// PasteTokens - Tok is the LHS of a ## operator, and CurToken is the ## 165 /// Tok. If this returns true, the caller should immediately return the 167 bool PasteTokens(Token &Tok); 178 void HandleMicrosoftCommentPaste(Token &Tok);
|
H A D | Lexer.h | 241 /// Tok.getLength() bytes long. The length of the actual result is returned. 248 static unsigned getSpelling(const Token &Tok, const char *&Buffer, 253 /// getSpelling() - Return the 'spelling' of the Tok token. The spelling of a 258 static std::string getSpelling(const Token &Tok, 526 inline char getAndAdvanceChar(const char *&Ptr, Token &Tok) { argument 532 char C = getCharAndSizeSlow(Ptr, Size, &Tok); 541 const char *ConsumeChar(const char *Ptr, unsigned Size, Token &Tok) { argument 549 getCharAndSizeSlow(Ptr, Size, &Tok); 572 Token *Tok = nullptr); 634 /// \param Tok Th [all...] |
/external/clang/lib/Parse/ |
H A D | ParseAST.cpp | 59 const Token &Tok = P.getCurToken(); local 60 if (Tok.is(tok::eof)) { 65 if (Tok.getLocation().isInvalid()) { 71 Tok.getLocation().print(OS, PP.getSourceManager()); 72 if (Tok.isAnnotation()) { 75 // Do the equivalent of PP.getSpelling(Tok) except for the parts that would 79 unsigned Length = Tok.getLength(); 80 const char *Spelling = SM.getCharacterData(Tok.getLocation(), &Invalid);
|
/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/clang/lib/Format/ |
H A D | BreakableToken.h | 75 BreakableToken(const FormatToken &Tok, unsigned IndentLevel, argument 78 : Tok(Tok), IndentLevel(IndentLevel), InPPDirective(InPPDirective), 81 const FormatToken &Tok; member in class:clang::format::BreakableToken 98 BreakableSingleLineToken(const FormatToken &Tok, unsigned IndentLevel, 120 BreakableStringLiteral(const FormatToken &Tok, unsigned IndentLevel,
|
H A D | TokenAnnotator.h | 42 : First(Line.Tokens.front().Tok), Level(Line.Level), 58 Current->Next = I->Tok; 59 I->Tok->Previous = Current; 127 bool startsWith(FormatToken *Tok, A K1) const { argument 128 while (Tok && Tok->is(tok::comment)) 129 Tok = Tok->Next; 130 return Tok && Tok 134 startsWith(FormatToken *Tok, A K1, Ts... Tokens) const argument [all...] |
H A D | UnwrappedLineParser.h | 115 void pushToken(FormatToken *Tok); 207 UnwrappedLineNode() : Tok(nullptr) {} 208 UnwrappedLineNode(FormatToken *Tok) : Tok(Tok) {} argument 210 FormatToken *Tok; member in struct:clang::format::UnwrappedLineNode
|
H A D | BreakableToken.cpp | 145 const FormatToken &Tok, unsigned IndentLevel, unsigned StartColumn, 148 : BreakableToken(Tok, IndentLevel, InPPDirective, Encoding, Style), 150 assert(Tok.TokenText.endswith(Postfix)); 151 Line = Tok.TokenText.substr( 152 Prefix.size(), Tok.TokenText.size() - Prefix.size() - Postfix.size()); 156 const FormatToken &Tok, unsigned IndentLevel, unsigned StartColumn, 159 : BreakableSingleLineToken(Tok, IndentLevel, StartColumn, Prefix, Postfix, 181 Tok, Prefix.size() + TailOffset + Split.first, Split.second, Postfix, 229 Tok, OriginalPrefix.size() + TailOffset + Split.first, Split.second, 237 Tok, OriginalPrefi 144 BreakableSingleLineToken( const FormatToken &Tok, unsigned IndentLevel, unsigned StartColumn, StringRef Prefix, StringRef Postfix, bool InPPDirective, encoding::Encoding Encoding, const FormatStyle &Style) argument 155 BreakableStringLiteral( const FormatToken &Tok, unsigned IndentLevel, unsigned StartColumn, StringRef Prefix, StringRef Postfix, bool InPPDirective, encoding::Encoding Encoding, const FormatStyle &Style) argument [all...] |
H A D | ContinuationIndenter.cpp | 30 // the ), ], } or > matching \c Tok. 31 static unsigned getLengthToMatchingParen(const FormatToken &Tok) { argument 32 if (!Tok.MatchingParen) 34 FormatToken *End = Tok.MatchingParen; 38 return End->TotalLength - Tok.TotalLength + 1; 41 // Returns \c true if \c Tok is the "." or "->" of a call and starts the next 43 static bool startsSegmentOfBuilderTypeCall(const FormatToken &Tok) { argument 44 return Tok.isMemberAccess() && Tok.Previous && Tok 300 const FormatToken *Tok = &Previous; local [all...] |
H A D | WhitespaceManager.cpp | 50 void WhitespaceManager::replaceWhitespace(FormatToken &Tok, unsigned Newlines, argument 54 if (Tok.Finalized) 56 Tok.Decision = (Newlines > 0) ? FD_Break : FD_Continue; 58 Change(true, Tok.WhitespaceRange, IndentLevel, Spaces, StartOfTokenColumn, 59 Newlines, "", "", Tok.Tok.getKind(), InPPDirective && !Tok.IsFirst, 60 Tok.is(TT_StartOfName) || Tok.is(TT_FunctionDeclarationName))); 63 void WhitespaceManager::addUntouchableToken(const FormatToken &Tok, argument 74 replaceWhitespaceInToken( const FormatToken &Tok, unsigned Offset, unsigned ReplaceChars, StringRef PreviousPostfix, StringRef CurrentPrefix, bool InPPDirective, unsigned Newlines, unsigned IndentLevel, int Spaces) argument [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 | 637 Token Tok; local 640 PP.Lex(Tok); 641 PP.DumpToken(Tok, true); 643 } while (Tok.isNot(tok::eof)); 661 Token Tok; local 665 PP.Lex(Tok); 666 } while (Tok.isNot(tok::eof));
|
/external/clang/unittests/Lex/ |
H A D | PPCallbacksTest.cpp | 182 Token Tok; local 183 PP.Lex(Tok); 184 if (Tok.is(tok::eof)) 227 Token Tok; local 228 PP.Lex(Tok); 229 if (Tok.is(tok::eof))
|
/external/llvm/lib/IR/ |
H A D | DataLayout.cpp | 234 StringRef &Tok = Split.first; // Current token. local 237 char Specifier = Tok.front(); 238 Tok = Tok.substr(1); 253 unsigned AddrSpace = Tok.empty() ? 0 : getInt(Tok); 262 unsigned PointerMemSize = inBytes(getInt(Tok)); 271 unsigned PointerABIAlign = inBytes(getInt(Tok)); 280 PointerPrefAlign = inBytes(getInt(Tok)); 304 unsigned Size = Tok [all...] |
/external/llvm/tools/llvm-mc/ |
H A D | llvm-mc.cpp | 252 AsmToken Tok = Lexer.getTok(); local 254 switch (Tok.getKind()) { 316 OS.write_escaped(Tok.getString());
|
/external/clang/lib/Frontend/Rewrite/ |
H A D | InclusionRewriter.cpp | 83 const DirectoryLookup *Lookup, Token &Tok, 330 FileID FileId, Lexer &RawLex, const DirectoryLookup *Lookup, Token &Tok, 333 RawLex.LexFromRawLexer(Tok); 334 if (Tok.isNot(tok::l_paren)) 337 RawLex.LexFromRawLexer(Tok); 344 if (Tok.is(tok::less)) { 345 RawLex.LexFromRawLexer(Tok); 349 if (Tok.is(tok::eod)) // Sanity check. 352 if (Tok.is(tok::raw_identifier)) 353 PP.LookUpIdentifierInfo(Tok); 329 HandleHasInclude( FileID FileId, Lexer &RawLex, const DirectoryLookup *Lookup, Token &Tok, bool &FileExists) argument 589 Token Tok; local [all...] |