Home
last modified time | relevance | path

Searched refs:isOneOf (Results 1 – 25 of 51) sorted by relevance

123

/llvm-project-15.0.7/clang-tools-extra/clang-tidy/bugprone/
H A DMacroParenthesesCheck.cpp44 return T.isOneOf(tok::l_paren, tok::l_brace, tok::l_square, tok::comma, in isSurroundedLeft()
50 return T.isOneOf(tok::r_paren, tok::r_brace, tok::r_square, tok::comma, in isSurroundedRight()
57 return T.isOneOf(tok::kw_if, tok::kw_case, tok::kw_const, tok::kw_struct); in isKeyword()
70 return T.isOneOf(tok::kw_bool, tok::kw_char, tok::kw_short, tok::kw_int, in isVarDeclKeyword()
121 if (Count == 0 && Tok.isOneOf(tok::comma, tok::semi)) in replacementList()
123 if (Tok.isOneOf(tok::l_paren, tok::l_brace, tok::l_square)) { in replacementList()
125 } else if (Tok.isOneOf(tok::r_paren, tok::r_brace, tok::r_square)) { in replacementList()
135 !Tok.isOneOf(tok::plus, tok::minus)) in replacementList()
192 if (!Tok.isOneOf(tok::identifier, tok::raw_identifier)) { in argument()
237 if (Prev.isOneOf(tok::equal, tok::kw_return) && Next.is(tok::semi)) in argument()
[all …]
H A DMacroRepeatedSideEffectsCheck.cpp53 return T.isOneOf(tok::kw_if, tok::kw_else, tok::kw_switch, tok::kw_case, in MacroExpands()
97 if (FoundBuiltin && T.isOneOf(tok::question, tok::ampamp, tok::pipepipe)) in countArgumentExpansions()
167 if (ResultArgToks->isOneOf(tok::plusplus, tok::minusminus)) in hasSideEffects()
/llvm-project-15.0.7/clang/lib/Format/
H A DTokenAnnotator.cpp1505 !CurrentToken->isOneOf( in resetTokenMetadata()
1792 Current.Previous->isOneOf( in determineTokenType()
2251 if (PrevToken->isOneOf( in determineUnaryOperatorByUsage()
2483 Current->isOneOf(TT_RequiresClause, in parse()
3275 if (Left.isOneOf(tok::hashhash, tok::hash)) in spaceRequiredBetween()
3315 if (Right.isOneOf(tok::semi, tok::comma)) in spaceRequiredBetween()
3325 if (Left.isOneOf(tok::exclaim, tok::tilde)) in spaceRequiredBetween()
3548 if (Left.isOneOf(TT_RequiresClause, in spaceRequiredBetween()
3670 Right.isOneOf(tok::amp, tok::ampamp) && in spaceRequiredBetween()
4127 Right.isOneOf(tok::amp, tok::ampamp)) { in spaceRequiredBefore()
[all …]
H A DContinuationIndenter.cpp99 End->Next->MatchingParen->isOneOf( in getLengthToMatchingParen()
326 if (!Current.isOneOf(TT_BinaryOperator, tok::comma) && in canBreak()
379 !Current.isOneOf(tok::r_paren, tok::r_brace)) { in mustBreak()
571 !Current.isOneOf(tok::r_brace, tok::comment)) { in mustBreak()
760 (P->isOneOf(TT_BinaryOperator, tok::comma) || in addTokenOnCurrentLine()
1012 !PreviousNonComment->isOneOf( in addTokenOnNewLine()
1101 if ((Current.isOneOf(tok::r_brace, tok::r_square) || in getNewLineColumn()
1201 PreviousNonComment->isOneOf( in getNewLineColumn()
1273 !Current.isOneOf(tok::colon, tok::comment)) { in getNewLineColumn()
1316 if (Current.isOneOf(tok::comma, TT_BinaryOperator)) in moveStateToNextToken()
[all …]
H A DUnwrappedLineFormatter.cpp30 return Tok.isOneOf(TT_ClassLBrace, TT_EnumLBrace, TT_RecordLBrace, in isRecordLBrace()
121 RootToken.Next->isOneOf(Keywords.kw_slots, in getIndentOffset()
432 if (TheLine->First->isOneOf(tok::kw_else, tok::kw_catch) && in tryFitMultipleLinesInOne()
509 !TheLine->First->isOneOf(tok::kw_class, tok::kw_enum, in tryFitMultipleLinesInOne()
563 if (TheLine->First->isOneOf(tok::kw_case, tok::kw_default)) { in tryFitMultipleLinesInOne()
635 I[1]->First->isOneOf(tok::kw_case, tok::kw_default)) { in tryMergeShortCaseLabels()
696 Line.First->isOneOf(tok::at, tok::minus, tok::plus)) { in tryMergeSimpleBlock()
725 Line.First->isOneOf(tok::kw_if, tok::kw_else) && in tryMergeSimpleBlock()
731 Line.First->isOneOf(tok::kw_if, tok::kw_else) && in tryMergeSimpleBlock()
738 Line.First->isOneOf(tok::kw_while, tok::kw_do, tok::kw_for, in tryMergeSimpleBlock()
[all …]
H A DUnwrappedLineParser.cpp633 if (PrevTok->isOneOf(tok::colon, tok::less)) { in calculateBraceTypes()
1288 !FormatTok->isOneOf( in mustBeJSIdent()
1301 FormatTok->isOneOf(tok::kw_true, tok::kw_false) || in mustBeJSIdentOrValue()
1309 return FormatTok->isOneOf( in isJSDeclOrStmt()
2868 if (FormatTok->isOneOf(tok::semi, tok::comma)) in parseNew()
3479 if (FormatTok->isOneOf(tok::kw_class, tok::kw_struct)) in parseEnum()
3618 if (Tok->isOneOf(tok::l_brace, tok::semi)) { in parseJavaEnumBody()
3682 FormatTok->isOneOf(tok::period, tok::comma))) { in parseRecord()
3721 if (FormatTok->isOneOf(tok::colon, tok::less)) { in parseRecord()
3808 if (FormatTok->isOneOf(tok::semi, tok::l_brace) || in parseObjCProtocolList()
[all …]
H A DQualifierAlignmentFixer.cpp233 !EndTemplate->Next->isOneOf(tok::equal, tok::l_paren)) { in analyzeRight()
282 while (Next && Next->isOneOf(tok::identifier, tok::coloncolon)) in analyzeRight()
295 if (Next && Next->isOneOf(tok::star, tok::amp, tok::ampamp) && in analyzeRight()
296 !Tok->Next->isOneOf(Keywords.kw_override, Keywords.kw_final)) { in analyzeRight()
334 if (Tok->Next->Next && Tok->Next->Next->isOneOf(tok::identifier, tok::star, in analyzeLeft()
358 Tok->Previous->isOneOf(tok::star, tok::ampamp, tok::amp)) { in analyzeLeft()
363 while (Next && Next->isOneOf(tok::identifier, tok::coloncolon)) in analyzeLeft()
393 Next->Next->isOneOf(tok::amp, tok::ampamp, tok::star)) { in analyzeLeft()
H A DDefinitionBlockSeparator.cpp39 if (Tok->isOneOf(tok::l_brace, tok::l_paren, tok::l_square)) in separateBlocks()
41 if (Tok->isOneOf(tok::r_brace, tok::r_paren, tok::r_square)) in separateBlocks()
55 if ((CurrentToken->isOneOf(tok::kw_class, tok::kw_struct, in separateBlocks()
109 Line->First->Next->isOneOf(tok::pp_if, tok::pp_ifdef, tok::pp_else, in separateBlocks()
H A DFormatToken.h521 template <typename A, typename B> bool isOneOf(A K1, B K2) const { in isOneOf() function
525 bool isOneOf(A K1, B K2, Ts... Ks) const { in isOneOf() function
526 return is(K1) || isOneOf(K2, Ks...); in isOneOf()
573 return isOneOf(tok::kw_const, tok::kw_restrict, tok::kw_volatile, in canBePointerOrReferenceQualifier()
599 return isOneOf(tok::l_paren, tok::l_brace, tok::l_square, in opensScope()
609 return isOneOf(tok::r_paren, tok::r_brace, tok::r_square, in closesScope()
615 return isOneOf(tok::arrow, tok::period, tok::arrowstar) && in isMemberAccess()
732 } while (T && T->isOneOf(tok::kw_const, tok::kw_volatile, tok::amp, in isCppStructuredBinding()
1518 !Tok.isOneOf(kw_verilogHash, kw_verilogHashHash); in isWordLike()
1698 return Tok.isOneOf(kw_begin_keywords, kw_celldefine, in isVerilogPPDirective()
[all …]
H A DFormatTokenLexer.cpp366 if (Next->isOneOf(tok::l_brace, tok::colon, tok::hash, tok::comment)) in tryTransformTryUsageForC()
436 return Tok->isOneOf(tok::period, tok::l_paren, tok::comma, tok::l_brace, in precedesOperand()
439 Tok->isOneOf(tok::kw_return, tok::kw_do, tok::kw_case, tok::kw_throw, in precedesOperand()
455 if (Prev->isOneOf(tok::plusplus, tok::minusminus, tok::exclaim)) in canPrecedeRegexLiteral()
472 if (!RegexToken->isOneOf(tok::slash, tok::slashequal)) in tryParseJSRegexLiteral()
1012 if (FormatTok->isOneOf(tok::hash, tok::hashhash)) {
1041 FormatTok->isOneOf(tok::kw_struct, tok::kw_union, tok::kw_delete,
1046 FormatTok->isOneOf(tok::kw_struct, tok::kw_union,
H A DFormatToken.cpp74 return isSimpleTypeSpecifier() || Tok.isOneOf(tok::kw_auto, tok::identifier); in isTypeOrIdentifier()
107 if (!LBrace || !LBrace->isOneOf(tok::l_brace, TT_ArrayInitializerLSquare) || in formatAfterToken()
176 !Token->isOneOf(tok::l_brace, TT_ArrayInitializerLSquare)) { in precomputeFormattingInfos()
H A DSortJavaScriptImports.cpp446 if (!Current || !Current->isOneOf(Keywords.kw_import, tok::kw_export)) in parseModuleReference()
539 if (!Current->isOneOf(tok::identifier, tok::kw_default)) in parseNamedBindings()
551 if (!Current->isOneOf(tok::identifier, tok::kw_default)) in parseNamedBindings()
559 if (!Current->isOneOf(tok::r_brace, tok::comma)) in parseNamedBindings()
H A DNamespaceEndCommentsFixer.cpp64 NamespaceTok->isOneOf(tok::kw_namespace, TT_NamespaceMacro) && in computeName()
73 while (Tok && !Tok->isOneOf(tok::r_paren, tok::comma)) { in computeName()
88 while (Tok && !Tok->isOneOf(tok::l_brace, tok::coloncolon, tok::l_paren)) { in computeName()
/llvm-project-15.0.7/clang/include/clang/Lex/
H A DDependencyDirectivesScanner.h49 bool isOneOf(tok::TokenKind K1, tok::TokenKind K2) const { in isOneOf() function
52 template <typename... Ts> bool isOneOf(tok::TokenKind K1, Ts... Ks) const { in isOneOf() function
53 return is(K1) || isOneOf(Ks...); in isOneOf()
H A DToken.h99 bool isOneOf(tok::TokenKind K1, tok::TokenKind K2) const { in isOneOf() function
102 template <typename... Ts> bool isOneOf(tok::TokenKind K1, Ts... Ks) const { in isOneOf() function
103 return is(K1) || isOneOf(Ks...); in isOneOf()
/llvm-project-15.0.7/clang/lib/Parse/
H A DParseTentative.cpp287 if (Tok.isOneOf(tok::kw_asm, tok::kw___attribute)) in TryParseInitDeclaratorList()
507 if (Tok.isOneOf(tok::equal, tok::kw_asm, tok::kw___attribute) || in isCXXConditionDeclarationOrInitStatement()
610 (Tok.isOneOf(tok::greater, tok::comma) || in isCXXTypeId()
612 (Tok.isOneOf(tok::greatergreater, in isCXXTypeId()
615 NextToken().isOneOf(tok::greater, tok::greatergreater, in isCXXTypeId()
836 if (Tok.isOneOf(tok::star, tok::amp, tok::caret, tok::ampamp) || in TryParsePtrOperatorSeq()
845 while (Tok.isOneOf(tok::kw_const, tok::kw_volatile, tok::kw_restrict, in TryParsePtrOperatorSeq()
1017 if ((Tok.isOneOf(tok::identifier, tok::kw_operator) || in TryParseDeclarator()
1334 if (Next.isOneOf(tok::kw_new, // ::new in isCXXDeclarationSpecifier()
2021 while (Tok.isOneOf(tok::kw_const, tok::kw_volatile, tok::kw___unaligned, in TryParseFunctionDeclarator()
[all …]
H A DParseTemplate.cpp78 assert(Tok.isOneOf(tok::kw_export, tok::kw_template) && in ParseTemplateDeclarationOrSpecialization()
161 } while (Tok.isOneOf(tok::kw_export, tok::kw_template)); in ParseTemplateDeclarationOrSpecialization()
521 } else if (Tok.isOneOf(tok::greater, tok::greatergreater)) { in ParseTemplateParameterList()
580 .isOneOf(tok::kw_auto, tok::kw_decltype)) in isStartOfTemplateTypeParameter()
784 assert((Tok.isOneOf(tok::kw_class, tok::kw_typename) || in ParseTypeParameter()
827 } else if (Tok.isOneOf(tok::equal, tok::comma, tok::greater, in ParseTypeParameter()
900 bool Replace = Tok.isOneOf(tok::kw_typename, tok::kw_struct); in ParseTemplateTemplateParameter()
939 } else if (Tok.isOneOf(tok::equal, tok::comma, tok::greater, in ParseTemplateTemplateParameter()
1145 (Next.isOneOf(tok::greater, tok::greatergreater, in ParseGreaterThanInTemplateList()
1260 if (!Tok.isOneOf(tok::greater, tok::greatergreater, in ParseTemplateIdAfterTemplateName()
[all …]
H A DParseCXXInlineMethods.cpp29 assert(Tok.isOneOf(tok::l_brace, tok::colon, tok::kw_try, tok::equal) && in ParseCXXInlineMethodDef()
199 assert(Tok.isOneOf(tok::l_brace, tok::equal) && in ParseCXXNonStaticMemberInitializer()
552 assert(Tok.isOneOf(tok::l_brace, tok::colon, tok::kw_try) in ParseLexedMethodDef()
977 if (Tok.isOneOf(tok::identifier, tok::coloncolon, tok::kw_decltype)) { in ConsumeAndStoreFunctionPrologue()
1033 !PreviousToken.isOneOf(tok::identifier, tok::greater, in ConsumeAndStoreFunctionPrologue()
1042 !Tok.isOneOf(tok::comma, tok::ellipsis, tok::l_brace)) { in ConsumeAndStoreFunctionPrologue()
/llvm-project-15.0.7/clang-tools-extra/clang-tidy/utils/
H A DLexerUtils.h57 if (T.isOneOf(TK, TKs...)) in findPreviousAnyTokenKind()
76 if (PotentialMatch.isOneOf(TK, TKs...)) in findNextAnyTokenKind()
/llvm-project-15.0.7/clang/lib/Lex/
H A DTokenConcatenation.cpp189 if (Tok.isOneOf(tok::equal, tok::equalequal)) in AvoidConcat()
195 assert(Tok.isOneOf(tok::annot_module_include, tok::annot_module_begin, in AvoidConcat()
250 Tok.isOneOf(tok::wide_string_literal, tok::utf8_string_literal, in AvoidConcat()
H A DDependencyDirectivesScanner.cpp837 return !Tok.isOneOf(tok::l_paren, tok::r_paren, tok::l_square, in printDependencyDirectivesAsSource()
840 Tok.isOneOf(tok::hash, tok::numeric_constant, tok::string_literal, in printDependencyDirectivesAsSource()
844 Tok.isOneOf(tok::raw_identifier, tok::hash, tok::string_literal, in printDependencyDirectivesAsSource()
848 Tok.isOneOf(tok::l_paren, tok::string_literal, tok::less)) in printDependencyDirectivesAsSource()
/llvm-project-15.0.7/clang/lib/Analysis/
H A DRetainSummaryManager.cpp27 constexpr static bool isOneOf() { in isOneOf() function
34 constexpr static bool isOneOf() { in isOneOf() function
35 return std::is_same<T, P>::value || isOneOf<T, ToCompare...>(); in isOneOf()
71 if (isOneOf<T, CFConsumedAttr, CFReturnsRetainedAttr, in hasAnyEnabledAttrOf()
77 } else if (isOneOf<T, NSConsumedAttr, NSConsumesSelfAttr, in hasAnyEnabledAttrOf()
84 if (isOneOf<T, NSReturnsRetainedAttr, NSReturnsAutoreleasedAttr, in hasAnyEnabledAttrOf()
89 } else if (isOneOf<T, OSConsumedAttr, OSConsumesThisAttr, in hasAnyEnabledAttrOf()
96 } else if (isOneOf<T, GeneralizedReturnsNotRetainedAttr, in hasAnyEnabledAttrOf()
/llvm-project-15.0.7/clang-tools-extra/clang-tidy/readability/
H A DNamespaceCommentCheck.cpp64 if (T->isOneOf(tok::l_square, tok::l_paren)) { in getNamespaceNameAsWritten()
66 } else if (T->isOneOf(tok::r_square, tok::r_paren)) { in getNamespaceNameAsWritten()
/llvm-project-15.0.7/clang-tools-extra/clang-tidy/modernize/
H A DIntegralLiteralExpressionMatcher.h57 NonTerminal, [](Token Tok) { return Tok.isOneOf(K1, K2, Ks...); }); in nonTerminalChainedExpr()
H A DUseTrailingReturnTypeCheck.cpp159 if (T.isOneOf(tok::amp, tok::ampamp, tok::kw_const, tok::kw_volatile, in findTrailingReturnTypeSourceLocation()
170 return T.isOneOf(tok::kw_const, tok::kw_volatile, tok::kw_restrict); in isCvr()
174 return T.isOneOf(tok::kw_constexpr, tok::kw_inline, tok::kw_extern, in isSpecifier()

123