HomeSort by relevance Sort by last modified time
    Searched refs:Tok (Results 1 - 25 of 52) 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...]
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 33 if (Tok.is(tok::kw_template) && NextToken().isNot(tok::less)) {
84 assert((Tok.is(tok::kw_export) || Tok.is(tok::kw_template)) &&
122 if (Tok.is(tok::kw_export)) {
128 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...]
ParseCXXInlineMethods.cpp 30 assert((Tok.is(tok::l_brace) || Tok.is(tok::colon) || Tok.is(tok::kw_try) ||
31 Tok.is(tok::equal)) &&
64 if (Tok.is(tok::equal))
    [all...]
ParseObjc.cpp 35 if (Tok.is(tok::code_completion)) {
42 switch (Tok.getObjCKeywordID()) {
43 case tok::objc_class:
46 case tok::objc_interface: {
51 case tok::objc_protocol: {
56 case tok::objc_implementation:
59 case tok::objc_end:
62 case tok::objc_compatibility_alias:
65 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();
128 if (Name->getTokenID() != tok::identifier)
    [all...]
ParseDeclCXX.cpp 53 assert(Tok.is(tok::kw_namespace) && "Not a namespace!");
57 if (Tok.is(tok::code_completion)) {
71 if (Tok.is(tok::identifier)) {
72 Ident = Tok.getIdentifierInfo();
74 while (Tok.is(tok::coloncolon) && NextToken().is(tok::identifier))
    [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...]
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 24 static int SelectDigraphErrorMessage(tok::TokenKind Kind) {
26 case tok::kw_template: return 0;
27 case tok::kw_const_cast: return 1;
28 case tok::kw_dynamic_cast: return 2;
29 case tok::kw_reinterpret_cast: return 3;
30 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);
77 if (!Next.is(tok::l_square) || Next.getLength() != 2
    [all...]
ParseDecl.cpp 107 assert(Tok.is(tok::kw___attribute) && "Not a GNU attribute list!");
109 while (Tok.is(tok::kw___attribute)) {
111 if (ExpectAndConsume(tok::l_paren, diag::err_expected_lparen_after,
113 SkipUntil(tok::r_paren, true); // skip until ) or ;
116 if (ExpectAndConsume(tok::l_paren, diag::err_expected_lparen_after, "(")) {
117 SkipUntil(tok::r_paren, true); // skip until ) or ;
121 while (Tok.is(tok::identifier) || isDeclarationSpecifier() |
    [all...]
  /external/clang/lib/Lex/
TokenConcatenation.cpp 47 bool TokenConcatenation::IsIdentifierStringPrefix(const Token &Tok) const {
50 if (!Tok.needsCleaning()) {
51 if (Tok.getLength() < 1 || Tok.getLength() > 3)
54 const char *Ptr = SM.getCharacterData(SM.getSpellingLoc(Tok.getLocation()));
55 return IsStringPrefix(StringRef(Ptr, Tok.getLength()),
59 if (Tok.getLength() < 256) {
62 unsigned length = PP.getSpelling(Tok, TokPtr);
66 return IsStringPrefix(StringRef(PP.getSpelling(Tok)), LangOpts.CPlusPlus0x);
73 TokenInfo[tok::identifier ] |= aci_custom
    [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 330 Token Tok;
334 LexUnexpandedToken(Tok);
335 assert(Tok.is(tok::l_paren) && "Error computing l-paren-ness?");
343 while (Tok.isNot(tok::r_paren)) {
344 assert((Tok.is(tok::l_paren) || Tok.is(tok::comma)) &
    [all...]
MacroArgs.cpp 104 for (; ArgPtr->isNot(tok::eof); ++ArgPtr)
120 if (Result->is(tok::eof))
134 for (; ArgTok->isNot(tok::eof); ++ArgTok)
171 Token &Tok = Result.back();
172 PP.Lex(Tok);
173 } while (Result.back().isNot(tok::eof));
194 Token Tok;
195 Tok.startToken();
196 Tok.setKind(Charify ? tok::char_constant : tok::string_literal)
    [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)) &&
142 if (CurTok.is(tok::hash) || CurTok.is(tok::hashat)) {
152 if (CurTok.is(tok::hash)) // Stringify
198 !ResultToks.empty() && ResultToks.back().is(tok::hashhash)
    [all...]
PPCaching.cpp 93 void Preprocessor::AnnotatePreviousCachedTokens(const Token &Tok) {
94 assert(Tok.isAnnotation() && "Expected annotation token");
96 assert(CachedTokens[CachedLexPos-1].getLastLoc() == Tok.getAnnotationEndLoc()
103 if (AnnotBegin->getLocation() == Tok.getLocation()) {
109 *AnnotBegin = Tok;
PPDirectives.cpp 85 /// current line until the tok::eod token is found.
90 assert(Tmp.isNot(tok::eof) && "EOF seen while discarding directive tokens");
91 } while (Tmp.isNot(tok::eod));
103 if (MacroNameTok.is(tok::code_completion)) {
111 if (MacroNameTok.is(tok::eod)) {
131 } else if (isDefineUndef && II->getPPKeywordID() == tok::pp_defined) {
147 // token kind to tok::eod.
148 MacroNameTok.setKind(tok::eod);
152 /// CheckEndOfDirective - Ensure that the next token is a tok::eod token. If
167 while (Tmp.is(tok::comment)) // Skip comments in -C mode
    [all...]
  /external/clang/include/clang/Lex/
TokenConcatenation.h 57 char TokenInfo[tok::NUM_TOKENS];
63 const Token &Tok) const;
68 bool IsIdentifierStringPrefix(const Token &Tok) const;
TokenLexer.h 101 TokenLexer(Token &Tok, SourceLocation ILEnd, MacroArgs *ActualArgs,
104 Init(Tok, ILEnd, ActualArgs);
111 void Init(Token &Tok, SourceLocation ILEnd, MacroArgs *ActualArgs);
138 void Lex(Token &Tok);
153 /// PasteTokens - Tok is the LHS of a ## operator, and CurToken is the ##
156 /// Tok. If this returns true, the caller should immediately return the
158 bool PasteTokens(Token &Tok);
169 void HandleMicrosoftCommentPaste(Token &Tok);
Preprocessor.h 598 while (Result.getKind() == tok::comment);
619 while (Result.getKind() == tok::comment);
651 void EnterToken(const Token &Tok) {
653 CachedTokens.insert(CachedTokens.begin()+CachedLexPos, Tok);
664 void AnnotateCachedTokens(const Token &Tok) {
665 assert(Tok.isAnnotation() && "Expected annotation token");
667 AnnotatePreviousCachedTokens(Tok);
678 void ReplaceLastTokenWithAnnotation(const Token &Tok) {
679 assert(Tok.isAnnotation() && "Expected annotation token");
681 CachedTokens[CachedLexPos-1] = Tok;
    [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 134 bool HandleFirstTokOnLine(Token &Tok);
144 const Token &Tok) {
145 return ConcatInfo.AvoidConcat(PrevPrevTok, PrevTok, Tok);
416 bool PrintPPOutputPPCallbacks::HandleFirstTokOnLine(Token &Tok) {
419 if (!MoveToLine(Tok.getLocation()))
424 unsigned ColNo = SM.getExpansionColumnNumber(Tok.getLocation());
432 if (ColNo <= 1 && Tok.is(tok::hash))
481 while (PragmaTok.isNot(tok::eod)) {
494 static void PrintPreprocessedTokens(Preprocessor &PP, Token &Tok,
    [all...]

Completed in 314 milliseconds

1 2 3