Home
last modified time | relevance | path

Searched refs:NextToken (Results 1 – 25 of 29) sorted by relevance

12

/freebsd/contrib/llvm-project/clang/lib/Tooling/Refactoring/Extract/
H A DSourceExtraction.cpp104 std::optional<Token> NextToken = Lexer::findNextToken(End, SM, LangOpts); in compute() local
105 if (NextToken && NextToken->is(tok::semi) && in compute()
106 areOnSameLine(NextToken->getLocation(), End, SM)) { in compute()
107 ExtractedRange.setEnd(NextToken->getLocation()); in compute()
/freebsd/contrib/llvm-project/clang/lib/Parse/
H A DParseTentative.cpp95 if (NextToken().is(tok::identifier)) in isCXXDeclarationStatement()
205 if (NextToken().isNot(tok::l_paren)) { in TryConsumeDeclarationSpecifier()
687 NextToken().isOneOf(tok::greater, tok::greatergreater, in isCXXTypeId()
747 if (Tok.isNot(tok::l_square) || NextToken().isNot(tok::l_square)) in isCXX11AttributeSpecifier()
920 (Tok.is(tok::annot_cxxscope) && NextToken().is(tok::star))) { in TryParsePtrOperatorSeq()
965 if (Tok.is(tok::l_square) && NextToken().is(tok::r_square)) { in TryParseOperatorId()
979 if (NextToken().is(tok::r_square)) { in TryParseOperatorId()
987 if (NextToken().is(tok::r_paren)) { in TryParseOperatorId()
1102 (Tok.is(tok::annot_cxxscope) && (NextToken().is(tok::identifier) || in TryParseDeclarator()
1103 NextToken().is(tok::kw_operator)))) && in TryParseDeclarator()
[all …]
H A DParseDecl.cpp547 const Token &Next = NextToken(); in ParseAttributeArgsCommon()
841 } else if (NextToken().is(tok::comma) || NextToken().is(tok::r_paren)) { in ParseMicrosoftDeclSpecArgs()
854 if (!NextToken().is(tok::equal)) in ParseMicrosoftDeclSpecArgs()
1845 assert(Tok.is(tok::l_square) && NextToken().is(tok::l_square)); in DiagnoseProhibitedCXX11Attribute()
1876 assert((Tok.is(tok::l_square) && NextToken().is(tok::l_square)) || in DiagnoseMisplacedCXX11Attribute()
2028 if (getLangOpts().CPlusPlus && NextToken().is(tok::kw_namespace)) { in ParseDeclaration()
2160 NextToken().is(tok::l_square); in MightBeDeclarator()
2166 switch (NextToken().getKind()) { in MightBeDeclarator()
2193 return getLangOpts().CPlusPlus11 && isCXX11VirtSpecifier(NextToken()); in MightBeDeclarator()
2243 if (Tok.isAtStartOfLine() && NextToken().is(tok::kw_namespace) && in SkipMalformedDecl()
[all …]
H A DParseTemplate.cpp45 if (Tok.is(tok::kw_template) && NextToken().isNot(tok::less)) { in ParseDeclarationStartingWithTemplate()
438 switch (NextToken().getKind()) { in isStartOfTemplateTypeParameter()
489 Token Next = NextToken(); in isStartOfTemplateTypeParameter()
595 const Token &T = Tok.is(tok::annot_cxxscope) ? NextToken() : Tok; in isTypeConstraintAnnotation()
821 const Token &Next = Tok.is(tok::kw_struct) ? NextToken() : Tok; in ParseTemplateTemplateParameter()
934 if (Tok.is(tok::l_paren) && NextToken().is(tok::l_brace)) { in ParseNonTypeTemplateParameter()
1041 if (NextToken().is(tok::equal) && in ParseGreaterThanInTemplateList()
1042 areTokensAdjacent(Tok, NextToken())) { in ParseGreaterThanInTemplateList()
1063 Token Next = NextToken(); in ParseGreaterThanInTemplateList()
1742 if (NextToken().is(tok::greater) || in checkPotentialAngleBracket()
[all …]
H A DParser.cpp174 NextToken().is(tok::semi)) { in ExpectAndConsumeSemi()
644 switch (NextToken().getKind()) { in ParseTopLevelDecl()
655 IdentifierInfo *II = NextToken().getIdentifierInfo(); in ParseTopLevelDecl()
741 NextToken().isNot(tok::coloncolon)) { in ParseTopLevelDecl()
1006 if (getLangOpts().CPlusPlus && NextToken().is(tok::kw_template)) { in ParseExternalDeclaration()
1017 tok::TokenKind NextKind = NextToken().getKind(); in ParseExternalDeclaration()
1039 if (getLangOpts().CPlusPlus && NextToken().is(tok::kw_template)) { in ParseExternalDeclaration()
1087 const Token &KW = NextToken(); in isDeclarationAfterDeclarator()
1114 const Token &KW = NextToken(); in isStartOfFunctionDefinition()
1815 Token Next = NextToken(); in TryAnnotateName()
[all …]
H A DParseDeclCXX.cpp109 (NextToken().is(tok::identifier) || in ParseNamespace()
110 (NextToken().is(tok::kw_inline) && in ParseNamespace()
654 (NextToken().is(tok::semi) || NextToken().is(tok::comma) || in ParseUsingDeclarator()
655 NextToken().is(tok::ellipsis) || NextToken().is(tok::l_square) || in ParseUsingDeclarator()
656 NextToken().isRegularKeywordAttribute() || in ParseUsingDeclarator()
657 NextToken().is(tok::kw___attribute)) && in ParseUsingDeclarator()
671 !(Tok.is(tok::identifier) && NextToken().is(tok::equal)), in ParseUsingDeclarator()
1154 if (Tok.is(tok::kw_auto) && NextToken().is(tok::r_paren)) { in ParseDecltypeSpecifier()
1282 if (!NextToken().is(tok::ellipsis) || in ParsePackIndexingType()
1353 if (!NextToken().is(tok::l_paren)) { in MaybeParseTypeTransformTypeSpecifier()
[all …]
H A DParseExprCXX.cpp191 tok::TokenKind NextKind = NextToken().getKind(); in ParseOptionalCXXScopeSpecifier()
364 if (Tok.is(tok::annot_template_id) && NextToken().is(tok::coloncolon)) { in ParseOptionalCXXScopeSpecifier()
415 if (!NextToken().is(tok::l_paren)) { in ParseOptionalCXXScopeSpecifier()
437 Token Next = NextToken(); in ParseOptionalCXXScopeSpecifier()
465 Next = NextToken(); // Point Next at the '{' token. in ParseOptionalCXXScopeSpecifier()
674 assert(Tok.is(tok::ellipsis) && NextToken().is(tok::l_square) && in ParseCXXPackIndexingExpression()
691 Tok.is(tok::ellipsis) && NextToken().is(tok::l_square)) { in tryParseCXXPackIndexingExpression()
829 const Token Next = NextToken(); in TryParseLambdaExpression()
933 (NextToken().is(tok::comma) || NextToken().is(tok::r_square))) { in ParseLambdaIntroducer()
1010 NextToken().isOneOf(tok::comma, tok::r_square) && in ParseLambdaIntroducer()
[all …]
H A DParseExpr.cpp325 (Tok.is(tok::l_square) && !NextToken().is(tok::l_square))) { in ParseConstraintLogicalAndExpression()
727 : NextToken(Next), AllowNonTypes(AllowNonTypes) { in CastExpressionIdValidator()
742 if (!NextToken.isOneOf(tok::equal, tok::arrow, tok::period)) in ValidateCandidate()
758 Token NextToken; member in __anon939f943e0311::CastExpressionIdValidator
1197 Token Next = NextToken(); in ParseCastExpression()
1278 (NextToken().is(tok::colon) || NextToken().is(tok::r_square))) || in ParseCastExpression()
1293 const Token& Next = NextToken(); in ParseCastExpression()
1380 tokenIsLikeStringLiteral(NextToken(), getLangOpts()))) { in ParseCastExpression()
1698 Token Next = NextToken(); in ParseCastExpression()
1860 if (!NextToken().is(tok::l_paren)) { in ParseCastExpression()
[all …]
H A DParseOpenACC.cpp243 if (isTokenIdentifierOrKeyword(P, IdentTok) && P.NextToken().is(tok::colon)) { in tryParseAndConsumeSpecialTokenKind()
313 if (P.NextToken().isNot(tok::colon)) { in ParseReductionOperator()
752 NextToken().isOneOf(tok::comma, tok::r_paren, in ParseOpenACCSizeExpr()
791 NextToken().is(tok::colon)) { in ParseOpenACCGangArg()
799 NextToken().is(tok::colon)) { in ParseOpenACCGangArg()
808 NextToken().is(tok::colon)) { in ParseOpenACCGangArg()
1164 NextToken().is(tok::colon)) { in ParseOpenACCWaitArgument()
1191 NextToken().is(tok::colon)) { in ParseOpenACCWaitArgument()
H A DParseInit.cpp259 NextToken().isNot(tok::period) && in ParseInitializerWithPotentialDesignator()
298 NextToken().is(tok::period), ReceiverType)) { in ParseInitializerWithPotentialDesignator()
H A DParseStmt.cpp145 StatementFilterCCC(Token nextTok) : NextToken(nextTok) { in StatementFilterCCC()
158 if (NextToken.is(tok::equal)) in ValidateCandidate()
160 if (NextToken.is(tok::period) && in ValidateCandidate()
171 Token NextToken; member in __anon4474fca70111::StatementFilterCCC
204 Token Next = NextToken(); in ParseStatementOrDeclarationAfterAttributes()
284 if (NextToken().is(tok::less)) { in ParseStatementOrDeclarationAfterAttributes()
1965 const Token &Next = NextToken(); in isForRangeIdentifier()
H A DParseObjc.cpp725 const auto &NextTok = NextToken(); in ParseObjCInterfaceDeclList()
1218 NextToken().is(tok::less) || in ParseObjCTypeQualifierList()
1219 NextToken().is(tok::coloncolon)) in ParseObjCTypeQualifierList()
1674 (NextToken().is(tok::comma) || in parseObjCTypeArgsOrProtocolQualifiers()
1675 NextToken().is(tok::greater) || in parseObjCTypeArgsOrProtocolQualifiers()
1676 NextToken().is(tok::greatergreater))) { in parseObjCTypeArgsOrProtocolQualifiers()
1853 (!consumeLastToken && NextToken().is(tok::less))) { in parseObjCTypeArgsAndProtocolQualifiers()
3048 if (!getLangOpts().ObjC || !NextToken().is(tok::identifier) || in isStartOfObjCClassMessageMissingOpenBracket()
3105 NextToken().isNot(tok::period) && getCurScope()->isInObjcMethodScope()) in ParseObjCMessageExpression()
3132 NextToken().is(tok::period), ReceiverType)) { in ParseObjCMessageExpression()
H A DParseOpenMP.cpp3897 NextToken().is(tok::colon)) { in ParseOpenMPSingleExprWithArgClause()
3916 if (NextToken().is(tok::colon)) { in ParseOpenMPSingleExprWithArgClause()
3943 if (NextToken().is(tok::colon)) { in ParseOpenMPSingleExprWithArgClause()
4234 if (Tok.isNot(tok::identifier) || NextToken().isNot(tok::equal)) { in ParseOpenMPIteratorsExpr()
4397 NextToken().is(tok::comma)) { in ParseOpenMPVarList()
H A DParseStmtAsm.cpp447 if (SingleLineMode && (!isAsm || isGCCAsmStatement(NextToken()))) in ParseMicrosoftAsmStatement()
/freebsd/contrib/llvm-project/clang/lib/Format/
H A DFormatToken.cpp91 if (!State.NextToken || !State.NextToken->Previous) in formatAfterToken()
99 State.NextToken->Previous->getPreviousNonComment(); in formatAfterToken()
109 Style.ColumnLimit - State.Column + State.NextToken->Previous->ColumnWidth; in formatAfterToken()
124 while (State.NextToken != LBrace->MatchingParen) { in formatAfterToken()
129 if (Item < Commas.size() && State.NextToken->Previous == Commas[Item]) { in formatAfterToken()
130 if (!State.NextToken->isTrailingComment()) { in formatAfterToken()
137 if (Column == Format->Columns || State.NextToken->MustBreakBefore) { in formatAfterToken()
H A DContinuationIndenter.h416 FormatToken *NextToken; member
463 if (NextToken != Other.NextToken)
464 return NextToken < Other.NextToken;
H A DContinuationIndenter.cpp265 State.NextToken = Line->First; in getInitialState()
291 const FormatToken &Current = *State.NextToken; in canBreak()
372 const FormatToken &Current = *State.NextToken; in mustBreak()
636 const FormatToken &Current = *State.NextToken; in addTokenToState()
637 assert(State.NextToken->Previous); in addTokenToState()
638 const FormatToken &Previous = *State.NextToken->Previous; in addTokenToState()
674 FormatToken &Current = *State.NextToken; in addTokenOnCurrentLine()
675 assert(State.NextToken->Previous); in addTokenOnCurrentLine()
676 const FormatToken &Previous = *State.NextToken->Previous; in addTokenOnCurrentLine()
942 FormatToken &Current = *State.NextToken; in addTokenOnNewLine()
[all …]
H A DUnwrappedLineFormatter.cpp988 llvm::dbgs() << State.NextToken->TokenText << "\n"; in printLineState()
1031 const FormatToken *LBrace = State.NextToken->getPreviousNonComment(); in formatChildren()
1033 FormatToken &Previous = *State.NextToken->Previous; in formatChildren()
1113 while (State.NextToken) { in formatLine()
1116 (Indenter->canBreak(State) && State.NextToken->NewlinesBefore > 0); in formatLine()
1139 while (State.NextToken) { in formatLine()
1142 State, /*Newline=*/State.NextToken->MustBreakBefore, DryRun); in formatLine()
1238 if (!Node->State.NextToken) { in analyzeSolutionSpace()
1255 FormatDecision LastFormat = Node->State.NextToken->getDecision(); in analyzeSolutionSpace()
1320 << Node->Previous->State.NextToken->Tok.getName() in reconstructPath()
H A DTokenAnnotator.cpp2965 const FormatToken *NextToken = Tok.getNextNonComment(); in determineStarAmpUsage() local
2967 if (InTemplateArgument && NextToken && NextToken->is(tok::kw_noexcept)) in determineStarAmpUsage()
2970 if (!NextToken || in determineStarAmpUsage()
2971 NextToken->isOneOf(tok::arrow, tok::equal, tok::comma, tok::r_paren, in determineStarAmpUsage()
2973 (NextToken->is(tok::kw_noexcept) && !IsExpression) || in determineStarAmpUsage()
2974 NextToken->canBePointerOrReferenceQualifier() || in determineStarAmpUsage()
2975 (NextToken->is(tok::l_brace) && !NextToken->getNextNonComment())) { in determineStarAmpUsage()
2988 if (NextToken->is(tok::l_square) && NextToken->isNot(TT_LambdaLSquare)) in determineStarAmpUsage()
2990 if (NextToken->is(tok::kw_operator) && !IsExpression) in determineStarAmpUsage()
2992 if (NextToken->isOneOf(tok::comma, tok::semi)) in determineStarAmpUsage()
[all …]
H A DUnwrappedLineParser.cpp3513 FormatToken *NextToken = Tokens->getNextToken(); in parseRequires() local
3515 auto PeekNext = [&Lookahead, &NextToken, this] { in parseRequires()
3517 NextToken = Tokens->getNextToken(); in parseRequires()
3525 switch (NextToken->Tok.getKind()) { in parseRequires()
3559 if (NextToken->isTypeName(LangOpts)) { in parseRequires()
/freebsd/contrib/llvm-project/llvm/lib/Target/AMDGPU/AsmParser/
H A DAMDGPUAsmParser.cpp1382 bool isRegister(const AsmToken &Token, const AsmToken &NextToken) const;
1623 bool isOperandModifier(const AsmToken &Token, const AsmToken &NextToken) const;
1624 bool isRegOrOperandModifier(const AsmToken &Token, const AsmToken &NextToken) const;
1625 bool isNamedOperandModifier(const AsmToken &Token, const AsmToken &NextToken) const;
1626 bool isOpcodeModifierWithVal(const AsmToken &Token, const AsmToken &NextToken) const;
2769 const AsmToken &NextToken) const { in isRegister()
2794 if (NextToken.is(AsmToken::LBrac)) in isRegister()
3242 AMDGPUAsmParser::isNamedOperandModifier(const AsmToken &Token, const AsmToken &NextToken) const { in isNamedOperandModifier()
3243 if (Token.is(AsmToken::Identifier) && NextToken.is(AsmToken::LParen)) { in isNamedOperandModifier()
3251 AMDGPUAsmParser::isOpcodeModifierWithVal(const AsmToken &Token, const AsmToken &NextToken) const { in isOpcodeModifierWithVal()
[all …]
/freebsd/contrib/llvm-project/clang/lib/Sema/
H A DSemaConcept.cpp93 Token NextToken, bool *PossibleNonPrimary, in CheckConstraintExpression() argument
101 return CheckConstraintExpression(BO.getLHS(), NextToken, in CheckConstraintExpression()
103 CheckConstraintExpression(BO.getRHS(), NextToken, in CheckConstraintExpression()
106 return CheckConstraintExpression(C->getSubExpr(), NextToken, in CheckConstraintExpression()
126 (NextToken.is(tok::l_paren) && in CheckConstraintExpression()
138 getBinOpPrecedence(NextToken.getKind(), in CheckConstraintExpression()
H A DSemaDecl.cpp794 static bool isResultTypeOrTemplate(LookupResult &R, const Token &NextToken) { in isResultTypeOrTemplate() argument
796 NextToken.is(tok::less); in isResultTypeOrTemplate()
861 const Token &NextToken, in ClassifyName() argument
866 assert(NextToken.isNot(tok::coloncolon) && in ClassifyName()
896 if (SS.isEmpty() && CurMethod && !isResultTypeOrTemplate(Result, NextToken)) { in ClassifyName()
916 if (SS.isEmpty() && NextToken.is(tok::l_paren)) { in ClassifyName()
942 if (getLangOpts().CPlusPlus20 && SS.isEmpty() && NextToken.is(tok::less)) { in ClassifyName()
972 if (getLangOpts().CPlusPlus && NextToken.is(tok::less) && in ClassifyName()
1054 if (getLangOpts().CPlusPlus && NextToken.is(tok::less) && in ClassifyName()
1079 if (getLangOpts().CPlusPlus && NextToken.is(tok::less) && in ClassifyName()
[all …]
/freebsd/contrib/llvm-project/clang/include/clang/Parse/
H A DRAIIObjectsForParser.h485 } else if (P.Tok.is(tok::semi) && P.NextToken().is(Close)) { in consumeClose()
H A DParser.h872 const Token &NextToken() { in NextToken() function
933 NextToken().is(tok::coloncolon)) || in MightBeCXXScopeToken()
2813 if (NextToken().isNot(tok::l_square)) in CheckProhibitedCXX11Attribute()
2822 (Tok.isNot(tok::l_square) || NextToken().isNot(tok::l_square)) && in CheckMisplacedCXX11Attribute()

12