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

References

tools/clang/lib/Format/TokenAnnotator.cpp
 2714   const FormatToken &Left = *Right.Previous;
 2715   if (Right.Tok.getIdentifierInfo() && Left.Tok.getIdentifierInfo())
 2719       return Right.is(tok::coloncolon);
 2720     if (Right.is(tok::l_brace) && Right.BlockKind == BK_BracedInit &&
 2720     if (Right.is(tok::l_brace) && Right.BlockKind == BK_BracedInit &&
 2725     if (Right.is(tok::period) &&
 2729     if (Right.is(tok::l_paren) &&
 2732     if (Right.isOneOf(tok::l_brace, tok::less) && Left.is(TT_SelectorName))
 2735     if (Left.is(tok::slash) || Right.is(tok::slash))
 2739         Right.isOneOf(tok::l_brace, tok::less))
 2746     if (Left.is(tok::numeric_constant) && Right.is(tok::percent))
 2747       return Right.WhitespaceRange.getEnd() != Right.WhitespaceRange.getBegin();
 2747       return Right.WhitespaceRange.getEnd() != Right.WhitespaceRange.getBegin();
 2750     if (Left.is(TT_TemplateCloser) && Right.is(TT_StartOfName))
 2753     if (Right.is(tok::l_paren))
 2760     if (Right.is(tok::l_paren) && Left.is(Keywords.kw_await) && Left.Previous &&
 2763     if (Left.is(Keywords.kw_async) && Right.is(tok::l_paren) &&
 2764         Right.MatchingParen) {
 2765       const FormatToken *Next = Right.MatchingParen->getNextNonComment();
 2772         (Right.is(TT_TemplateString) && Right.TokenText.startswith("}")))
 2772         (Right.is(TT_TemplateString) && Right.TokenText.startswith("}")))
 2778         Right.is(TT_TemplateString))
 2780     if (Right.is(tok::star) &&
 2783     if (Right.isOneOf(tok::l_brace, tok::l_square) &&
 2787     if (Right.is(tok::l_paren)) {
 2816         Left.Previous->is(tok::period) && Right.is(tok::l_paren))
 2819         Right.isOneOf(tok::l_square, tok::l_brace, tok::l_paren))
 2824     if (Left.is(Keywords.kw_is) && Right.is(tok::l_brace))
 2826     if (Right.isOneOf(TT_JsTypeColon, TT_JsTypeOptionalQuestion))
 2828     if (Left.is(TT_JsTypeOperator) || Right.is(TT_JsTypeOperator))
 2830     if ((Left.is(tok::l_brace) || Right.is(tok::r_brace)) &&
 2836         !Right.isOneOf(tok::equal, tok::l_brace, tok::comma, tok::l_square,
 2842     if (Right.is(TT_JsNonNullAssertion))
 2845         Right.isOneOf(Keywords.kw_as, Keywords.kw_in))
 2848     if (Left.is(tok::r_square) && Right.is(tok::l_brace))
 2850     if (Left.is(Keywords.kw_synchronized) && Right.is(tok::l_paren))
 2856         Right.is(TT_TemplateOpener))
 2860     return Right.WhitespaceRange.getBegin() != Right.WhitespaceRange.getEnd();
 2860     return Right.WhitespaceRange.getBegin() != Right.WhitespaceRange.getEnd();
 2864     if (Left.is(tok::r_paren) && canBeObjCSelectorComponent(Right))
 2871       (Right.is(tok::equal) || Left.is(tok::equal)))
 2874   if (Right.isOneOf(TT_TrailingReturnArrow, TT_LambdaArrow) ||
 2877   if (Right.is(TT_OverloadedOperatorLParen))
 2878     return spaceRequiredBeforeParens(Right);
 2881   if (Right.is(tok::comma))
 2883   if (Right.is(TT_ObjCBlockLParen))
 2885   if (Right.is(TT_CtorInitializerColon))
 2887   if (Right.is(TT_InheritanceColon) && !Style.SpaceBeforeInheritanceColon)
 2889   if (Right.is(TT_RangeBasedForLoopColon) &&
 2892   if (Right.is(tok::colon)) {
 2894         !Right.getNextNonComment() || Right.getNextNonComment()->is(tok::semi))
 2894         !Right.getNextNonComment() || Right.getNextNonComment()->is(tok::semi))
 2896     if (Right.is(TT_ObjCMethodExpr))
 2900     if (Right.is(TT_InlineASMColon) && Left.is(tok::coloncolon))
 2902     if (Right.is(TT_DictLiteral))
 2904     if (Right.is(TT_AttributeColon))
 2912     if (!Right.is(tok::l_paren)) {
 2919            Right.is(TT_BinaryOperator);
 2926            Right.isOneOf(TT_BinaryOperator, TT_SelectorName);
 2928   if (Left.is(tok::greater) && Right.is(tok::greater)) {
 2932     return Right.is(TT_TemplateCloser) && Left.is(TT_TemplateCloser) &&
 2935   if (Right.isOneOf(tok::arrow, tok::arrowstar, tok::periodstar) ||
 2937       (Right.is(tok::period) && Right.isNot(TT_DesignatedInitializerPeriod)))
 2937       (Right.is(tok::period) && Right.isNot(TT_DesignatedInitializerPeriod)))
 2940       Right.getPrecedence() == prec::Assignment)
 2942   if (Style.Language == FormatStyle::LK_Java && Right.is(tok::coloncolon) &&
 2945   if (Right.is(tok::coloncolon) && Left.is(tok::identifier))
 2949     return Right.WhitespaceRange.getBegin() != Right.WhitespaceRange.getEnd();
 2949     return Right.WhitespaceRange.getBegin() != Right.WhitespaceRange.getEnd();
 2950   if (Right.is(tok::coloncolon) && !Left.isOneOf(tok::l_brace, tok::comment))
 2957   if ((Left.is(TT_TemplateOpener)) != (Right.is(TT_TemplateCloser)))
 2960   if (Right.is(TT_StructuredBindingLSquare))
 2964   if (Right.Next && Right.Next->is(TT_StructuredBindingLSquare) &&
 2964   if (Right.Next && Right.Next->is(TT_StructuredBindingLSquare) &&
 2965       Right.isOneOf(tok::amp, tok::ampamp))
 2967   if ((Right.is(TT_BinaryOperator) && !Left.is(tok::l_paren)) ||
 2969        !Right.is(tok::r_paren)))
 2971   if (Left.is(TT_TemplateCloser) && Right.is(tok::l_paren) &&
 2972       Right.isNot(TT_FunctionTypeLParen))
 2973     return spaceRequiredBeforeParens(Right);
 2974   if (Right.is(TT_TemplateOpener) && Left.is(tok::r_paren) &&
 2977   if (Right.is(tok::less) && Left.isNot(tok::l_paren) &&
 2980   if (Right.is(TT_TrailingUnaryOperator))
 2984   return spaceRequiredBetween(Line, Left, Right);