/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); 84 Tok = Toks[0]; 88 return (Tok.is(tok::backslash_command) || Tok.is(tok::at_command)) && 89 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 | 161 void Preprocessor::EnterMacro(Token &Tok, SourceLocation ILEnd, argument 165 TokLexer = new TokenLexer(Tok, ILEnd, Macro, Args, *this); 168 TokLexer->Init(Tok, ILEnd, Macro, Args); 555 void Preprocessor::HandleMicrosoftCommentPaste(Token &Tok) { argument 584 if (!HandleEndOfTokenLexer(Tok)) Lex(Tok); 592 while (Tok.isNot(tok::eod) && Tok.isNot(tok::eof)) 593 Lex(Tok); 596 if (Tok [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 | 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, 506 inline char getAndAdvanceChar(const char *&Ptr, Token &Tok) { argument 512 char C = getCharAndSizeSlow(Ptr, Size, &Tok); 521 const char *ConsumeChar(const char *Ptr, unsigned Size, Token &Tok) { argument 529 getCharAndSizeSlow(Ptr, Size, &Tok); 552 Token *Tok = nullptr); 614 /// \param Tok Th [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 | ParseOpenMP.cpp | 29 auto Tok = P.getCurToken(); local 31 Tok.isAnnotation() 33 : getOpenMPDirectiveKind(P.getPreprocessor().getSpelling(Tok)); 35 Tok = P.getPreprocessor().LookAhead(0); 37 Tok.isAnnotation() 39 : getOpenMPDirectiveKind(P.getPreprocessor().getSpelling(Tok)); 57 assert(Tok.is(tok::annot_pragma_openmp) && "Not an OpenMP directive!"); 70 if (Tok.isNot(tok::annot_pragma_openmp_end)) { 71 Diag(Tok, diag::warn_omp_extra_tokens_at_eol) 81 Diag(Tok, dia [all...] |
H A D | ParseStmtAsm.cpp | 156 const Token &Tok = AsmToks[TokIndex]; local 157 Loc = Tok.getLocation(); 186 LineToks.push_back(Tok); 213 if (Tok.is(EndOfStream)) { 216 while (LineToks[LineIndex].getLocation() != Tok.getLocation()) { 224 if (Invalid || Tok.is(EndOfStream)) { 236 assert(Tok.is(EndOfStream)); 260 const Token &Tok = AsmToks[i]; 263 if (!isNewStatement && (Tok.is(tok::kw_asm) || Tok [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/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 | UnwrappedLineParser.h | 110 void pushToken(FormatToken *Tok); 204 UnwrappedLineNode() : Tok(nullptr) {} 205 UnwrappedLineNode(FormatToken *Tok) : Tok(Tok) {} argument 207 FormatToken *Tok; member in struct:clang::format::UnwrappedLineNode
|
H A D | WhitespaceManager.cpp | 46 void WhitespaceManager::replaceWhitespace(FormatToken &Tok, unsigned Newlines, argument 50 if (Tok.Finalized) 52 Tok.Decision = (Newlines > 0) ? FD_Break : FD_Continue; 53 Changes.push_back(Change(true, Tok.WhitespaceRange, IndentLevel, Spaces, 55 Tok.Tok.getKind(), InPPDirective && !Tok.IsFirst)); 58 void WhitespaceManager::addUntouchableToken(const FormatToken &Tok, argument 60 if (Tok.Finalized) 62 Changes.push_back(Change(false, Tok 68 replaceWhitespaceInToken( const FormatToken &Tok, unsigned Offset, unsigned ReplaceChars, StringRef PreviousPostfix, StringRef CurrentPrefix, bool InPPDirective, unsigned Newlines, unsigned IndentLevel, int Spaces) argument [all...] |
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, 227 Tok, OriginalPrefix.size() + TailOffset + Split.first, Split.second, 235 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 266 const FormatToken *Tok = &Previous; local 748 consumeRParens(LineState& State, const FormatToken &Tok) argument 779 const FormatToken &Tok = *State.NextToken; local [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 | 568 Token Tok; local 571 PP.Lex(Tok); 572 PP.DumpToken(Tok, true); 574 } while (Tok.isNot(tok::eof)); 598 Token Tok; local 602 PP.Lex(Tok); 603 } while (Tok.isNot(tok::eof));
|
/external/clang/unittests/Lex/ |
H A D | PPCallbacksTest.cpp | 185 Token Tok; local 186 PP.Lex(Tok); 187 if (Tok.is(tok::eof)) 229 Token Tok; local 230 PP.Lex(Tok); 231 if (Tok.is(tok::eof))
|
/external/llvm/lib/IR/ |
H A D | DataLayout.cpp | 230 StringRef &Tok = Split.first; // Current token. local 233 char Specifier = Tok.front(); 234 Tok = Tok.substr(1); 249 unsigned AddrSpace = Tok.empty() ? 0 : getInt(Tok); 255 unsigned PointerMemSize = inBytes(getInt(Tok)); 259 unsigned PointerABIAlign = inBytes(getInt(Tok)); 265 PointerPrefAlign = inBytes(getInt(Tok)); 286 unsigned Size = Tok [all...] |
/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());
|