Lines Matching refs:RawTok
28 static bool isSameToken(Token &RawTok, Token &PPTok) { in isSameToken() argument
31 if (PPTok.getKind() == RawTok.getKind() && in isSameToken()
32 PPTok.getIdentifierInfo() == RawTok.getIdentifierInfo()) in isSameToken()
39 PPTok.getIdentifierInfo() == RawTok.getIdentifierInfo()) in isSameToken()
74 Token RawTok; in LexRawTokensFromMainFile() local
76 RawLex.LexFromRawLexer(RawTok); in LexRawTokensFromMainFile()
81 if (RawTok.is(tok::raw_identifier)) in LexRawTokensFromMainFile()
82 PP.LookUpIdentifierInfo(RawTok); in LexRawTokensFromMainFile()
84 RawTokens.push_back(RawTok); in LexRawTokensFromMainFile()
85 } while (RawTok.isNot(tok::eof)); in LexRawTokensFromMainFile()
100 Token RawTok = GetNextRawTok(RawTokens, CurRawTok, false); in RewriteMacrosInInput() local
114 while (RawTok.isNot(tok::eof) || PPTok.isNot(tok::eof)) { in RewriteMacrosInInput()
127 if (RawTok.is(tok::hash) && RawTok.isAtStartOfLine()) { in RewriteMacrosInInput()
134 RB.InsertTextAfter(SM.getFileOffset(RawTok.getLocation()), "//"); in RewriteMacrosInInput()
140 RB.InsertTextAfter(SM.getFileOffset(RawTok.getLocation()), "//"); in RewriteMacrosInInput()
146 RawTok = GetNextRawTok(RawTokens, CurRawTok, false); in RewriteMacrosInInput()
147 while (!RawTok.isAtStartOfLine() && RawTok.isNot(tok::eof)) in RewriteMacrosInInput()
148 RawTok = GetNextRawTok(RawTokens, CurRawTok, false); in RewriteMacrosInInput()
155 unsigned RawOffs = SM.getFileOffset(RawTok.getLocation()); in RewriteMacrosInInput()
158 if (PPOffs == RawOffs && isSameToken(RawTok, PPTok)) { in RewriteMacrosInInput()
159 RawTok = GetNextRawTok(RawTokens, CurRawTok, false); in RewriteMacrosInInput()
169 bool HasSpace = RawTok.hasLeadingSpace(); in RewriteMacrosInInput()
174 EndPos = RawOffs+RawTok.getLength(); in RewriteMacrosInInput()
176 RawTok = GetNextRawTok(RawTokens, CurRawTok, true); in RewriteMacrosInInput()
177 RawOffs = SM.getFileOffset(RawTok.getLocation()); in RewriteMacrosInInput()
179 if (RawTok.is(tok::comment)) { in RewriteMacrosInInput()
181 RawTok = GetNextRawTok(RawTokens, CurRawTok, false); in RewriteMacrosInInput()
185 } while (RawOffs <= PPOffs && !RawTok.isAtStartOfLine() && in RewriteMacrosInInput()
186 (PPOffs != RawOffs || !isSameToken(RawTok, PPTok))); in RewriteMacrosInInput()