Lines Matching refs:Lex
44 Lexer Lex(SM.getMainFileID(), SM.getBuffer(SM.getMainFileID()), SM, in getOffsetAfterTokenSequence() local
48 Lex.LexFromRawLexer(Tok); in getOffsetAfterTokenSequence()
49 return GetOffsetAfterSequence(SM, Lex, Tok); in getOffsetAfterTokenSequence()
55 bool checkAndConsumeDirectiveWithName(Lexer &Lex, StringRef Name, Token &Tok) { in checkAndConsumeDirectiveWithName() argument
56 bool Matched = Tok.is(tok::hash) && !Lex.LexFromRawLexer(Tok) && in checkAndConsumeDirectiveWithName()
58 Tok.getRawIdentifier() == Name && !Lex.LexFromRawLexer(Tok) && in checkAndConsumeDirectiveWithName()
61 Lex.LexFromRawLexer(Tok); in checkAndConsumeDirectiveWithName()
65 void skipComments(Lexer &Lex, Token &Tok) { in skipComments() argument
67 if (Lex.LexFromRawLexer(Tok)) in skipComments()
80 [](const SourceManager &SM, Lexer &Lex, Token Tok) { in getOffsetAfterHeaderGuardsAndComments() argument
81 skipComments(Lex, Tok); in getOffsetAfterHeaderGuardsAndComments()
83 if (checkAndConsumeDirectiveWithName(Lex, "ifndef", Tok)) { in getOffsetAfterHeaderGuardsAndComments()
84 skipComments(Lex, Tok); in getOffsetAfterHeaderGuardsAndComments()
85 if (checkAndConsumeDirectiveWithName(Lex, "define", Tok)) in getOffsetAfterHeaderGuardsAndComments()
96 bool checkAndConsumeInclusiveDirective(Lexer &Lex, Token &Tok) { in checkAndConsumeInclusiveDirective() argument
98 Lex.LexFromRawLexer(Tok); in checkAndConsumeInclusiveDirective()
101 if (Tok.is(tok::hash) && !Lex.LexFromRawLexer(Tok) && in checkAndConsumeInclusiveDirective()
103 if (Lex.LexFromRawLexer(Tok)) in checkAndConsumeInclusiveDirective()
108 while (!Lex.LexFromRawLexer(Tok) && Tok.isNot(tok::greater)) { in checkAndConsumeInclusiveDirective()
134 [](const SourceManager &SM, Lexer &Lex, Token Tok) { in getMaxHeaderInsertionOffset() argument
135 skipComments(Lex, Tok); in getMaxHeaderInsertionOffset()
137 while (checkAndConsumeInclusiveDirective(Lex, Tok)) in getMaxHeaderInsertionOffset()