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

References

tools/clang/lib/Format/TokenAnnotator.cpp
 2514   if (Left.is(tok::kw_return) && Right.isNot(tok::semi))
 2516   if (Left.is(Keywords.kw_assert) && Style.Language == FormatStyle::LK_Java)
 2519       Left.Tok.getObjCKeywordID() == tok::objc_property)
 2522     return Left.is(tok::hash);
 2523   if (Left.isOneOf(tok::hashhash, tok::hash))
 2525   if ((Left.is(tok::l_paren) && Right.is(tok::r_paren)) ||
 2526       (Left.is(tok::l_brace) && Left.BlockKind != BK_Block &&
 2526       (Left.is(tok::l_brace) && Left.BlockKind != BK_Block &&
 2529   if (Left.is(tok::l_paren) || Right.is(tok::r_paren))
 2531             (Left.MatchingParen && Left.MatchingParen->is(TT_CastRParen)))
 2531             (Left.MatchingParen && Left.MatchingParen->is(TT_CastRParen)))
 2542   if (Right.is(tok::less) && Left.is(tok::kw_template))
 2544   if (Left.isOneOf(tok::exclaim, tok::tilde))
 2546   if (Left.is(tok::at) &&
 2551   if (Left.is(tok::colon))
 2552     return !Left.is(TT_ObjCMethodExpr);
 2553   if (Left.is(tok::coloncolon))
 2555   if (Left.is(tok::less) || Right.isOneOf(tok::greater, tok::less)) {
 2558          (Left.is(TT_DictLiteral) || Right.is(TT_DictLiteral)))) {
 2560       if (Left.is(tok::less) && Right.is(tok::greater))
 2567     return Left.Tok.isLiteral() || (Left.is(tok::identifier) && Left.Previous &&
 2567     return Left.Tok.isLiteral() || (Left.is(tok::identifier) && Left.Previous &&
 2567     return Left.Tok.isLiteral() || (Left.is(tok::identifier) && Left.Previous &&
 2568                                     Left.Previous->is(tok::kw_case));
 2569   if (Left.is(tok::l_square) && Right.is(tok::amp))
 2572     if (Left.is(tok::r_paren) && Line.MightBeFunctionDecl) {
 2573       if (!Left.MatchingParen)
 2576           Left.MatchingParen->getPreviousNonComment();
 2582     return (Left.Tok.isLiteral() ||
 2583             (!Left.isOneOf(TT_PointerOrReference, tok::l_paren) &&
 2586                (Left.NestingLevel == 0 ||
 2587                 (Left.NestingLevel == 1 && Line.First->is(tok::kw_for)))))));
 2589   if (Right.is(TT_FunctionTypeLParen) && Left.isNot(tok::l_paren) &&
 2590       (!Left.is(TT_PointerOrReference) ||
 2594   if (Left.is(TT_PointerOrReference))
 2603             Left.Previous &&
 2604             !Left.Previous->isOneOf(tok::l_paren, tok::coloncolon,
 2606   if (Right.is(tok::star) && Left.is(tok::l_paren))
 2617   if (Left.is(tok::l_square))
 2618     return (Left.is(TT_ArrayInitializerLSquare) && Right.isNot(tok::r_square) &&
 2619             SpaceRequiredForArrayInitializerLSquare(Left, Style)) ||
 2620            (Left.isOneOf(TT_ArraySubscriptLSquare, TT_StructuredBindingLSquare,
 2637       !Left.isOneOf(tok::numeric_constant, TT_DictLiteral))
 2639   if (Left.is(tok::l_brace) && Right.is(tok::r_brace))
 2640     return !Left.Children.empty(); // No spaces in "{}".
 2641   if ((Left.is(tok::l_brace) && Left.BlockKind != BK_Block) ||
 2641   if ((Left.is(tok::l_brace) && Left.BlockKind != BK_Block) ||
 2645   if (Left.is(TT_BlockComment))
 2648            !Left.TokenText.endswith("=*/");
 2650     if ((Left.is(tok::r_paren) && Left.is(TT_AttributeParen)) ||
 2650     if ((Left.is(tok::r_paren) && Left.is(TT_AttributeParen)) ||
 2651         (Left.is(tok::r_square) && Left.is(TT_AttributeSquare)))
 2651         (Left.is(tok::r_square) && Left.is(TT_AttributeSquare)))
 2653     return Line.Type == LT_ObjCDecl || Left.is(tok::semi) ||
 2655             (Left.isOneOf(tok::pp_elif, tok::kw_for, tok::kw_while,
 2658              Left.isIf(Line.Type != LT_PreprocessorDirective) ||
 2659              (Left.isOneOf(tok::kw_try, Keywords.kw___except, tok::kw_catch,
 2661               (!Left.Previous || Left.Previous->isNot(tok::period))))) ||
 2661               (!Left.Previous || Left.Previous->isNot(tok::period))))) ||
 2663             (Left.is(tok::identifier) || Left.isFunctionLikeKeyword() ||
 2663             (Left.is(tok::identifier) || Left.isFunctionLikeKeyword() ||
 2664              Left.is(tok::r_paren) || Left.isSimpleTypeSpecifier() ||
 2664              Left.is(tok::r_paren) || Left.isSimpleTypeSpecifier() ||
 2665              (Left.is(tok::r_square) && Left.MatchingParen &&
 2665              (Left.is(tok::r_square) && Left.MatchingParen &&
 2666               Left.MatchingParen->is(TT_LambdaLSquare))) &&
 2669   if (Left.is(tok::at) && Right.Tok.getObjCKeywordID() != tok::objc_not_keyword)
 2672     return !Left.isOneOf(tok::l_paren, tok::l_square, tok::at) &&
 2673            (Left.isNot(tok::colon) || Left.isNot(TT_ObjCMethodExpr));
 2673            (Left.isNot(tok::colon) || Left.isNot(TT_ObjCMethodExpr));
 2674   if ((Left.isOneOf(tok::identifier, tok::greater, tok::r_square,
 2676        Left.isSimpleTypeSpecifier()) &&
 2680   if (Left.is(tok::period) || Right.is(tok::period))
 2682   if (Right.is(tok::hash) && Left.is(tok::identifier) && Left.TokenText == "L")
 2682   if (Right.is(tok::hash) && Left.is(tok::identifier) && Left.TokenText == "L")
 2684   if (Left.is(TT_TemplateCloser) && Left.MatchingParen &&
 2684   if (Left.is(TT_TemplateCloser) && Left.MatchingParen &&
 2685       Left.MatchingParen->Previous &&
 2686       (Left.MatchingParen->Previous->is(tok::period) ||
 2687        Left.MatchingParen->Previous->is(tok::coloncolon)))
 2692   if (Left.is(TT_TemplateCloser) && Right.is(tok::l_square))
 2694   if (Left.is(tok::l_brace) && Left.endsSequence(TT_DictLiteral, tok::at))
 2694   if (Left.is(tok::l_brace) && Left.endsSequence(TT_DictLiteral, tok::at))
 2703       Left.isOneOf(tok::kw_const, tok::kw_volatile) &&