HomeSort by relevance Sort by last modified time
    Searched refs:Tok (Results 26 - 50 of 100) sorted by null

12 3 4

  /external/clang/lib/Format/
UnwrappedLineParser.h 115 void pushToken(FormatToken *Tok);
207 UnwrappedLineNode() : Tok(nullptr) {}
208 UnwrappedLineNode(FormatToken *Tok) : Tok(Tok) {}
210 FormatToken *Tok;
FormatToken.h 116 Token Tok;
192 tok::TokenKind ParentBracket = tok::unknown;
281 bool is(tok::TokenKind Kind) const { return Tok.is(Kind); }
284 return II && II == Tok.getIdentifierInfo();
286 bool is(tok::PPKeywordKind Kind) const {
287 return Tok.getIdentifierInfo() &&
288 Tok.getIdentifierInfo()->getPPKeywordID() == Kind;
299 bool isStringLiteral() const { return tok::isStringLiteral(Tok.getKind());
    [all...]
WhitespaceManager.cpp 32 StringRef CurrentLinePrefix, tok::TokenKind Kind, bool ContinuesPPDirective,
50 void WhitespaceManager::replaceWhitespace(FormatToken &Tok, unsigned Newlines,
54 if (Tok.Finalized)
56 Tok.Decision = (Newlines > 0) ? FD_Break : FD_Continue;
58 Change(true, Tok.WhitespaceRange, IndentLevel, Spaces, StartOfTokenColumn,
59 Newlines, "", "", Tok.Tok.getKind(), InPPDirective && !Tok.IsFirst,
60 Tok.is(TT_StartOfName) || Tok.is(TT_FunctionDeclarationName)))
    [all...]
TokenAnnotator.cpp 39 Contexts.push_back(Context(tok::unknown, 1, /*IsExpression=*/false));
49 ScopedContextCreator ContextCreator(*this, tok::less, 10);
59 Left->Previous && Left->Previous->Tok.isNot(tok::kw_template);
62 CurrentToken->is(tok::question))
66 if (CurrentToken->is(tok::greater)) {
73 if (CurrentToken->is(tok::question) &&
78 if (CurrentToken->isOneOf(tok::r_paren, tok::r_square, tok::r_brace) |
    [all...]
UnwrappedLineFormatter.cpp 24 return Line.startsWith(tok::kw_extern) && Next && Next->isStringLiteral() &&
25 NextNext && NextNext->is(tok::l_brace);
77 if ((!Line.First->is(tok::comment) || IndentForLevel[Line.Level] == -1) &&
94 RootToken.Next && RootToken.Next->is(tok::colon)))
193 I[1]->First->is(tok::r_brace)) ||
201 if (TheLine->Last->is(tok::l_brace)) {
226 if (TheLine->First->is(tok::kw_if)) {
231 if (TheLine->First->isOneOf(tok::kw_for, tok::kw_while)) {
236 if (TheLine->First->isOneOf(tok::kw_case, tok::kw_default))
    [all...]
Format.cpp     [all...]
BreakableToken.h 75 BreakableToken(const FormatToken &Tok, unsigned IndentLevel,
78 : Tok(Tok), IndentLevel(IndentLevel), InPPDirective(InPPDirective),
81 const FormatToken &Tok;
98 BreakableSingleLineToken(const FormatToken &Tok, unsigned IndentLevel,
120 BreakableStringLiteral(const FormatToken &Tok, unsigned IndentLevel,
WhitespaceManager.h 47 /// \brief Replaces the whitespace in front of \p Tok. Only call once for
49 void replaceWhitespace(FormatToken &Tok, unsigned Newlines,
58 void addUntouchableToken(const FormatToken &Tok, bool InPPDirective);
63 /// (in this order) at \p Offset inside \p Tok, replacing \p ReplaceChars
74 void replaceWhitespaceInToken(const FormatToken &Tok, unsigned Offset,
111 StringRef CurrentLinePrefix, tok::TokenKind Kind,
126 tok::TokenKind Kind;
BreakableToken.cpp 145 const FormatToken &Tok, unsigned IndentLevel, unsigned StartColumn,
148 : BreakableToken(Tok, IndentLevel, InPPDirective, Encoding, Style),
150 assert(Tok.TokenText.endswith(Postfix));
151 Line = Tok.TokenText.substr(
152 Prefix.size(), Tok.TokenText.size() - Prefix.size() - Postfix.size());
156 const FormatToken &Tok, unsigned IndentLevel, unsigned StartColumn,
159 : BreakableSingleLineToken(Tok, IndentLevel, StartColumn, Prefix, Postfix,
181 Tok, Prefix.size() + TailOffset + Split.first, Split.second, Postfix,
229 Tok, OriginalPrefix.size() + TailOffset + Split.first, Split.second,
237 Tok, OriginalPrefix.size() + TailOffset + Split.first, Split.second, ""
    [all...]
  /external/clang/lib/Frontend/
PrintPreprocessedOutput.cpp 144 bool HandleFirstTokOnLine(Token &Tok);
158 const Token &Tok) {
159 return ConcatInfo.AvoidConcat(PrevPrevTok, PrevTok, Tok);
504 bool PrintPPOutputPPCallbacks::HandleFirstTokOnLine(Token &Tok) {
507 if (!MoveToLine(Tok.getLocation()))
512 unsigned ColNo = SM.getExpansionColumnNumber(Tok.getLocation());
518 if (ColNo == 1 && Tok.hasLeadingSpace())
527 if (ColNo <= 1 && Tok.is(tok::hash))
586 while (PragmaTok.isNot(tok::eod))
    [all...]
CacheTokens.cpp 306 Token Tok;
309 L.LexFromRawLexer(Tok);
312 if ((Tok.isAtStartOfLine() || Tok.is(tok::eof)) &&
317 // 'Tok' when we exit this branch.
318 Token Tmp = Tok;
319 Tmp.setKind(tok::eod);
326 if (Tok.is(tok::raw_identifier))
    [all...]
  /external/clang/lib/Parse/
ParseExpr.cpp 150 LHS = Actions.ActOnUnaryOp(getCurScope(), ExtLoc, tok::kw___extension__,
158 if (Tok.is(tok::code_completion)) {
164 if (Tok.is(tok::kw_throw))
166 if (Tok.is(tok::kw_co_yield))
229 tok::TokenKind K = Tok.getKind();
230 if (K == tok::l_brace || K == tok::r_brace |
    [all...]
ParseDecl.cpp 127 assert(Tok.is(tok::kw___attribute) && "Not a GNU attribute list!");
129 while (Tok.is(tok::kw___attribute)) {
131 if (ExpectAndConsume(tok::l_paren, diag::err_expected_lparen_after,
133 SkipUntil(tok::r_paren, StopAtSemi); // skip until ) or ;
136 if (ExpectAndConsume(tok::l_paren, diag::err_expected_lparen_after, "(")) {
137 SkipUntil(tok::r_paren, StopAtSemi); // skip until ) or ;
143 if (TryConsumeToken(tok::comma))
147 if (Tok.isAnnotation()
    [all...]
ParseExprCXX.cpp 28 static int SelectDigraphErrorMessage(tok::TokenKind Kind) {
31 case tok::unknown: return 0;
33 case tok::kw_const_cast: return 1;
34 case tok::kw_dynamic_cast: return 2;
35 case tok::kw_reinterpret_cast: return 3;
36 case tok::kw_static_cast: return 4;
52 Token &ColonToken, tok::TokenKind Kind, bool AtDigraph) {
66 ColonToken.setKind(tok::coloncolon);
69 DigraphToken.setKind(tok::less);
83 if (!Next.is(tok::l_square) || Next.getLength() != 2
    [all...]
ParseStmtAsm.cpp 164 const Token &Tok = AsmToks[TokIndex];
165 Loc = Tok.getLocation();
193 const tok::TokenKind EndOfStream = tok::semi;
200 LineToks.push_back(Tok);
220 if (Tok.is(tok::kw_this)) {
237 while (Result.isUsable() && Tok.is(tok::period)) {
239 if (IdTok.isNot(tok::identifier)
    [all...]
ParseAST.cpp 59 const Token &Tok = P.getCurToken();
60 if (Tok.is(tok::eof)) {
65 if (Tok.getLocation().isInvalid()) {
71 Tok.getLocation().print(OS, PP.getSourceManager());
72 if (Tok.isAnnotation()) {
75 // Do the equivalent of PP.getSpelling(Tok) except for the parts that would
79 unsigned Length = Tok.getLength();
80 const char *Spelling = SM.getCharacterData(Tok.getLocation(), &Invalid);
  /external/clang/lib/Lex/
PPCaching.cpp 97 void Preprocessor::AnnotatePreviousCachedTokens(const Token &Tok) {
98 assert(Tok.isAnnotation() && "Expected annotation token");
100 assert(CachedTokens[CachedLexPos-1].getLastLoc() == Tok.getAnnotationEndLoc()
107 if (AnnotBegin->getLocation() == Tok.getLocation()) {
113 *AnnotBegin = Tok;
PPDirectives.cpp 82 /// the tok::eod token is found.
87 assert(Tmp.isNot(tok::eof) && "EOF seen while discarding directive tokens");
88 } while (Tmp.isNot(tok::eod));
142 if (MacroNameTok.is(tok::eod))
168 if ((isDefineUndef != MU_Other) && II->getPPKeywordID() == tok::pp_defined) {
224 if (MacroNameTok.is(tok::code_completion)) {
235 // token kind to tok::eod if necessary.
236 if (MacroNameTok.isNot(tok::eod)) {
237 MacroNameTok.setKind(tok::eod);
242 /// \brief Ensure that the next token is a tok::eod token
    [all...]
ModuleMap.cpp     [all...]
MacroInfo.cpp 48 assert((macroStart.isFileID() || firstToken.is(tok::comment)) &&
50 assert((macroEnd.isFileID() || lastToken.is(tok::comment)) &&
158 for (const Token &Tok : ReplacementTokens) {
161 if (First || Tok.hasLeadingSpace())
165 if (const char *Punc = tok::getPunctuatorSpelling(Tok.getKind()))
167 else if (Tok.isLiteral() && Tok.getLiteralData())
168 Out << StringRef(Tok.getLiteralData(), Tok.getLength())
    [all...]
Preprocessor.cpp 211 void Preprocessor::DumpToken(const Token &Tok, bool DumpFlags) const {
212 llvm::errs() << tok::getTokenName(Tok.getKind()) << " '"
213 << getSpelling(Tok) << "'";
218 if (Tok.isAtStartOfLine())
220 if (Tok.hasLeadingSpace())
222 if (Tok.isExpandDisabled())
224 if (Tok.needsCleaning()) {
225 const char *Start = SourceMgr.getCharacterData(Tok.getLocation());
226 llvm::errs() << " [UnClean='" << StringRef(Start, Tok.getLength()
    [all...]
  /external/clang/include/clang/Lex/
PTHLexer.h 70 bool Lex(Token &Tok);
72 void getEOF(Token &Tok);
79 /// tok::l_paren token, 0 if it is something else and 2 if there are no more
83 // whether or not we are at a token with kind tok::eof or tok::l_paren.
86 tok::TokenKind x = (tok::TokenKind)*CurPtr;
87 return x == tok::eof ? 2 : x == tok::l_paren;
Preprocessor.h 65 tok::TokenKind Kind;
69 TokenValue(tok::TokenKind Kind) : Kind(Kind), II(nullptr) {
70 assert(Kind != tok::raw_identifier && "Raw identifiers are not supported.");
71 assert(Kind != tok::identifier &&
73 assert(!tok::isLiteral(Kind) && "Literals are not supported.");
74 assert(!tok::isAnnotation(Kind) && "Annotations are not supported.");
76 TokenValue(IdentifierInfo *II) : Kind(tok::identifier), II(II) {}
77 bool operator==(const Token &Tok) const {
78 return Tok.getKind() == Kind &&
79 (!II || II == Tok.getIdentifierInfo())
    [all...]
  /external/clang/include/clang/Parse/
Parser.h 66 /// Tok - The current token we are peeking ahead. All parsing methods assume
68 Token Tok;
143 llvm::SmallDenseMap<IdentifierInfo *, tok::TokenKind> RevertibleTypeTraits;
250 const Token &getCurToken() const { return Tok; }
288 PrevTokLocation = Tok.getLocation();
289 PP.Lex(Tok);
293 bool TryConsumeToken(tok::TokenKind Expected) {
294 if (Tok.isNot(Expected))
298 PrevTokLocation = Tok.getLocation();
299 PP.Lex(Tok);
    [all...]
  /external/clang/lib/Frontend/Rewrite/
InclusionRewriter.cpp 83 const DirectoryLookup *Lookup, Token &Tok,
303 } while (!DirectiveToken.is(tok::eod) && DirectiveToken.isNot(tok::eof));
320 if (RawToken.is(tok::raw_identifier))
322 if (RawToken.is(tok::identifier))
330 FileID FileId, Lexer &RawLex, const DirectoryLookup *Lookup, Token &Tok,
333 RawLex.LexFromRawLexer(Tok);
334 if (Tok.isNot(tok::l_paren))
337 RawLex.LexFromRawLexer(Tok);
    [all...]

Completed in 318 milliseconds

12 3 4