Lines Matching refs:Lex

47   Lexer Lex(SM.getMainFileID(), SM.getBufferOrFake(SM.getMainFileID()), SM,  in getOffsetAfterTokenSequence()  local
51 Lex.LexFromRawLexer(Tok); in getOffsetAfterTokenSequence()
52 return GetOffsetAfterSequence(SM, Lex, Tok); in getOffsetAfterTokenSequence()
60 Lexer &Lex, StringRef Name, Token &Tok, in checkAndConsumeDirectiveWithName() argument
62 bool Matched = Tok.is(tok::hash) && !Lex.LexFromRawLexer(Tok) && in checkAndConsumeDirectiveWithName()
64 Tok.getRawIdentifier() == Name && !Lex.LexFromRawLexer(Tok) && in checkAndConsumeDirectiveWithName()
68 Lex.LexFromRawLexer(Tok); in checkAndConsumeDirectiveWithName()
72 void skipComments(Lexer &Lex, Token &Tok) { in skipComments() argument
74 if (Lex.LexFromRawLexer(Tok)) in skipComments()
88 [&](std::function<unsigned(const SourceManager &SM, Lexer &Lex, in getOffsetAfterHeaderGuardsAndComments()
93 [&Consume](const SourceManager &SM, Lexer &Lex, Token Tok) { in getOffsetAfterHeaderGuardsAndComments() argument
94 skipComments(Lex, Tok); in getOffsetAfterHeaderGuardsAndComments()
96 return std::max(InitialOffset, Consume(SM, Lex, Tok)); in getOffsetAfterHeaderGuardsAndComments()
102 [](const SourceManager &SM, Lexer &Lex, Token Tok) -> unsigned { in getOffsetAfterHeaderGuardsAndComments() argument
103 if (checkAndConsumeDirectiveWithName(Lex, "ifndef", Tok)) { in getOffsetAfterHeaderGuardsAndComments()
104 skipComments(Lex, Tok); in getOffsetAfterHeaderGuardsAndComments()
105 if (checkAndConsumeDirectiveWithName(Lex, "define", Tok) && in getOffsetAfterHeaderGuardsAndComments()
113 [](const SourceManager &SM, Lexer &Lex, Token Tok) -> unsigned { in getOffsetAfterHeaderGuardsAndComments() argument
114 if (checkAndConsumeDirectiveWithName(Lex, "pragma", Tok, in getOffsetAfterHeaderGuardsAndComments()
125 bool checkAndConsumeInclusiveDirective(Lexer &Lex, Token &Tok) { in checkAndConsumeInclusiveDirective() argument
127 Lex.LexFromRawLexer(Tok); in checkAndConsumeInclusiveDirective()
130 if (Tok.is(tok::hash) && !Lex.LexFromRawLexer(Tok) && in checkAndConsumeInclusiveDirective()
132 if (Lex.LexFromRawLexer(Tok)) in checkAndConsumeInclusiveDirective()
137 while (!Lex.LexFromRawLexer(Tok) && Tok.isNot(tok::greater)) { in checkAndConsumeInclusiveDirective()
163 [](const SourceManager &SM, Lexer &Lex, Token Tok) { in getMaxHeaderInsertionOffset() argument
164 skipComments(Lex, Tok); in getMaxHeaderInsertionOffset()
166 while (checkAndConsumeInclusiveDirective(Lex, Tok)) in getMaxHeaderInsertionOffset()