reference, declarationdefinition
definition → references, declarations, derived classes, virtual overrides
reference to multiple definitions → definitions
unreferenced

References

tools/clang/lib/Format/ContinuationIndenter.cpp
  319   if (!Current.isOneOf(TT_BinaryOperator, tok::comma) &&
  357       !Current.isOneOf(tok::r_paren, tok::r_brace))
  423       !Previous.isOneOf(TT_InlineASMColon, TT_ConditionalExpr) &&
  488       Previous.is(tok::l_brace) && !Current.isOneOf(tok::r_brace, tok::comment))
  660       (P->isOneOf(TT_BinaryOperator, tok::comma) ||
  662       !P->isOneOf(TT_OverloadedOperator, TT_CtorInitializerComma) &&
  689   } else if (!Current.isOneOf(tok::comment, tok::caret) &&
  776        !Current.isOneOf(Keywords.kw_async, Keywords.kw_function)))
  800              PreviousNonComment->isOneOf(TT_ObjCMethodExpr, TT_DictLiteral)) {
  817        PreviousNonComment->isOneOf(tok::comma, tok::semi) &&
  822       PreviousNonComment->isOneOf(TT_TemplateCloser, TT_JavaAnnotation) &&
  883       (PreviousNonComment->isOneOf(tok::l_brace, TT_ArrayInitializerLSquare) ||
  933       Current.isOneOf(Keywords.kw_implements, Keywords.kw_extends))
  945   if ((Current.isOneOf(tok::r_brace, tok::r_square) ||
  982         Current.Next->isOneOf(tok::less, tok::l_brace))))
 1010        NextNonComment->isOneOf(tok::kw_operator, TT_FunctionDeclarationName)))
 1052   if (NextNonComment->isOneOf(TT_StartOfName, TT_PointerOrReference) ||
 1056       PreviousNonComment->isOneOf(TT_ObjCMethodExpr, TT_DictLiteral))
 1070       !Current.isOneOf(tok::colon, tok::comment))
 1075       !PreviousNonComment->isOneOf(tok::r_brace, TT_CtorInitializerComma))
 1087   if (Current.isOneOf(tok::comma, TT_BinaryOperator))
 1155   if (Current.isOneOf(TT_BinaryOperator, TT_ConditionalExpr) && Newline)
 1158   if (Current.isOneOf(TT_LambdaLSquare, TT_LambdaArrow))
 1171       Previous->isOneOf(tok::l_brace, TT_ArrayInitializerLSquare) &&
 1181        Previous->isOneOf(TT_BinaryOperator, TT_ConditionalExpr)) &&
 1182       !Previous->isOneOf(TT_DictLiteral, TT_ObjCMethodExpr)) {
 1234                     Previous->isOneOf(tok::semi, tok::kw_return) ||
 1322   if (Current.isOneOf(tok::l_brace, TT_ArrayInitializerLSquare) ||
 1339                        NextNoComment->isOneOf(TT_DesignatedInitializerPeriod,
 1412       !Current.isOneOf(TT_DictLiteral, TT_ArrayInitializerLSquare) &&
tools/clang/lib/Format/FormatToken.cpp
   86   if (!LBrace || !LBrace->isOneOf(tok::l_brace, TT_ArrayInitializerLSquare) ||
  154       !Token->isOneOf(tok::l_brace, TT_ArrayInitializerLSquare))
tools/clang/lib/Format/FormatToken.h
  326     return is(K1) || isOneOf(K2, Ks...);
  542     if (NamespaceTok && NamespaceTok->isOneOf(tok::kw_inline, tok::kw_export))
  545                    NamespaceTok->isOneOf(tok::kw_namespace, TT_NamespaceMacro)
tools/clang/lib/Format/FormatTokenLexer.cpp
  248   if (!Identifier->isOneOf(tok::r_square, tok::identifier) ||
  365   if (!RegexToken->isOneOf(tok::slash, tok::slashequal))
  487   if (!HashToken->isOneOf(tok::hash, tok::hashhash))
tools/clang/lib/Format/NamespaceEndCommentsFixer.cpp
   33          NamespaceTok->isOneOf(tok::kw_namespace, TT_NamespaceMacro) &&
   42     while (Tok && !Tok->isOneOf(tok::r_paren, tok::comma)) {
tools/clang/lib/Format/SortJavaScriptImports.cpp
  333     if (!Current || !Current->isOneOf(Keywords.kw_import, tok::kw_export))
  412       if (!Current->isOneOf(tok::identifier, tok::kw_default))
  424         if (!Current->isOneOf(tok::identifier, tok::kw_default))
  432       if (!Current->isOneOf(tok::r_brace, tok::comma))
tools/clang/lib/Format/TokenAnnotator.cpp
  120              Left->Previous->isOneOf(TT_SelectorName, TT_DictLiteral)))
  133           (CurrentToken->isOneOf(tok::colon, tok::question) && InExprContext &&
  143       if (CurrentToken->Previous->isOneOf(tok::pipepipe, tok::ampamp) &&
  152               (CurrentToken->isOneOf(tok::l_brace, tok::less) &&
  230           Left->Previous && Left->Previous->isOneOf(tok::kw_for, tok::kw_catch);
  274           CurrentToken->Previous->Previous->isOneOf(tok::l_paren,
  329       if (CurrentToken->isOneOf(tok::r_square, tok::r_brace))
  338       if ((CurrentToken->Previous->isOneOf(tok::kw_const, tok::kw_auto) ||
  342       if (CurrentToken->isOneOf(tok::semi, tok::colon)) {
  473         !CurrentToken->isOneOf(tok::l_brace, tok::r_square) &&
  479          Parent->isOneOf(TT_ObjCForIn, TT_CastRParen) ||
  494                  Parent->isOneOf(tok::l_brace, tok::comma)) {
  497                  Parent && Parent->isOneOf(tok::l_brace, tok::comma)) {
  625       if (CurrentToken->isOneOf(tok::r_paren, tok::r_brace))
  634         } else if (Left->isOneOf(TT_ArraySubscriptLSquare,
  680         if (CurrentToken->isOneOf(tok::r_paren, tok::r_square))
  768              !Line.First->isOneOf(tok::kw_enum, tok::kw_case)) ||
  821                  !Line.First->isOneOf(tok::kw_enum, tok::kw_case)) {
  822         if (Tok->getPreviousNonComment()->isOneOf(tok::r_paren,
  828                  (Tok->Next->isOneOf(tok::r_paren, tok::comma) ||
  849           CurrentToken->isOneOf(tok::kw_constexpr, tok::identifier))
  917              Tok->Previous->isOneOf(TT_SelectorName, TT_DictLiteral))) {
  950         if (CurrentToken->isOneOf(tok::star, tok::amp))
  999       if (Tok->isOneOf(Keywords.kw___has_include,
 1038         CurrentToken->isOneOf(Keywords.kw_mark, Keywords.kw_option)) {
 1114       else if (Tok->isOneOf(Keywords.kw___has_include,
 1154         CurrentToken->isOneOf(Keywords.kw_option, Keywords.kw_package)) {
 1308              !Previous->Previous->isOneOf(tok::comma, tok::semi);
 1310           if (Previous->isOneOf(tok::r_square, tok::r_paren)) {
 1317           if (Previous->isOneOf(TT_BinaryOperator, TT_UnaryOperator) &&
 1326     } else if (Current.isOneOf(tok::kw_return, tok::kw_throw)) {
 1340            Previous && Previous->isOneOf(tok::star, tok::amp);
 1347     } else if (Current.isOneOf(tok::semi, tok::exclaim)) {
 1369             Current.Next->isOneOf(TT_BinaryOperator, Keywords.kw_as)) {
 1390     } else if (Current.isOneOf(tok::kw_auto, tok::kw___auto_type)) {
 1409     } else if (Current.isOneOf(tok::minusminus, tok::plusplus)) {
 1411     } else if (Current.isOneOf(tok::exclaim, tok::tilde)) {
 1478           PreviousNoComment->isOneOf(tok::comma, tok::l_brace))
 1481                Current.Previous->isOneOf(TT_JavaAnnotation,
 1500                !Current.Previous->isOneOf(tok::equal, tok::at) &&
 1517                  Current.Previous->isOneOf(TT_JavaAnnotation,
 1564             PreviousNotConst->isOneOf(tok::identifier, tok::kw_auto)) ||
 1623          Tok.Next->isOneOf(tok::kw_sizeof, tok::kw_alignof)))
 1629         Tok.Previous->isOneOf(TT_PointerOrReference, TT_TemplateCloser) ||
 1651     if (Tok.Next->isOneOf(tok::identifier, tok::kw_this))
 1661         Tok.Next->isUnaryOperator() || Tok.Next->isOneOf(tok::amp, tok::star);
 1663         !Tok.Next->Next->isOneOf(tok::identifier, tok::numeric_constant))
 1706     if (NextToken->isOneOf(tok::comma, tok::semi))
 1722         NextToken->isOneOf(tok::kw_true, tok::kw_false) ||
 1753     if (PrevToken->isOneOf(TT_CastRParen, TT_UnaryOperator))
 1814                         Current->isOneOf(TT_ObjCMethodExpr, TT_DictLiteral))))
 1903           (NextNonComment->isOneOf(TT_DictLiteral, TT_JsTypeColon) ||
 1925           Current->isOneOf(Keywords.kw_in, Keywords.kw_as))
 1929       if (Current->isOneOf(tok::period, tok::arrow))
 2088       if (Next->isOneOf(tok::kw_new, tok::kw_delete)) {
 2145     if (Tok->isOneOf(tok::l_paren, TT_TemplateOpener) && Tok->MatchingParen) {
 2215           if (Parameter->isOneOf(tok::comment, tok::r_brace))
 2303         Current->isOneOf(tok::comment, tok::string_literal)) {
 2323     if (Right.isOneOf(Keywords.kw_extends, Keywords.kw_throws))
 2361   if (Right.isOneOf(TT_StartOfName, TT_FunctionDeclarationName) ||
 2379   if (Left.isOneOf(tok::kw_class, tok::kw_struct))
 2443       Left.Previous->isOneOf(tok::identifier, tok::greater))
 2471   if (Left.isOneOf(tok::plus, tok::comma) && Left.Previous &&
 2523   if (Left.isOneOf(tok::hashhash, tok::hash))
 2534   if (Right.isOneOf(tok::semi, tok::comma))
 2544   if (Left.isOneOf(tok::exclaim, tok::tilde))
 2555   if (Left.is(tok::less) || Right.isOneOf(tok::greater, tok::less)) {
 2583             (!Left.isOneOf(TT_PointerOrReference, tok::l_paren) &&
 2596            (Right.isOneOf(Keywords.kw_override, Keywords.kw_final) &&
 2637       !Left.isOneOf(tok::numeric_constant, TT_DictLiteral))
 2702       Right.isOneOf(tok::amp, tok::ampamp) &&
 2703       Left.isOneOf(tok::kw_const, tok::kw_volatile) &&
 2730         Left.isOneOf(Keywords.kw_returns, Keywords.kw_option))
 2732     if (Right.isOneOf(tok::l_brace, tok::less) && Left.is(TT_SelectorName))
 2739         Right.isOneOf(tok::l_brace, tok::less))
 2781         Left.isOneOf(Keywords.kw_function, Keywords.kw_yield))
 2783     if (Right.isOneOf(tok::l_brace, tok::l_square) &&
 2812            Left.Previous->isOneOf(tok::r_square, tok::r_brace)))) &&
 2815     if (Left.isOneOf(tok::kw_for, Keywords.kw_as) && Left.Previous &&
 2826     if (Right.isOneOf(TT_JsTypeColon, TT_JsTypeOptionalQuestion))
 2831         Line.First->isOneOf(Keywords.kw_import, tok::kw_export))
 2845         Right.isOneOf(Keywords.kw_as, Keywords.kw_in))
 2874   if (Right.isOneOf(TT_TrailingReturnArrow, TT_LambdaArrow) ||
 2875       Left.isOneOf(TT_TrailingReturnArrow, TT_LambdaArrow))
 2893     if (Line.First->isOneOf(tok::kw_case, tok::kw_default) ||
 2926            Right.isOneOf(TT_BinaryOperator, TT_SelectorName);
 2950   if (Right.is(tok::coloncolon) && !Left.isOneOf(tok::l_brace, tok::comment))
 2961     return !Left.isOneOf(tok::amp, tok::ampamp) ||
 2965       Right.isOneOf(tok::amp, tok::ampamp))
 2968       (Left.isOneOf(TT_BinaryOperator, TT_ConditionalExpr) &&
 3010         !Line.First->isOneOf(Keywords.kw_var, Keywords.kw_let))
 3049     if ((Left.isOneOf(tok::l_brace, TT_ArrayInitializerLSquare) ||
 3055              (Right.MatchingParen->isOneOf(tok::l_brace,
 3121         Left.MatchingParen->Next->isOneOf(tok::comma, tok::r_paren) &&
 3241       !Right.isOneOf(tok::l_paren, TT_LambdaLSquare)) {
 3286          Left.isOneOf(tok::r_square, tok::r_paren)) &&
 3287         Right.isOneOf(tok::l_square, tok::l_paren))
 3317     if (Right.isOneOf(Keywords.kw_extends, Keywords.kw_infer)) {
 3335     if (Left.isOneOf(Keywords.kw_module, tok::kw_namespace) &&
 3336         Right.isOneOf(tok::identifier, tok::string_literal))
 3353   if (Left.isOneOf(TT_JavaAnnotation, TT_LeadingJavaAnnotation))
 3359   if (Right.isOneOf(TT_StartOfName, TT_FunctionDeclarationName) ||
 3388       !Right.isOneOf(TT_CtorInitializerColon, TT_InlineASMColon))
 3390   if (Left.is(tok::colon) && Left.isOneOf(TT_DictLiteral, TT_ObjCMethodExpr)) {
 3445   if (Left.isOneOf(TT_TemplateCloser, TT_UnaryOperator) ||
 3448   if (Left.is(tok::equal) && !Right.isOneOf(tok::kw_default, tok::kw_delete) &&
 3457       (Left.Previous->isOneOf(TT_BinaryOperator, TT_CastRParen)))
 3518       !Left.isOneOf(tok::arrowstar, tok::lessless) &&
 3532           Right.isOneOf(tok::identifier, tok::kw_const)) ||
tools/clang/lib/Format/UnwrappedLineFormatter.cpp
  101         (RootToken.isOneOf(Keywords.kw_signals, Keywords.kw_qsignals) &&
  312           TheLine->First->Next->isOneOf(tok::kw_else, tok::kw_catch))) &&
  355         I[-1]->First->isOneOf(tok::kw_case, tok::kw_default))
  394     if (TheLine->First->isOneOf(tok::kw_for, tok::kw_while)) {
  399     if (TheLine->First->isOneOf(tok::kw_case, tok::kw_default)) {
  460         I[1]->First->isOneOf(tok::kw_case, tok::kw_default))
  520     if (Line.First->isOneOf(tok::kw_else, tok::kw_case) ||
 1214   if (PreviousLine && PreviousLine->Last->isOneOf(tok::semi, tok::r_brace) &&
tools/clang/lib/Format/UnwrappedLineParser.cpp
  416         if (PrevTok->isOneOf(tok::colon, tok::less))
  441           ProbablyBracedList = NextTok->isOneOf(tok::comma, tok::r_square);
  445           bool NextIsObjCMethod = NextTok->isOneOf(tok::plus, tok::minus) &&
  535   assert(FormatTok->isOneOf(tok::l_brace, TT_MacroBlockBegin) &&
  632   if (InitialToken.isOneOf(tok::kw_namespace, TT_NamespaceMacro))
  819       if (!Line.Tokens.front().Tok->isOneOf(tok::comment, tok::hash)) {
  901          FormatTok->isOneOf(tok::kw_true, tok::kw_false) ||
 1559       while (!FormatTok->isOneOf(tok::l_brace, tok::semi) && !eof())
 1807   assert(FormatTok->isOneOf(tok::kw_try, tok::kw___try) && "'try' expected");
 1876   assert(FormatTok->isOneOf(tok::kw_namespace, TT_NamespaceMacro) &&
 2041   if (FormatTok->isOneOf(Keywords.kw_slots, Keywords.kw_qslots))
 2058       FormatTok->isOneOf(tok::colon, tok::question))
 2125     if (Tok->isOneOf(tok::l_brace, tok::semi)) {
 2189           FormatTok->isOneOf(tok::period, tok::comma))) {
 2191         FormatTok->isOneOf(Keywords.kw_extends, Keywords.kw_implements)) {
 2220   if (FormatTok->isOneOf(tok::colon, tok::less)) {
 2273     if (FormatTok->isOneOf(tok::semi, tok::l_brace) ||
 2295     } else if (FormatTok->isOneOf(tok::minus, tok::plus)) {
 2324       if (FormatTok->isOneOf(tok::semi, tok::l_brace) ||
 2414   if (!IsImport && !FormatTok->isOneOf(tok::l_brace, tok::star) &&
tools/clang/lib/Format/UsingDeclarationsSorter.cpp
  109   if (HasIdentifier && Tok && Tok->isOneOf(tok::semi, tok::comma))
tools/clang/lib/Format/WhitespaceManager.cpp
  591         if (C.Tok->isOneOf(TT_FunctionDeclarationName, tok::kw_operator))