HomeSort by relevance Sort by last modified time
    Searched refs:Tok (Results 1 - 25 of 51) sorted by null

1 2 3

  /external/clang/lib/Parse/
ParsePragma.cpp 26 assert(Tok.is(tok::annot_pragma_unused));
28 Actions.ActOnPragmaUnused(Tok, getCurScope(), UnusedLoc);
40 Token Tok;
41 PP.LexUnexpandedToken(Tok);
43 const IdentifierInfo *PushPop = Tok.getIdentifierInfo();
52 PP.LexUnexpandedToken(Tok);
53 if (Tok.isNot(tok::l_paren)) {
54 PP.Diag(Tok.getLocation(), diag::warn_pragma_expected_lparen
    [all...]
ParseTentative.cpp 51 switch (Tok.getKind()) {
53 case tok::kw_asm:
55 case tok::kw_namespace:
58 case tok::kw_using:
60 case tok::kw_static_assert:
61 case tok::kw__Static_assert:
138 if (Tok.is(tok::kw_typeof))
143 if (getLang().ObjC1 && Tok.is(tok::less)
    [all...]
ParseInit.cpp 27 static bool MayBeDesignationStart(tok::TokenKind K, Preprocessor &PP) {
30 case tok::period: // designator: '.' identifier
31 case tok::l_square: // designator: array-designator
33 case tok::identifier: // designation: identifier ':'
34 return PP.LookAhead(0).is(tok::colon);
81 if (Tok.is(tok::identifier)) {
82 const IdentifierInfo *FieldName = Tok.getIdentifierInfo();
90 assert(Tok.is(tok::colon) && "MayBeDesignationStart not working properly!")
    [all...]
ParseTemplate.cpp 30 if (Tok.is(tok::kw_template) && NextToken().isNot(tok::less))
79 assert((Tok.is(tok::kw_export) || Tok.is(tok::kw_template)) &&
117 if (Tok.is(tok::kw_export)) {
123 if (Tok.is(tok::kw_template))
    [all...]
Parser.cpp 30 Tok.setKind(tok::eof);
76 const Token &Tok = P.getCurToken();
77 if (Tok.is(tok::eof)) {
82 if (Tok.getLocation().isInvalid()) {
88 Tok.getLocation().print(OS, PP.getSourceManager());
89 if (Tok.isAnnotation())
92 OS << ": current parser token '" << PP.getSpelling(Tok) << "'\n";
100 DiagnosticBuilder Parser::Diag(const Token &Tok, unsigned DiagID)
    [all...]
ParseObjc.cpp 35 if (Tok.is(tok::code_completion)) {
40 switch (Tok.getObjCKeywordID()) {
41 case tok::objc_class:
43 case tok::objc_interface: {
47 case tok::objc_protocol: {
51 case tok::objc_implementation:
53 case tok::objc_end:
55 case tok::objc_compatibility_alias:
57 case tok::objc_synthesize
    [all...]
ParseStmt.cpp 92 tok::TokenKind Kind = Tok.getKind();
95 case tok::at: // May be a @try or @throw statement
101 case tok::code_completion:
106 case tok::identifier: {
108 if (Next.is(tok::colon)) { // C99 6.8.1: labeled-statement
113 if (Next.isNot(tok::coloncolon)) {
115 IdentifierInfo *Name = Tok.getIdentifierInfo();
116 SourceLocation NameLoc = Tok.getLocation();
123 if (Name->getTokenID() != tok::identifier)
    [all...]
ParseDeclCXX.cpp 53 assert(Tok.is(tok::kw_namespace) && "Not a namespace!");
56 if (Tok.is(tok::code_completion)) {
69 if (Tok.is(tok::identifier)) {
70 Ident = Tok.getIdentifierInfo();
72 while (Tok.is(tok::coloncolon) && NextToken().is(tok::identifier))
    [all...]
ParseCXXInlineMethods.cpp 28 assert((Tok.is(tok::l_brace) || Tok.is(tok::colon) || Tok.is(tok::kw_try) ||
29 Tok.is(tok::equal)) &&
53 if (Tok.is(tok::equal))
    [all...]
ParseExpr.cpp 34 static prec::Level getBinOpPrecedence(tok::TokenKind Kind,
38 case tok::greater:
47 case tok::greatergreater:
59 case tok::comma: return prec::Comma;
60 case tok::equal:
61 case tok::starequal:
62 case tok::slashequal:
63 case tok::percentequal:
64 case tok::plusequal:
65 case tok::minusequal
    [all...]
ParseExprCXX.cpp 23 static int SelectDigraphErrorMessage(tok::TokenKind Kind) {
25 case tok::kw_template: return 0;
26 case tok::kw_const_cast: return 1;
27 case tok::kw_dynamic_cast: return 2;
28 case tok::kw_reinterpret_cast: return 3;
29 case tok::kw_static_cast: return 4;
46 Token &ColonToken, tok::TokenKind Kind, bool AtDigraph) {
60 ColonToken.setKind(tok::coloncolon);
63 DigraphToken.setKind(tok::less);
117 if (Tok.is(tok::annot_cxxscope))
    [all...]
ParseDecl.cpp 95 assert(Tok.is(tok::kw___attribute) && "Not a GNU attribute list!");
97 while (Tok.is(tok::kw___attribute)) {
99 if (ExpectAndConsume(tok::l_paren, diag::err_expected_lparen_after,
101 SkipUntil(tok::r_paren, true); // skip until ) or ;
104 if (ExpectAndConsume(tok::l_paren, diag::err_expected_lparen_after, "(")) {
105 SkipUntil(tok::r_paren, true); // skip until ) or ;
109 while (Tok.is(tok::identifier) || isDeclarationSpecifier() |
    [all...]
  /external/clang/include/clang/Lex/
TokenConcatenation.h 57 char TokenInfo[tok::NUM_TOKENS];
63 const Token &Tok) const;
67 bool StartsWithL(const Token &Tok) const;
71 bool IsIdentifierL(const Token &Tok) const;
TokenLexer.h 99 TokenLexer(Token &Tok, SourceLocation ILEnd, MacroArgs *ActualArgs,
102 Init(Tok, ILEnd, ActualArgs);
109 void Init(Token &Tok, SourceLocation ILEnd, MacroArgs *ActualArgs);
136 void Lex(Token &Tok);
151 /// PasteTokens - Tok is the LHS of a ## operator, and CurToken is the ##
154 /// Tok. If this returns true, the caller should immediately return the
156 bool PasteTokens(Token &Tok);
167 void HandleMicrosoftCommentPaste(Token &Tok);
Preprocessor.h 543 while (Result.getKind() == tok::comment);
588 void EnterToken(const Token &Tok) {
590 CachedTokens.insert(CachedTokens.begin()+CachedLexPos, Tok);
601 void AnnotateCachedTokens(const Token &Tok) {
602 assert(Tok.isAnnotation() && "Expected annotation token");
604 AnnotatePreviousCachedTokens(Tok);
615 void ReplaceLastTokenWithAnnotation(const Token &Tok) {
616 assert(Tok.isAnnotation() && "Expected annotation token");
618 CachedTokens[CachedLexPos-1] = Tok;
664 DiagnosticBuilder Diag(const Token &Tok, unsigned DiagID)
    [all...]
  /external/clang/lib/Lex/
TokenConcatenation.cpp 21 bool TokenConcatenation::StartsWithL(const Token &Tok) const {
22 if (!Tok.needsCleaning()) {
24 return *SM.getCharacterData(SM.getSpellingLoc(Tok.getLocation())) == 'L';
27 if (Tok.getLength() < 256) {
30 PP.getSpelling(Tok, TokPtr);
34 return PP.getSpelling(Tok)[0] == 'L';
39 bool TokenConcatenation::IsIdentifierL(const Token &Tok) const {
40 if (!Tok.needsCleaning()) {
41 if (Tok.getLength() != 1)
44 return *SM.getCharacterData(SM.getSpellingLoc(Tok.getLocation())) == 'L'
    [all...]
Pragma.cpp 80 Token &Tok) {
83 PP.LexUnexpandedToken(Tok);
87 = FindHandler(Tok.getIdentifierInfo() ? Tok.getIdentifierInfo()->getName()
91 PP.Diag(Tok, diag::warn_pragma_ignored);
96 Handler->HandlePragma(PP, Introducer, Tok);
109 Token Tok;
110 PragmaHandlers->HandlePragma(*this, PragmaIntroducerKind(Introducer), Tok);
120 /// been read into 'Tok'.
121 void Preprocessor::Handle_Pragma(Token &Tok) {
    [all...]
PPMacroExpansion.cpp 326 Token Tok;
330 LexUnexpandedToken(Tok);
331 assert(Tok.is(tok::l_paren) && "Error computing l-paren-ness?");
339 while (Tok.isNot(tok::r_paren)) {
340 assert((Tok.is(tok::l_paren) || Tok.is(tok::comma)) &
    [all...]
TokenLexer.cpp 26 void TokenLexer::Init(Token &Tok, SourceLocation ELEnd, MacroArgs *Actuals) {
31 Macro = PP.getMacroInfo(Tok.getIdentifierInfo());
35 ExpandLocStart = Tok.getLocation();
37 AtStartOfLine = Tok.isAtStartOfLine();
38 HasLeadingSpace = Tok.hasLeadingSpace();
50 assert((Tokens[0].getLocation().isFileID() || Tokens[0].is(tok::comment)) &&
143 if (CurTok.is(tok::hash) || CurTok.is(tok::hashat)) {
154 if (CurTok.is(tok::hash)) // Stringify
196 !ResultToks.empty() && ResultToks.back().is(tok::hashhash)
    [all...]
PPCaching.cpp 91 void Preprocessor::AnnotatePreviousCachedTokens(const Token &Tok) {
92 assert(Tok.isAnnotation() && "Expected annotation token");
94 assert(CachedTokens[CachedLexPos-1].getLastLoc() == Tok.getAnnotationEndLoc()
101 if (AnnotBegin->getLocation() == Tok.getLocation()) {
107 *AnnotBegin = Tok;
MacroArgs.cpp 101 for (; ArgPtr->isNot(tok::eof); ++ArgPtr)
117 if (Result->is(tok::eof))
131 for (; ArgTok->isNot(tok::eof); ++ArgTok)
168 Token &Tok = Result.back();
169 PP.Lex(Tok);
170 } while (Result.back().isNot(tok::eof));
190 Token Tok;
191 Tok.startToken();
192 Tok.setKind(Charify ? tok::char_constant : tok::string_literal)
    [all...]
PPDirectives.cpp 84 /// current line until the tok::eod token is found.
89 assert(Tmp.isNot(tok::eof) && "EOF seen while discarding directive tokens");
90 } while (Tmp.isNot(tok::eod));
102 if (MacroNameTok.is(tok::code_completion)) {
110 if (MacroNameTok.is(tok::eod)) {
130 } else if (isDefineUndef && II->getPPKeywordID() == tok::pp_defined) {
146 // token kind to tok::eod.
147 MacroNameTok.setKind(tok::eod);
151 /// CheckEndOfDirective - Ensure that the next token is a tok::eod token. If
166 while (Tmp.is(tok::comment)) // Skip comments in -C mode
    [all...]
  /external/clang/lib/Rewrite/
TokenRewriter.cpp 35 while (RawTok.isNot(tok::eof)) {
37 if (Tok.is(tok::raw_identifier)) {
40 PP.LookUpIdentifierInfo(Tok);
87 Token Tok;
88 Tok.startToken();
90 Tok.setLocation(ScratchBuf->getToken(Val, Len, Spelling));
91 Tok.setLength(Len);
94 // set kind to tok::unknown.
95 Tok.setKind(tok::unknown)
    [all...]
HTMLRewrite.cpp 372 Token Tok;
373 L.LexFromRawLexer(Tok);
375 while (Tok.isNot(tok::eof)) {
378 unsigned TokOffs = SM.getFileOffset(Tok.getLocation());
379 unsigned TokLen = Tok.getLength();
380 switch (Tok.getKind()) {
382 case tok::identifier:
383 llvm_unreachable("tok::identifier in raw lexing mode!");
385 case tok::raw_identifier:
    [all...]
  /external/clang/lib/Frontend/
PrintPreprocessedOutput.cpp 133 bool HandleFirstTokOnLine(Token &Tok);
143 const Token &Tok) {
144 return ConcatInfo.AvoidConcat(PrevPrevTok, PrevTok, Tok);
414 bool PrintPPOutputPPCallbacks::HandleFirstTokOnLine(Token &Tok) {
417 if (!MoveToLine(Tok.getLocation()))
422 unsigned ColNo = SM.getInstantiationColumnNumber(Tok.getLocation());
430 if (ColNo <= 1 && Tok.is(tok::hash))
479 while (PragmaTok.isNot(tok::eod)) {
492 static void PrintPreprocessedTokens(Preprocessor &PP, Token &Tok,
    [all...]

Completed in 589 milliseconds

1 2 3