Searched refs:Tok (Results 1 - 25 of 87) sorted by relevance

1234

/external/clang/lib/Parse/
H A DParsePragma.cpp289 assert(Tok.is(tok::annot_pragma_unused));
291 Actions.ActOnPragmaUnused(Tok, getCurScope(), UnusedLoc);
296 assert(Tok.is(tok::annot_pragma_vis));
298 static_cast<IdentifierInfo *>(Tok.getAnnotationValue());
312 assert(Tok.is(tok::annot_pragma_pack));
314 static_cast<PragmaPackInfo *>(Tok.getAnnotationValue());
327 assert(Tok.is(tok::annot_pragma_msstruct));
330 reinterpret_cast<uintptr_t>(Tok.getAnnotationValue()));
336 assert(Tok.is(tok::annot_pragma_align));
339 reinterpret_cast<uintptr_t>(Tok
644 Token Tok; local
703 Token Tok; local
819 Token Tok; local
860 Token Tok; local
945 Token Tok; local
1025 Token Tok; local
1086 Token Tok; local
1127 HandlePragma(Preprocessor &PP, PragmaIntroducerKind Introducer, Token &Tok) argument
1148 HandlePragma(Preprocessor &PP, PragmaIntroducerKind Introducer, Token &Tok) argument
1230 Token Tok; local
1259 HandlePragma(Preprocessor &PP, PragmaIntroducerKind Introducer, Token &Tok) argument
1355 HandlePragma(Preprocessor &PP, PragmaIntroducerKind Introducer, Token &Tok) argument
1440 HandlePragma(Preprocessor &PP, PragmaIntroducerKind Introducer, Token &Tok) argument
1475 HandlePragma(Preprocessor &PP, PragmaIntroducerKind Introducer, Token &Tok) argument
1531 HandlePragma(Preprocessor &PP, PragmaIntroducerKind Introducer, Token &Tok) argument
1601 Token Tok; local
1671 HandlePragma(Preprocessor &PP, PragmaIntroducerKind Introducer, Token &Tok) argument
[all...]
H A DParseTemplate.cpp33 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));
179 if (Tok.is(tok::kw_using))
190 if (Tok.is(tok::semi)) {
215 if (Tok.is(tok::semi))
239 Diag(Tok, dia
1038 isEndOfTemplateArgument(Token Tok) argument
[all...]
H A DParseInit.cpp28 switch (Tok.getKind()) {
87 tok::TokenKind Kind = Tok.getKind();
137 if (Tok.is(tok::identifier)) {
138 const IdentifierInfo *FieldName = Tok.getIdentifierInfo();
146 assert(Tok.is(tok::colon) && "MayBeDesignationStart not working properly!");
165 while (Tok.is(tok::period) || Tok.is(tok::l_square)) {
166 if (Tok.is(tok::period)) {
170 if (Tok.isNot(tok::identifier)) {
171 Diag(Tok
[all...]
H A DParseObjc.cpp28 if (Tok.is(tok::kw___attribute)) {
30 Diag(Tok, diag::err_objc_postfix_attribute_hint)
33 Diag(Tok, diag::err_objc_postfix_attribute);
49 if (Tok.is(tok::code_completion)) {
56 switch (Tok.getObjCKeywordID()) {
109 if (Tok.isNot(tok::identifier)) {
110 Diag(Tok, diag::err_expected) << tok::identifier;
114 ClassNames.push_back(Tok.getIdentifierInfo());
115 ClassLocs.push_back(Tok.getLocation());
181 assert(Tok
[all...]
H A DParseTentative.cpp51 switch (Tok.getKind()) {
148 switch (Tok.getKind()) {
159 if (Tok.isNot(tok::l_paren))
182 while (Tok.is(tok::l_square) || Tok.is(tok::kw___attribute) ||
183 Tok.is(tok::kw___declspec) || Tok.is(tok::kw_alignas)) {
184 if (Tok.is(tok::l_square)) {
190 if (Tok.isNot(tok::l_paren))
200 if (Tok
[all...]
H A DParseCXXInlineMethods.cpp33 assert((Tok.is(tok::l_brace) || Tok.is(tok::colon) || Tok.is(tok::kw_try) ||
34 Tok.is(tok::equal)) &&
89 if (Tok.is(tok::comma)) {
133 tok::TokenKind kind = Tok.getKind();
153 while (Tok.is(tok::kw_catch)) {
189 assert((Tok.is(tok::l_brace) || Tok.is(tok::equal)) &&
197 tok::TokenKind kind = Tok
[all...]
H A DParser.cpp57 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...]
H A DParseOpenMP.cpp29 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 DParseExpr.cpp158 if (Tok.is(tok::code_completion)) {
164 if (Tok.is(tok::kw_throw))
209 tok::TokenKind K = Tok.getKind();
223 prec::Level NextTokPrec = getBinOpPrecedence(Tok.getKind(),
236 Token OpToken = Tok;
245 PP.EnterToken(Tok);
246 Tok = OpToken;
253 if (Tok.isNot(tok::colon)) {
270 Diag(Tok, diag::ext_gnu_conditional_expr);
278 SourceLocation FILoc = Tok
[all...]
H A DParseStmt.cpp161 tok::TokenKind Kind = Tok.getKind();
194 if (Tok.is(tok::semi))
200 if (Tok.isNot(tok::identifier))
209 SourceLocation DeclStart = Tok.getLocation(), DeclEnd;
215 if (Tok.is(tok::r_brace)) {
216 Diag(Tok, diag::err_expected_statement);
231 bool HasLeadingEmptyMacro = Tok.hasLeadingEmptyMacro();
333 Diag(Tok, diag::err_pragma_fp_contract_scope);
381 Token OldToken = Tok;
390 if (Tok
[all...]
H A DParseStmtAsm.cpp156 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/lib/Lex/
H A DTokenConcatenation.cpp48 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 DPragma.cpp81 Token &Tok) {
84 PP.LexUnexpandedToken(Tok);
88 = FindHandler(Tok.getIdentifierInfo() ? Tok.getIdentifierInfo()->getName()
92 PP.Diag(Tok, diag::warn_pragma_ignored);
97 Handler->HandlePragma(PP, Introducer, Tok);
117 Token Tok; local
118 PragmaHandlers->HandlePragma(*this, Introducer, Tok);
137 Token &Tok)
139 Failed(false), OutTok(Tok) {
79 HandlePragma(Preprocessor &PP, PragmaIntroducerKind Introducer, Token &Tok) argument
136 LexingFor_PragmaRAII(Preprocessor &PP, bool InMacroArgPreExpansion, Token &Tok) argument
166 Handle_Pragma(Token &Tok) argument
376 Token Tok; local
505 ParsePragmaPushOrPopMacro(Token &Tok) argument
621 HandlePragmaIncludeAlias(Token &Tok) argument
784 Token Tok; local
862 Token Tok; local
948 Token Tok; local
1280 Token Tok; local
[all...]
H A DPPMacroExpansion.cpp286 Callbacks->MacroExpands(Info.Tok, Info.MD, Info.Range,
520 Token Tok; local
524 LexUnexpandedToken(Tok);
525 assert(Tok.is(tok::l_paren) && "Error computing l-paren-ness?");
536 while (Tok.isNot(tok::r_paren)) {
537 if (ContainsCodeCompletionTok && (Tok.is(tok::eof) || Tok.is(tok::eod)))
540 assert((Tok.is(tok::l_paren) || Tok.is(tok::comma)) &&
544 SourceLocation ArgStartLoc = Tok
[all...]
H A DTokenLexer.cpp26 void TokenLexer::Init(Token &Tok, SourceLocation ELEnd, MacroInfo *MI, argument
36 ExpandLocStart = Tok.getLocation();
38 AtStartOfLine = Tok.isAtStartOfLine();
39 HasLeadingSpace = Tok.hasLeadingSpace();
291 Token &Tok = ResultToks[i]; local
292 if (Tok.is(tok::hashhash))
293 Tok.setKind(tok::unknown);
335 Token &Tok = ResultToks[i]; local
336 if (Tok.is(tok::hashhash))
337 Tok
410 Lex(Token &Tok) argument
508 PasteTokens(Token &Tok) argument
698 HandleMicrosoftCommentPaste(Token &Tok) argument
788 Token &Tok = *begin_tokens; local
812 Token &Tok = *begin_tokens; local
[all...]
H A DMacroArgs.cpp174 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...]
/external/clang/include/clang/AST/
H A DCommentBriefParser.h36 Token Tok; member in class:clang::comments::BriefParser
39 SourceLocation Loc = Tok.getLocation();
40 L.lex(Tok);
H A DCommentParser.h56 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/Format/
H A DUnwrappedLineParser.cpp101 FormatTok.Tok.startToken();
102 FormatTok.Tok.setKind(tok::eof);
275 switch (FormatTok->Tok.getKind()) {
315 FormatToken *Tok = FormatTok; local
320 assert(Tok->Tok.is(tok::l_brace));
330 switch (Tok->Tok.getKind()) {
332 LBraceStack.push_back(Tok);
361 Tok
592 tokenCanStartNewLine(clang::Token Tok) argument
1578 pushToken(FormatToken *Tok) argument
[all...]
/external/clang/lib/AST/
H A DCommentParser.cpp60 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...]
H A DCommentBriefParser.cpp71 while (Tok.isNot(tok::eof)) {
72 if (Tok.is(tok::text)) {
74 FirstParagraphOrBrief += Tok.getText();
76 ReturnsParagraph += Tok.getText();
81 if (Tok.is(tok::backslash_command) || Tok.is(tok::at_command)) {
82 const CommandInfo *Info = Traits.getCommandInfo(Tok.getCommandID());
106 if (Tok.is(tok::newline)) {
118 if (Tok.is(tok::text)) {
119 if (isWhitespace(Tok
[all...]
/external/clang/include/clang/Lex/
H A DTokenConcatenation.h63 const Token &Tok) const;
68 bool IsIdentifierStringPrefix(const Token &Tok) const;
H A DTokenLexer.h109 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);
/external/clang/lib/Rewrite/Core/
H A DTokenRewriter.cpp37 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 DHTMLRewrite.cpp371 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...]

Completed in 412 milliseconds

1234