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

References

tools/clang/lib/Format/TokenAnnotator.cpp
 2025           (Style.IndentPPDirectives != FormatStyle::PPDIS_BeforeHash &&
 2051   AnnotatingParser Parser(Style, Line, Keywords);
 2064   ExpressionParser ExprParser(Style, Keywords, Line);
 2162   if ((Style.AlwaysBreakAfterReturnType == FormatStyle::RTBS_TopLevel ||
 2163        Style.AlwaysBreakAfterReturnType ==
 2168   switch (Style.AlwaysBreakAfterReturnType) {
 2190       Line.First->IsMultiline ? Style.ColumnLimit
 2201             (Style.Cpp11BracedListStyle && !Style.SpacesInParentheses) ? 0 : 1;
 2201             (Style.Cpp11BracedListStyle && !Style.SpacesInParentheses) ? 0 : 1;
 2203         Current->SpacesRequiredBefore = Style.SpacesBeforeTrailingComments;
 2242       ChildSize = LastOfChild.isTrailingComment() ? Style.ColumnLimit
 2250       Current->TotalLength = Prev->TotalLength + Style.ColumnLimit;
 2268     if (Style.Language == FormatStyle::LK_ObjC &&
 2285         Current->MatchingParen->opensBlockOrBlockTypeList(Style)) {
 2290     if (Current->opensBlockOrBlockTypeList(Style))
 2322   if (Style.Language == FormatStyle::LK_Java) {
 2329   } else if (Style.Language == FormatStyle::LK_JavaScript) {
 2345     if (Style.Language == FormatStyle::LK_Proto)
 2359       (Right.is(tok::period) && Style.Language == FormatStyle::LK_Proto))
 2368       return Style.PenaltyReturnTypeOnItsOwnLine;
 2447       Style.AlignAfterOpenBracket != FormatStyle::BAS_DontAlign)
 2459     if (Style.AlignAfterOpenBracket == FormatStyle::BAS_DontAlign)
 2461     if (Left.is(tok::l_brace) && !Style.Cpp11BracedListStyle)
 2463     return Left.ParameterCount > 1 ? Style.PenaltyBreakBeforeFirstCallParameter
 2491     return Style.PenaltyBreakTemplateDeclaration;
 2498     return Style.PenaltyBreakAssignment;
 2506   return Style.SpaceBeforeParens == FormatStyle::SBPO_Always ||
 2507          (Style.SpaceBeforeParens == FormatStyle::SBPO_NonEmptyParentheses &&
 2516   if (Left.is(Keywords.kw_assert) && Style.Language == FormatStyle::LK_Java)
 2518   if (Style.ObjCSpaceAfterProperty && Line.Type == LT_ObjCProperty &&
 2528     return Style.SpaceInEmptyParentheses;
 2532                ? Style.SpacesInCStyleCastParentheses
 2533                : Style.SpacesInParentheses;
 2540     return !IsLightweightGeneric && Style.ObjCSpaceBeforeProtocolList;
 2543     return Style.SpaceAfterTemplateKeyword;
 2556     if (Style.Language == FormatStyle::LK_TextProto ||
 2557         (Style.Language == FormatStyle::LK_Proto &&
 2562       return !Style.Cpp11BracedListStyle;
 2584              (Style.PointerAlignment != FormatStyle::PAS_Left ||
 2591        (Style.PointerAlignment != FormatStyle::PAS_Right &&
 2601             (Style.PointerAlignment != FormatStyle::PAS_Right &&
 2619             SpaceRequiredForArrayInitializerLSquare(Left, Style)) ||
 2622             Style.SpacesInSquareBrackets && Right.isNot(tok::r_square));
 2627                                                      Style)) ||
 2628             (Style.SpacesInSquareBrackets &&
 2644     return Style.Cpp11BracedListStyle ? Style.SpacesInParentheses : true;
 2644     return Style.Cpp11BracedListStyle ? Style.SpacesInParentheses : true;
 2647     return Style.Language == FormatStyle::LK_JavaScript ||
 2654            (Style.SpaceBeforeParens != FormatStyle::SBPO_Never &&
 2708     return Style.PointerAlignment != FormatStyle::PAS_Left;
 2717   if (Style.isCpp()) {
 2721         !Left.opensScope() && Style.SpaceBeforeCpp11BracedList)
 2723   } else if (Style.Language == FormatStyle::LK_Proto ||
 2724              Style.Language == FormatStyle::LK_TextProto) {
 2740       return !Style.Cpp11BracedListStyle;
 2748   } else if (Style.isCSharp()) {
 2756   } else if (Style.Language == FormatStyle::LK_JavaScript) {
 2847   } else if (Style.Language == FormatStyle::LK_Java) {
 2851       return Style.SpaceBeforeParens != FormatStyle::SBPO_Never;
 2886     return Style.SpaceBeforeCtorInitializerColon;
 2887   if (Right.is(TT_InheritanceColon) && !Style.SpaceBeforeInheritanceColon)
 2890       !Style.SpaceBeforeRangeBasedForLoopColon)
 2903       return Style.SpacesInContainerLiterals;
 2918     return (Style.SpaceAfterLogicalNot && Left.is(tok::exclaim)) ||
 2925     return Style.SpaceAfterCStyleCast ||
 2929     if (Style.Language == FormatStyle::LK_TextProto ||
 2930         (Style.Language == FormatStyle::LK_Proto && Left.is(TT_DictLiteral)))
 2931       return !Style.Cpp11BracedListStyle;
 2933            (Style.Standard < FormatStyle::LS_Cpp11 || Style.SpacesInAngles);
 2933            (Style.Standard < FormatStyle::LS_Cpp11 || Style.SpacesInAngles);
 2939   if (!Style.SpaceBeforeAssignmentOperators && Left.isNot(TT_TemplateCloser) &&
 2942   if (Style.Language == FormatStyle::LK_Java && Right.is(tok::coloncolon) &&
 2952             Style.Standard < FormatStyle::LS_Cpp11) ||
 2956            (Left.is(tok ::l_paren) && Style.SpacesInParentheses);
 2958     return Style.SpacesInAngles;
 2962            Style.PointerAlignment != FormatStyle::PAS_Right;
 2966     return Style.PointerAlignment != FormatStyle::PAS_Left;
 2996   if (Right.NewlinesBefore > 1 && Style.MaxEmptyLinesToKeep > 0)
 2999   if (Style.Language == FormatStyle::LK_JavaScript) {
 3025       return Style.AllowShortFunctionsOnASingleLine == FormatStyle::SFS_None ||
 3026              Style.AllowShortFunctionsOnASingleLine == FormatStyle::SFS_Empty ||
 3028               Style.AllowShortFunctionsOnASingleLine &
 3030   } else if (Style.Language == FormatStyle::LK_Java) {
 3034   } else if (Style.Language == FormatStyle::LK_Cpp ||
 3035              Style.Language == FormatStyle::LK_ObjC ||
 3036              Style.Language == FormatStyle::LK_Proto ||
 3037              Style.Language == FormatStyle::LK_TableGen ||
 3038              Style.Language == FormatStyle::LK_TextProto) {
 3047   if (Style.JavaScriptWrapImports || Line.Type != LT_ImportStatement) {
 3050          (Style.Language == FormatStyle::LK_JavaScript &&
 3057               (Style.Language == FormatStyle::LK_JavaScript &&
 3080       Style.AlwaysBreakTemplateDeclarations == FormatStyle::BTDS_Yes)
 3083       Style.BreakConstructorInitializers == FormatStyle::BCIS_BeforeComma &&
 3084       !Style.ConstructorInitializerAllOnOneLineOrOnePerLine)
 3087       Style.BreakConstructorInitializers == FormatStyle::BCIS_BeforeComma &&
 3088       !Style.ConstructorInitializerAllOnOneLineOrOnePerLine)
 3091   if (Style.BreakInheritanceList == FormatStyle::BILS_BeforeComma &&
 3102       Right.NestingLevel == 1 && Style.Language == FormatStyle::LK_Proto) {
 3110     return (Line.startsWith(tok::kw_enum) && Style.BraceWrapping.AfterEnum) ||
 3112             Style.BraceWrapping.AfterEnum) ||
 3113            (Line.startsWith(tok::kw_class) && Style.BraceWrapping.AfterClass) ||
 3114            (Line.startsWith(tok::kw_struct) && Style.BraceWrapping.AfterStruct);
 3116       Style.AllowShortBlocksOnASingleLine == FormatStyle::SBS_Never)
 3122         Style.AllowShortLambdasOnASingleLine == FormatStyle::SLS_Inline)
 3125     if (Style.AllowShortLambdasOnASingleLine == FormatStyle::SLS_None ||
 3126         Style.AllowShortLambdasOnASingleLine == FormatStyle::SLS_Inline ||
 3128          Style.AllowShortLambdasOnASingleLine == FormatStyle::SLS_Empty))
 3133   if (Style.isCSharp() &&
 3140   if ((Style.Language == FormatStyle::LK_Java ||
 3141        Style.Language == FormatStyle::LK_JavaScript) &&
 3144       (Line.Last->is(tok::l_brace) || Style.BreakAfterJavaFieldAnnotations))
 3177   if ((Style.Language == FormatStyle::LK_Proto ||
 3178        Style.Language == FormatStyle::LK_TextProto) &&
 3238   if ((Style.Language == FormatStyle::LK_Cpp ||
 3239        Style.Language == FormatStyle::LK_ObjC) &&
 3267   if (Style.Language == FormatStyle::LK_Java) {
 3274   } else if (Style.Language == FormatStyle::LK_JavaScript) {
 3312       return Style.BreakBeforeBinaryOperators == FormatStyle::BOS_None;
 3314       return Style.BreakBeforeBinaryOperators != FormatStyle::BOS_None;
 3357            (Style.PointerAlignment == FormatStyle::PAS_Right &&
 3372             Style.BreakConstructorInitializers == FormatStyle::BCIS_AfterColon);
 3376     return Style.BreakBeforeTernaryOperators;
 3378     return !Style.BreakBeforeTernaryOperators;
 3380     return Style.BreakInheritanceList == FormatStyle::BILS_AfterColon;
 3382     return Style.BreakInheritanceList != FormatStyle::BILS_AfterColon;
 3391     if (Style.Language == FormatStyle::LK_Proto ||
 3392         Style.Language == FormatStyle::LK_TextProto) {
 3393       if (!Style.AlwaysBreakBeforeMultilineStrings && Right.isStringLiteral())
 3452       !Style.Cpp11BracedListStyle)
 3490     return Style.BreakConstructorInitializers == FormatStyle::BCIS_AfterColon;
 3492     return Style.BreakConstructorInitializers != FormatStyle::BCIS_AfterColon;
 3494       Style.BreakConstructorInitializers == FormatStyle::BCIS_BeforeComma)
 3497       Style.BreakConstructorInitializers == FormatStyle::BCIS_BeforeComma)
 3500       Style.BreakInheritanceList == FormatStyle::BILS_BeforeComma)
 3503       Style.BreakInheritanceList == FormatStyle::BILS_BeforeComma)
 3509       Style.BreakBeforeBinaryOperators != FormatStyle::BOS_None &&
 3510       (Style.BreakBeforeBinaryOperators == FormatStyle::BOS_All ||
 3519       Style.BreakBeforeBinaryOperators != FormatStyle::BOS_All &&
 3520       (Style.BreakBeforeBinaryOperators == FormatStyle::BOS_None ||