Home
last modified time | relevance | path

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

1234

/external/llvm-project/clang-tools-extra/clang-tidy/bugprone/
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()
64 return T.isOneOf(tok::plus, tok::minus, tok::star, tok::slash, tok::percent, in isWarnOp()
70 return T.isOneOf(tok::kw_bool, tok::kw_char, tok::kw_short, tok::kw_int, in isVarDeclKeyword()
87 if (!Tok->isOneOf(tok::identifier, tok::raw_identifier, tok::coloncolon)) in possibleVarDecl()
92 Tok->isOneOf(tok::identifier, tok::raw_identifier, tok::coloncolon, in possibleVarDecl()
99 Tok->isOneOf(tok::equal, tok::semi, tok::l_square, tok::l_paren) || in possibleVarDecl()
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()
[all …]
DMacroRepeatedSideEffectsCheck.cpp54 return T.isOneOf(tok::kw_if, tok::kw_else, tok::kw_switch, in MacroExpands()
99 if (FoundBuiltin && T.isOneOf(tok::question, tok::ampamp, tok::pipepipe)) in countArgumentExpansions()
169 if (ResultArgToks->isOneOf(tok::plusplus, tok::minusminus)) in hasSideEffects()
/external/clang/lib/Format/
DTokenAnnotator.cpp91 if (CurrentToken->isOneOf(tok::r_paren, tok::r_square, tok::r_brace) || in parseAngle()
92 (CurrentToken->isOneOf(tok::colon, tok::question) && InExprContext)) in parseAngle()
100 if (CurrentToken->Previous->isOneOf(tok::pipepipe, tok::ampamp) && in parseAngle()
142 (Left->Previous->isOneOf(tok::kw_static_assert, tok::kw_decltype, in parseParens()
180 Left->Previous && Left->Previous->isOneOf(tok::kw_for, tok::kw_catch); in parseParens()
190 bool ProbablyFunctionType = CurrentToken->isOneOf(tok::star, tok::amp); in parseParens()
206 Prev->isOneOf(tok::star, tok::amp, tok::ampamp) && in parseParens()
215 CurrentToken->Previous->Previous->isOneOf(tok::l_paren, in parseParens()
237 Tok->isOneOf(tok::star, tok::amp, tok::ampamp)) in parseParens()
267 if (CurrentToken->isOneOf(tok::r_square, tok::r_brace)) in parseParens()
[all …]
DContinuationIndenter.cpp111 Previous.Previous->isOneOf(tok::l_brace, tok::l_paren, tok::comma)) in canBreak()
165 !Current.isOneOf(tok::r_paren, tok::r_brace)) in mustBreak()
198 !Previous.isOneOf(tok::kw_return, tok::lessless, tok::at) && in mustBreak()
199 !Previous.isOneOf(TT_InlineASMColon, TT_ConditionalExpr) && in mustBreak()
265 Previous.is(tok::l_brace) && !Current.isOneOf(tok::r_brace, tok::comment)) in mustBreak()
356 Previous.isOneOf(tok::l_paren, TT_TemplateOpener, tok::l_square) && in addTokenOnCurrentLine()
359 !Previous.Previous->isOneOf(tok::kw_for, tok::kw_while, in addTokenOnCurrentLine()
399 Previous.Previous->isOneOf(tok::kw_if, tok::kw_for)) { in addTokenOnCurrentLine()
404 } else if (!Current.isOneOf(tok::comment, tok::caret) && in addTokenOnCurrentLine()
409 } else if ((Previous.isOneOf(TT_BinaryOperator, TT_ConditionalExpr, in addTokenOnCurrentLine()
[all …]
DUnwrappedLineParser.cpp350 ProbablyBracedList = NextTok->isOneOf(tok::comma, tok::r_square); in calculateBraceTypes()
354 bool NextIsObjCMethod = NextTok->isOneOf(tok::plus, tok::minus) && in calculateBraceTypes()
367 NextTok->isOneOf(Keywords.kw_of, Keywords.kw_in)) || in calculateBraceTypes()
368 NextTok->isOneOf(tok::comma, tok::period, tok::colon, in calculateBraceTypes()
414 assert(FormatTok->isOneOf(tok::l_brace, TT_MacroBlockBegin) && in parseBlock()
671 !FormatTok->isOneOf(Keywords.kw_in, Keywords.kw_of, Keywords.kw_as, in mustBeJSIdent()
690 return FormatTok->isOneOf( in isJSDeclOrStmt()
738 Previous->isOneOf(tok::r_square, tok::r_paren, in readTokenWithJavaScriptASI()
903 if (FormatTok->isOneOf(Keywords.kw_signals, Keywords.kw_qsignals, in parseStructuralElement()
944 if (FormatTok->isOneOf(Keywords.kw_NS_ENUM, Keywords.kw_NS_OPTIONS, in parseStructuralElement()
[all …]
DFormatToken.h291 template <typename A, typename B> bool isOneOf(A K1, B K2) const { in isOneOf() function
295 bool isOneOf(A K1, B K2, Ts... Ks) const { in isOneOf() function
296 return is(K1) || isOneOf(K2, Ks...); in isOneOf()
321 return isOneOf(tok::kw_public, tok::kw_protected, tok::kw_private) &&
337 return isOneOf(tok::l_paren, tok::l_brace, tok::l_square, in opensScope()
342 return isOneOf(tok::r_paren, tok::r_brace, tok::r_square, in closesScope()
348 return isOneOf(tok::arrow, tok::period, tok::arrowstar) && in isMemberAccess()
349 !isOneOf(TT_DesignatedInitializerPeriod, TT_TrailingReturnArrow, in isMemberAccess()
DUnwrappedLineFormatter.cpp93 (RootToken.isOneOf(Keywords.kw_signals, Keywords.kw_qsignals) && in getIndentOffset()
231 if (TheLine->First->isOneOf(tok::kw_for, tok::kw_while)) { in tryFitMultipleLinesInOne()
236 if (TheLine->First->isOneOf(tok::kw_case, tok::kw_default)) { in tryFitMultipleLinesInOne()
278 if (I[1]->First->isOneOf(tok::semi, tok::kw_if, tok::kw_for, tok::kw_while, in tryMergeSimpleControlStatement()
293 I[1]->First->isOneOf(tok::kw_case, tok::kw_default)) in tryMergeShortCaseLabels()
304 if (Line->First->isOneOf(tok::kw_case, tok::kw_default, tok::r_brace)) in tryMergeShortCaseLabels()
306 if (Line->First->isOneOf(tok::kw_if, tok::kw_for, tok::kw_switch, in tryMergeShortCaseLabels()
327 Line.First->isOneOf(tok::at, tok::minus, tok::plus)) in tryMergeSimpleBlock()
332 if (Line.First->isOneOf(tok::kw_else, tok::kw_case) || in tryMergeSimpleBlock()
335 if (Line.First->isOneOf(tok::kw_if, tok::kw_while, tok::kw_do, tok::kw_try, in tryMergeSimpleBlock()
[all …]
DFormatTokenLexer.cpp144 return Tok->isOneOf(tok::period, tok::l_paren, tok::comma, tok::l_brace, in precedesOperand()
147 Tok->isOneOf(tok::kw_return, tok::kw_do, tok::kw_case, tok::kw_throw, in precedesOperand()
161 if (Prev->isOneOf(tok::plusplus, tok::minusminus)) in canPrecedeRegexLiteral()
178 if (!RegexToken->isOneOf(tok::slash, tok::slashequal)) in tryParseJSRegexLiteral()
490 FormatTok->isOneOf(tok::kw_struct, tok::kw_union, tok::kw_delete, in getNextToken()
495 FormatTok->isOneOf(tok::kw_struct, tok::kw_union, in getNextToken()
/external/llvm-project/clang/lib/Format/
DTokenAnnotator.cpp62 return Tok.isOneOf(tok::kw_if, tok::kw_for, tok::kw_while, tok::kw_switch, in isKeywordWithCondition()
133 Left->Previous->isOneOf(TT_SelectorName, TT_DictLiteral))) in parseAngle()
145 if (CurrentToken->isOneOf(tok::r_paren, tok::r_square, tok::r_brace) || in parseAngle()
146 (CurrentToken->isOneOf(tok::colon, tok::question) && InExprContext && in parseAngle()
156 if (CurrentToken->Previous->isOneOf(tok::pipepipe, tok::ampamp) && in parseAngle()
165 (CurrentToken->isOneOf(tok::l_brace, tok::less) && in parseAngle()
234 (Left->Previous->isOneOf(tok::kw_static_assert, tok::kw_while, in parseParens()
268 Left->Previous && Left->Previous->isOneOf(tok::kw_for, tok::kw_catch); in parseParens()
277 } else if (PrevNonComment->isOneOf(TT_TypenameMacro, tok::kw_decltype, in parseParens()
282 if (PrevNonComment->isOneOf(tok::kw_decltype, tok::kw_typeof)) in parseParens()
[all …]
DContinuationIndenter.cpp97 End->Next->MatchingParen->isOneOf( in getLengthToMatchingParen()
289 Previous.Previous->isOneOf(tok::l_brace, tok::l_paren, tok::comma)) in canBreak()
319 if (!Current.isOneOf(TT_BinaryOperator, tok::comma) && in canBreak()
368 !Current.isOneOf(tok::r_paren, tok::r_brace)) in mustBreak()
440 !Previous.isOneOf(tok::kw_return, tok::lessless, tok::at, in mustBreak()
442 !Previous.isOneOf(TT_InlineASMColon, TT_ConditionalExpr) && in mustBreak()
507 Previous.is(tok::l_brace) && !Current.isOneOf(tok::r_brace, tok::comment)) in mustBreak()
631 (Previous.isOneOf(tok::l_paren, TT_TemplateOpener, tok::l_square) || in addTokenOnCurrentLine()
635 (!Previous.Previous || !Previous.Previous->isOneOf( in addTokenOnCurrentLine()
682 (P->isOneOf(TT_BinaryOperator, tok::comma) || in addTokenOnCurrentLine()
[all …]
DUnwrappedLineFormatter.cpp103 (RootToken.isOneOf(Keywords.kw_signals, Keywords.kw_qsignals) && in getIndentOffset()
246 if (Tok && Tok->isOneOf(tok::kw_class, tok::kw_struct, tok::kw_union, in tryFitMultipleLinesInOne()
304 TheLine->First->isOneOf(tok::kw_if, tok::kw_while, tok::kw_for)) { in tryFitMultipleLinesInOne()
311 (TheLine->First->isOneOf(tok::kw_if, tok::kw_while, tok::kw_for, in tryFitMultipleLinesInOne()
315 TheLine->First->Next->isOneOf(tok::kw_else, tok::kw_catch))) && in tryFitMultipleLinesInOne()
326 TheLine->First->isOneOf(tok::kw_if, tok::kw_while, in tryFitMultipleLinesInOne()
333 TheLine->First->isOneOf(tok::kw_else, tok::kw_catch) && in tryFitMultipleLinesInOne()
356 I[-1]->First->isOneOf(tok::kw_case, tok::kw_default)) in tryFitMultipleLinesInOne()
395 if (TheLine->First->isOneOf(tok::kw_for, tok::kw_while, tok::kw_do)) { in tryFitMultipleLinesInOne()
400 if (TheLine->First->isOneOf(tok::kw_case, tok::kw_default)) { in tryFitMultipleLinesInOne()
[all …]
DUnwrappedLineParser.cpp465 if (PrevTok->isOneOf(tok::colon, tok::less)) in calculateBraceTypes()
490 ProbablyBracedList = NextTok->isOneOf(tok::comma, tok::r_square); in calculateBraceTypes()
494 bool NextIsObjCMethod = NextTok->isOneOf(tok::plus, tok::minus) && in calculateBraceTypes()
507 NextTok->isOneOf(Keywords.kw_of, Keywords.kw_in, in calculateBraceTypes()
510 NextTok->isOneOf(tok::comma, tok::period, tok::colon, in calculateBraceTypes()
514 !PrevTok->isOneOf(tok::semi, tok::r_brace, tok::l_brace)) || in calculateBraceTypes()
584 assert(FormatTok->isOneOf(tok::l_brace, TT_MacroBlockBegin) && in parseBlock()
689 if (InitialToken.isOneOf(tok::kw_namespace, TT_NamespaceMacro)) in ShouldBreakBeforeBrace()
876 if (!Line.Tokens.front().Tok->isOneOf(tok::comment, tok::hash)) { in parsePPDefine()
945 !FormatTok->isOneOf( in mustBeJSIdent()
[all …]
DFormatToken.h455 template <typename A, typename B> bool isOneOf(A K1, B K2) const { in isOneOf() function
459 bool isOneOf(A K1, B K2, Ts... Ks) const { in isOneOf() function
460 return is(K1) || isOneOf(K2, Ks...); in isOneOf()
502 return isOneOf(tok::kw_public, tok::kw_protected, tok::kw_private) &&
507 return isOneOf(tok::kw_const, tok::kw_restrict, tok::kw_volatile, in canBePointerOrReferenceQualifier()
531 return isOneOf(tok::l_paren, tok::l_brace, tok::l_square, in opensScope()
541 return isOneOf(tok::r_paren, tok::r_brace, tok::r_square, in closesScope()
547 return isOneOf(tok::arrow, tok::period, tok::arrowstar) && in isMemberAccess()
548 !isOneOf(TT_DesignatedInitializerPeriod, TT_TrailingReturnArrow, in isMemberAccess()
670 } while (T && T->isOneOf(tok::kw_const, tok::kw_volatile, tok::amp, in isCppStructuredBinding()
[all …]
DSortJavaScriptImports.cpp333 if (!Current || !Current->isOneOf(Keywords.kw_import, tok::kw_export)) in parseModuleReference()
412 if (!Current->isOneOf(tok::identifier, tok::kw_default)) in parseNamedBindings()
424 if (!Current->isOneOf(tok::identifier, tok::kw_default)) in parseNamedBindings()
432 if (!Current->isOneOf(tok::r_brace, tok::comma)) in parseNamedBindings()
/external/apache-http/src/org/apache/http/impl/
DDefaultHttpRequestFactory.java78 private static boolean isOneOf(final String[] methods, final String method) { in isOneOf() method in DefaultHttpRequestFactory
93 if (isOneOf(RFC2616_COMMON_METHODS, method)) { in newHttpRequest()
95 } else if (isOneOf(RFC2616_ENTITY_ENC_METHODS, method)) { in newHttpRequest()
97 } else if (isOneOf(RFC2616_SPECIAL_METHODS, method)) { in newHttpRequest()
106 if (isOneOf(RFC2616_COMMON_METHODS, method)) { in newHttpRequest()
108 } else if (isOneOf(RFC2616_ENTITY_ENC_METHODS, method)) { in newHttpRequest()
110 } else if (isOneOf(RFC2616_SPECIAL_METHODS, method)) { in newHttpRequest()
/external/clang/lib/Parse/
DParseTentative.cpp183 while (Tok.isOneOf(tok::l_square, tok::kw___attribute, tok::kw___declspec, in TryConsumeDeclarationSpecifier()
199 if (Tok.isOneOf(tok::identifier, tok::coloncolon, tok::kw_decltype, in TryConsumeDeclarationSpecifier()
293 if (Tok.isOneOf(tok::kw_asm, tok::kw___attribute)) in TryParseInitDeclaratorList()
434 if (Tok.isOneOf(tok::equal, tok::kw_asm, tok::kw___attribute) || in isCXXConditionDeclarationOrInitStatement()
528 (Tok.isOneOf(tok::greater, tok::comma) || in isCXXTypeId()
695 if (Tok.isOneOf(tok::coloncolon, tok::identifier)) in TryParsePtrOperatorSeq()
699 if (Tok.isOneOf(tok::star, tok::amp, tok::caret, tok::ampamp) || in TryParsePtrOperatorSeq()
703 while (Tok.isOneOf(tok::kw_const, tok::kw_volatile, tok::kw_restrict, in TryParsePtrOperatorSeq()
873 if ((Tok.isOneOf(tok::identifier, tok::kw_operator) || in TryParseDeclarator()
903 if (Tok.isOneOf(tok::kw___attribute, tok::kw___declspec, tok::kw___cdecl, in TryParseDeclarator()
[all …]
DParseTemplate.cpp65 assert(Tok.isOneOf(tok::kw_export, tok::kw_template) && in ParseTemplateDeclarationOrSpecialization()
147 } while (Tok.isOneOf(tok::kw_export, tok::kw_template)); in ParseTemplateDeclarationOrSpecialization()
386 } else if (Tok.isOneOf(tok::greater, tok::greatergreater)) { in ParseTemplateParameterList()
503 assert(Tok.isOneOf(tok::kw_class, tok::kw_typename) && in ParseTypeParameter()
525 } else if (Tok.isOneOf(tok::equal, tok::comma, tok::greater, in ParseTypeParameter()
586 bool Replace = Tok.isOneOf(tok::kw_typename, tok::kw_struct); in ParseTemplateTemplateParameter()
596 } else if (Next.isOneOf(tok::identifier, tok::comma, tok::greater, in ParseTemplateTemplateParameter()
622 } else if (Tok.isOneOf(tok::equal, tok::comma, tok::greater, in ParseTemplateTemplateParameter()
819 (Next.isOneOf(tok::greater, tok::greatergreater, in ParseGreaterThanInTemplateList()
1098 return Tok.isOneOf(tok::comma, tok::greater, tok::greatergreater); in isEndOfTemplateArgument()
[all …]
/external/llvm-project/clang/lib/Parse/
DParseTentative.cpp287 if (Tok.isOneOf(tok::kw_asm, tok::kw___attribute)) in TryParseInitDeclaratorList()
505 if (Tok.isOneOf(tok::equal, tok::kw_asm, tok::kw___attribute) || in isCXXConditionDeclarationOrInitStatement()
608 (Tok.isOneOf(tok::greater, tok::comma) || in isCXXTypeId()
610 (Tok.isOneOf(tok::greatergreater, in isCXXTypeId()
613 NextToken().isOneOf(tok::greater, tok::greatergreater, in isCXXTypeId()
804 while (Tok.isOneOf(tok::l_square, tok::kw___attribute, tok::kw___declspec, in TrySkipAttributes()
834 if (Tok.isOneOf(tok::star, tok::amp, tok::caret, tok::ampamp) || in TryParsePtrOperatorSeq()
843 while (Tok.isOneOf(tok::kw_const, tok::kw_volatile, tok::kw_restrict, in TryParsePtrOperatorSeq()
1015 if ((Tok.isOneOf(tok::identifier, tok::kw_operator) || in TryParseDeclarator()
1051 if (Tok.isOneOf(tok::kw___attribute, tok::kw___declspec, tok::kw___cdecl, in TryParseDeclarator()
[all …]
DParseTemplate.cpp77 assert(Tok.isOneOf(tok::kw_export, tok::kw_template) && in ParseTemplateDeclarationOrSpecialization()
160 } while (Tok.isOneOf(tok::kw_export, tok::kw_template)); in ParseTemplateDeclarationOrSpecialization()
498 } else if (Tok.isOneOf(tok::greater, tok::greatergreater)) { in ParseTemplateParameterList()
557 .isOneOf(tok::kw_auto, tok::kw_decltype)) in isStartOfTemplateTypeParameter()
760 assert((Tok.isOneOf(tok::kw_class, tok::kw_typename) || in ParseTypeParameter()
803 } else if (Tok.isOneOf(tok::equal, tok::comma, tok::greater, in ParseTypeParameter()
876 bool Replace = Tok.isOneOf(tok::kw_typename, tok::kw_struct); in ParseTemplateTemplateParameter()
886 } else if (Next.isOneOf(tok::identifier, tok::comma, tok::greater, in ParseTemplateTemplateParameter()
912 } else if (Tok.isOneOf(tok::equal, tok::comma, tok::greater, in ParseTemplateTemplateParameter()
1112 (Next.isOneOf(tok::greater, tok::greatergreater, in ParseGreaterThanInTemplateList()
[all …]
/external/llvm-project/clang/include/clang/Lex/
DToken.h99 bool isOneOf(tok::TokenKind K1, tok::TokenKind K2) const { in isOneOf() function
103 bool isOneOf(tok::TokenKind K1, tok::TokenKind K2, Ts... Ks) const { in isOneOf() function
104 return is(K1) || isOneOf(K2, Ks...); in isOneOf()
/external/clang/include/clang/Lex/
DToken.h96 bool isOneOf(tok::TokenKind K1, tok::TokenKind K2) const { in isOneOf() function
100 bool isOneOf(tok::TokenKind K1, tok::TokenKind K2, Ts... Ks) const { in isOneOf() function
101 return is(K1) || isOneOf(K2, Ks...); in isOneOf()
/external/llvm-project/clang-tools-extra/clang-tidy/utils/
DLexerUtils.h54 if (T.isOneOf(TK, TKs...)) in findPreviousAnyTokenKind()
73 if (PotentialMatch.isOneOf(TK, TKs...)) in findNextAnyTokenKind()
/external/clang/lib/Lex/
DTokenConcatenation.cpp181 if (Tok.isOneOf(tok::equal, tok::equalequal)) in AvoidConcat()
187 assert(Tok.isOneOf(tok::annot_module_include, tok::annot_module_begin, in AvoidConcat()
242 Tok.isOneOf(tok::wide_string_literal, tok::utf8_string_literal, in AvoidConcat()
/external/apache-http/src/org/apache/http/message/
DBasicHeaderValueParser.java309 private static boolean isOneOf(final char ch, final char[] chs) { in isOneOf() method in BasicHeaderValueParser
344 if (isOneOf(ch, delimiters)) { in parseNameValuePair()
375 if (!qouted && !escaped && isOneOf(ch, delimiters)) { in parseNameValuePair()
/external/llvm-project/clang/lib/Lex/
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()

1234