/external/clang/unittests/AST/ |
D | CommentLexer.cpp | 45 void lexString(const char *Source, std::vector<Token> &Toks); 61 std::vector<Token> &Toks) { in lexString() argument 73 Toks.push_back(Tok); in lexString() 82 std::vector<Token> Toks; in TEST_F() local 84 lexString(Source, Toks); in TEST_F() 86 ASSERT_EQ(0U, Toks.size()); in TEST_F() 95 std::vector<Token> Toks; in TEST_F() local 97 lexString(Sources[i], Toks); in TEST_F() 99 ASSERT_EQ(1U, Toks.size()); in TEST_F() 101 ASSERT_EQ(tok::newline, Toks[0].getKind()); in TEST_F() [all …]
|
/external/clang/lib/Parse/ |
D | ParseCXXInlineMethods.cpp | 129 LexTemplateFunctionForLateParsing(LPT->Toks); in ParseCXXInlineMethodDef() 131 CachedTokens Toks; in ParseCXXInlineMethodDef() local 132 LexTemplateFunctionForLateParsing(Toks); in ParseCXXInlineMethodDef() 143 CachedTokens &Toks = LM->Toks; in ParseCXXInlineMethodDef() local 148 if (ConsumeAndStoreFunctionPrologue(Toks)) { in ParseCXXInlineMethodDef() 160 ConsumeAndStoreUntil(tok::r_brace, Toks, /*StopAtSemi=*/false); in ParseCXXInlineMethodDef() 166 ConsumeAndStoreUntil(tok::l_brace, Toks, /*StopAtSemi=*/false); in ParseCXXInlineMethodDef() 167 ConsumeAndStoreUntil(tok::r_brace, Toks, /*StopAtSemi=*/false); in ParseCXXInlineMethodDef() 193 CachedTokens &Toks = MI->Toks; in ParseCXXNonStaticMemberInitializer() local 197 Toks.push_back(Tok); in ParseCXXNonStaticMemberInitializer() [all …]
|
D | ParsePragma.cpp | 105 Token *Toks = new Token[1]; in HandlePragma() local 106 Toks[0].startToken(); in HandlePragma() 107 Toks[0].setKind(tok::annot_pragma_vis); in HandlePragma() 108 Toks[0].setLocation(VisLoc); in HandlePragma() 109 Toks[0].setAnnotationValue( in HandlePragma() 111 PP.EnterTokenStream(Toks, 1, /*DisableMacroExpansion=*/true, in HandlePragma() 226 Token *Toks = in HandlePragma() local 229 new (Toks) Token(); in HandlePragma() 230 Toks[0].startToken(); in HandlePragma() 231 Toks[0].setKind(tok::annot_pragma_pack); in HandlePragma() [all …]
|
D | ParseTemplate.cpp | 1301 assert(!LMT.Toks.empty() && "Empty body!"); in ParseLateTemplatedFuncDef() 1305 LMT.Toks.push_back(Tok); in ParseLateTemplatedFuncDef() 1306 PP.EnterTokenStream(LMT.Toks.data(), LMT.Toks.size(), true, false); in ParseLateTemplatedFuncDef() 1356 void Parser::LexTemplateFunctionForLateParsing(CachedTokens &Toks) { in LexTemplateFunctionForLateParsing() argument 1358 if (!ConsumeAndStoreFunctionPrologue(Toks)) { in LexTemplateFunctionForLateParsing() 1360 ConsumeAndStoreUntil(tok::r_brace, Toks, /*StopAtSemi=*/false); in LexTemplateFunctionForLateParsing() 1366 ConsumeAndStoreUntil(tok::l_brace, Toks, /*StopAtSemi=*/false); in LexTemplateFunctionForLateParsing() 1367 ConsumeAndStoreUntil(tok::r_brace, Toks, /*StopAtSemi=*/false); in LexTemplateFunctionForLateParsing()
|
D | ParseObjc.cpp | 1929 CachedTokens &Toks = LM->Toks; in StashAwayMethodOrFunctionBodyTokens() local 1931 Toks.push_back(Tok); in StashAwayMethodOrFunctionBodyTokens() 1935 Toks.push_back(Tok); in StashAwayMethodOrFunctionBodyTokens() 1938 ConsumeAndStoreUntil(tok::l_paren, Toks, /*StopAtSemi=*/false); in StashAwayMethodOrFunctionBodyTokens() 1939 ConsumeAndStoreUntil(tok::r_paren, Toks, /*StopAtSemi=*/false); in StashAwayMethodOrFunctionBodyTokens() 1942 Toks.push_back(Tok); // also store '{' in StashAwayMethodOrFunctionBodyTokens() 1947 ConsumeAndStoreUntil(tok::l_paren, Toks, /*StopAtSemi=*/false); in StashAwayMethodOrFunctionBodyTokens() 1948 ConsumeAndStoreUntil(tok::r_paren, Toks, /*StopAtSemi=*/false); in StashAwayMethodOrFunctionBodyTokens() 1950 Toks.push_back(Tok); // also store '{' in StashAwayMethodOrFunctionBodyTokens() 1954 ConsumeAndStoreUntil(tok::r_brace, Toks, /*StopAtSemi=*/false); in StashAwayMethodOrFunctionBodyTokens() [all …]
|
D | ParseExprCXX.cpp | 1885 llvm::SmallVector<Token, 4> Toks; in ParseUnqualifiedIdOperator() local 1892 Toks.push_back(Tok); in ParseUnqualifiedIdOperator() 1896 StringLiteralParser Literal(Toks.data(), Toks.size(), PP); in ParseUnqualifiedIdOperator() 2739 CachedTokens Toks; in ParseCXXAmbiguousParenExpression() local 2743 if (!ConsumeAndStoreUntil(tok::r_paren, Toks)) { in ParseCXXAmbiguousParenExpression() 2773 Toks.push_back(Tok); in ParseCXXAmbiguousParenExpression() 2776 PP.EnterTokenStream(Toks.data(), Toks.size(), in ParseCXXAmbiguousParenExpression()
|
D | Parser.cpp | 271 bool Parser::SkipUntil(ArrayRef<tok::TokenKind> Toks, bool StopAtSemi, in SkipUntil() argument 278 for (unsigned i = 0, NumToks = Toks.size(); i != NumToks; ++i) { in SkipUntil() 279 if (Tok.is(Toks[i])) { in SkipUntil() 998 LexTemplateFunctionForLateParsing(LPT->Toks); in ParseFunctionDefinition() 1000 CachedTokens Toks; in ParseFunctionDefinition() local 1001 LexTemplateFunctionForLateParsing(Toks); in ParseFunctionDefinition()
|
D | ParseDecl.cpp | 150 ConsumeAndStoreUntil(tok::r_paren, LA->Toks, true, false); in ParseGNUAttributes() 155 LA->Toks.push_back(Eof); in ParseGNUAttributes() 890 LA.Toks.push_back(Tok); in ParseLexedAttribute() 891 PP.EnterTokenStream(LA.Toks.data(), LA.Toks.size(), true, false); in ParseLexedAttribute()
|
/external/clang/include/clang/AST/ |
D | CommentParser.h | 75 void putBack(ArrayRef<Token> Toks) { in putBack() argument 76 if (Toks.empty()) in putBack() 80 for (const Token *I = &Toks.back(), in putBack() 81 *B = &Toks.front(); in putBack() 86 Tok = Toks[0]; in putBack()
|
/external/clang/lib/AST/ |
D | CommentParser.cpp | 29 SmallVector<Token, 16> Toks; member in clang::comments::TextTokenRetokenizer 44 return Pos.CurToken >= Toks.size(); in isEnd() 50 const Token &Tok = Toks[Pos.CurToken]; in setupBuffer() 105 Toks.push_back(P.Tok); in addToken() 107 if (Toks.size() == 1) in addToken() 245 P.putBack(llvm::makeArrayRef(Toks.begin() + Pos.CurToken, Toks.end())); in putBackLeftoverTokens() 246 Pos.CurToken = Toks.size(); in putBackLeftoverTokens()
|
/external/clang/include/clang/Parse/ |
D | Parser.h | 745 bool SkipUntil(ArrayRef<tok::TokenKind> Toks, bool StopAtSemi = true, 800 CachedTokens Toks; member 824 CachedTokens Toks; member 843 CachedTokens *Toks = 0) 844 : Param(P), Toks(Toks) { } in Param() 853 CachedTokens *Toks; member 904 CachedTokens Toks; member 1032 CachedTokens Toks; member 1038 void LexTemplateFunctionForLateParsing(CachedTokens &Toks); 1071 bool ConsumeAndStoreFunctionPrologue(CachedTokens &Toks); [all …]
|
/external/clang/lib/Lex/ |
D | PPLexerChange.cpp | 186 void Preprocessor::EnterTokenStream(const Token *Toks, unsigned NumToks, in EnterTokenStream() argument 195 CurTokenLexer.reset(new TokenLexer(Toks, NumToks, DisableMacroExpansion, in EnterTokenStream() 199 CurTokenLexer->Init(Toks, NumToks, DisableMacroExpansion, OwnsTokens); in EnterTokenStream()
|
D | PPDirectives.cpp | 740 Token *Toks = new Token[2]; in HandleDirective() local 742 Toks[0] = SavedHash; in HandleDirective() 743 Toks[1] = Result; in HandleDirective() 748 Toks[1].setKind(tok::unknown); in HandleDirective() 753 EnterTokenStream(Toks, 2, false, true); in HandleDirective()
|
/external/clang/include/clang/Lex/ |
D | Preprocessor.h | 587 void EnterTokenStream(const Token *Toks, unsigned NumToks,
|
/external/clang/lib/Sema/ |
D | SemaDeclCXX.cpp | 361 CachedTokens *Toks = chunk.Fun.ArgInfo[argIdx].DefaultArgTokens; in CheckExtraCXXDefaultArguments() local 363 << SourceRange((*Toks)[1].getLocation(), Toks->back().getLocation()); in CheckExtraCXXDefaultArguments() 364 delete Toks; in CheckExtraCXXDefaultArguments()
|