/external/clang/lib/Format/ |
D | UnwrappedLineParser.cpp | 272 kind = tok::l_brace; in parseLevel() 282 case tok::l_brace: in parseLevel() 323 assert(Tok->Tok.is(tok::l_brace)); in calculateBraceTypes() 334 case tok::l_brace: in calculateBraceTypes() 369 tok::r_paren, tok::r_square, tok::l_brace, in calculateBraceTypes() 414 assert(FormatTok->isOneOf(tok::l_brace, TT_MacroBlockBegin) && in parseBlock() 643 return Tok.isNot(tok::semi) && Tok.isNot(tok::l_brace) && in tokenCanStartNewLine() 746 assert(!FormatTok->is(tok::l_brace)); in parseStructuralElement() 758 if (FormatTok->Tok.is(tok::l_brace)) { in parseStructuralElement() 782 if (FormatTok->Tok.is(tok::l_brace)) { in parseStructuralElement() [all …]
|
D | TokenAnnotator.cpp | 230 if (CurrentToken->Next && CurrentToken->Next->is(tok::l_brace) && in parseParens() 270 if (CurrentToken->is(tok::l_brace)) in parseParens() 311 CurrentToken->isNot(tok::l_brace) && in parseSquare() 325 Contexts.back().ContextKind == tok::l_brace && in parseSquare() 326 Parent->isOneOf(tok::l_brace, tok::comma)) { in parseSquare() 406 ScopedContextCreator ContextCreator(*this, tok::l_brace, 1); in parseBrace() 421 if (CurrentToken->isOneOf(tok::colon, tok::l_brace)) { in parseBrace() 442 if (Current->is(tok::l_brace) && Current->BlockKind == BK_Block) in updateParameterCount() 588 case tok::l_brace: in consumeToken() 1038 !Current.Next->isOneOf(tok::semi, tok::colon, tok::l_brace, in determineTokenType() [all …]
|
D | FormatToken.cpp | 84 if (!LBrace || !LBrace->isOneOf(tok::l_brace, TT_ArrayInitializerLSquare) || in formatAfterToken() 149 !Token->isOneOf(tok::l_brace, TT_ArrayInitializerLSquare)) in precomputeFormattingInfos() 187 if (ItemBegin->is(tok::l_brace)) in precomputeFormattingInfos() 227 if (Token->NestingLevel != 0 && Token->is(tok::l_brace) && Commas.size() < 19) in precomputeFormattingInfos()
|
D | ContinuationIndenter.cpp | 108 if (!Current.MustBreakBefore && Previous.is(tok::l_brace) && in canBreak() 111 Previous.Previous->isOneOf(tok::l_brace, tok::l_paren, tok::comma)) in canBreak() 118 if (Previous.opensScope() && Previous.isNot(tok::l_brace) && in canBreak() 127 if (Previous.is(tok::l_brace) && State.Stack.size() > 1 && in canBreak() 167 if (((Previous.is(TT_DictLiteral) && Previous.is(tok::l_brace)) || in mustBreak() 265 Previous.is(tok::l_brace) && !Current.isOneOf(tok::r_brace, tok::comment)) in mustBreak() 579 (PreviousNonComment->isOneOf(tok::l_brace, TT_ArrayInitializerLSquare))) in addTokenOnNewLine() 586 if (!Previous.isOneOf(tok::l_paren, tok::l_brace, TT_BinaryOperator) || in addTokenOnNewLine() 616 if (NextNonComment->is(tok::l_brace) && NextNonComment->BlockKind == BK_Block) in getNewLineColumn() 776 Previous->isOneOf(tok::l_brace, TT_ArrayInitializerLSquare) && in moveStateToNextToken() [all …]
|
D | UnwrappedLineFormatter.cpp | 25 NextNext && NextNext->is(tok::l_brace); in startsExternCBlock() 201 if (TheLine->Last->is(tok::l_brace)) { in tryFitMultipleLinesInOne() 267 (I[1]->First->is(tok::l_brace) && !Style.AllowShortBlocksOnASingleLine)) in tryMergeSimpleControlStatement() 384 if (Tok->is(tok::l_brace) && Tok->BlockKind != BK_BracedInit) in tryMergeSimpleBlock() 513 if (!LBrace || LBrace->isNot(tok::l_brace) || in formatChildren() 931 PreviousLine->Last->is(tok::l_brace) && in formatFirstToken()
|
/external/llvm-project/clang/lib/Format/ |
D | UnwrappedLineParser.cpp | 330 case tok::l_brace: in parseCSharpGenericTypeConstraint() 373 kind = tok::l_brace; in parseLevel() 383 case tok::l_brace: in parseLevel() 452 assert(Tok->Tok.is(tok::l_brace)); in calculateBraceTypes() 463 case tok::l_brace: in calculateBraceTypes() 511 tok::r_paren, tok::r_square, tok::l_brace, 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() 917 return Tok.isNot(tok::semi) && Tok.isNot(tok::l_brace) && in tokenCanStartNewLine() 1031 assert(!FormatTok->is(tok::l_brace)); in parseStructuralElement() [all …]
|
D | TokenAnnotator.cpp | 165 (CurrentToken->isOneOf(tok::l_brace, tok::less) && in parseAngle() 343 if (CurrentToken->Next && CurrentToken->Next->is(tok::l_brace) && in parseParens() 387 if (CurrentToken->is(tok::l_brace)) in parseParens() 395 !CurrentToken->is(tok::l_brace)) in parseParens() 540 !CurrentToken->isOneOf(tok::l_brace, tok::r_square) && in parseSquare() 562 Contexts.back().ContextKind == tok::l_brace && in parseSquare() 563 Parent->isOneOf(tok::l_brace, tok::comma)) { in parseSquare() 565 } else if (Style.isCpp() && Contexts.back().ContextKind == tok::l_brace && in parseSquare() 566 Parent && Parent->isOneOf(tok::l_brace, tok::comma)) { in parseSquare() 734 ScopedContextCreator ContextCreator(*this, tok::l_brace, 1); in parseBrace() [all …]
|
D | UnwrappedLineFormatter.cpp | 26 NextNext && NextNext->is(tok::l_brace); in startsExternCBlock() 231 if (TheLine->Last->is(tok::l_brace) && TheLine->First == TheLine->Last && in tryFitMultipleLinesInOne() 303 if (TheLine->Last->is(tok::l_brace) && TheLine->First != TheLine->Last && in tryFitMultipleLinesInOne() 310 if (I[1]->First->is(tok::l_brace) && in tryFitMultipleLinesInOne() 325 } else if (I[1]->First->is(tok::l_brace) && in tryFitMultipleLinesInOne() 332 } else if (I[1]->First->is(tok::l_brace) && in tryFitMultipleLinesInOne() 347 if (TheLine->First->is(tok::l_brace) && I != AnnotatedLines.begin() && in tryFitMultipleLinesInOne() 355 if (TheLine->First->is(tok::l_brace) && I != AnnotatedLines.begin() && in tryFitMultipleLinesInOne() 359 if (TheLine->Last->is(tok::l_brace)) { in tryFitMultipleLinesInOne() 432 I[1]->First->is(tok::l_brace) && in tryMergeSimpleControlStatement() [all …]
|
D | FormatToken.cpp | 88 if (!LBrace || !LBrace->isOneOf(tok::l_brace, TT_ArrayInitializerLSquare) || in formatAfterToken() 156 !Token->isOneOf(tok::l_brace, TT_ArrayInitializerLSquare)) in precomputeFormattingInfos() 194 if (ItemBegin->is(tok::l_brace)) in precomputeFormattingInfos() 234 if (Token->NestingLevel != 0 && Token->is(tok::l_brace) && Commas.size() < 19) in precomputeFormattingInfos()
|
D | NamespaceEndCommentsFixer.cpp | 52 while (Tok && !Tok->is(tok::l_brace) && !Tok->is(tok::coloncolon)) { in computeName() 58 while (Tok && !Tok->is(tok::l_brace)) { in computeName() 182 if (NamespaceTok->is(tok::l_brace)) { in getNamespaceToken() 214 Braces += Tok->is(tok::l_brace) ? 1 : Tok->is(tok::r_brace) ? -1 : 0; in analyze()
|
D | ContinuationIndenter.cpp | 98 tok::l_brace, TT_ArrayInitializerLSquare, tok::less)) { in getLengthToMatchingParen() 286 if (!Current.MustBreakBefore && Previous.is(tok::l_brace) && in canBreak() 289 Previous.Previous->isOneOf(tok::l_brace, tok::l_paren, tok::comma)) in canBreak() 296 if (Previous.opensScope() && Previous.isNot(tok::l_brace) && in canBreak() 305 if (Previous.is(tok::l_brace) && State.Stack.size() > 1 && in canBreak() 376 if (((Previous.is(TT_DictLiteral) && Previous.is(tok::l_brace)) || in mustBreak() 507 Previous.is(tok::l_brace) && !Current.isOneOf(tok::r_brace, tok::comment)) in mustBreak() 632 (Previous.is(tok::l_brace) && Previous.isNot(BK_Block) && in addTokenOnCurrentLine() 928 (PreviousNonComment->isOneOf(tok::l_brace, TT_ArrayInitializerLSquare) || in addTokenOnNewLine() 940 if (!(Previous.isOneOf(tok::l_paren, tok::l_brace, TT_BinaryOperator) || in addTokenOnNewLine() [all …]
|
/external/clang/lib/Parse/ |
D | ParseCXXInlineMethods.cpp | 32 assert(Tok.isOneOf(tok::l_brace, tok::colon, tok::kw_try, tok::equal) && in ParseCXXInlineMethodDef() 163 ConsumeAndStoreUntil(tok::l_brace, Toks, /*StopAtSemi=*/false); in ParseCXXInlineMethodDef() 198 assert(Tok.isOneOf(tok::l_brace, tok::equal) && in ParseCXXNonStaticMemberInitializer() 212 if (kind == tok::l_brace) { in ParseCXXNonStaticMemberInitializer() 351 if (getLangOpts().CPlusPlus11 && Tok.is(tok::l_brace)) { in ParseLexedMethodDeclaration() 518 assert(Tok.isOneOf(tok::l_brace, tok::colon, tok::kw_try) in ParseLexedMethodDef() 540 if (!Tok.is(tok::l_brace)) { in ParseLexedMethodDef() 705 case tok::l_brace: in ConsumeAndStoreUntil() 781 ConsumeAndStoreUntil(tok::l_brace, tok::r_brace, Toks, in ConsumeAndStoreFunctionPrologue() 784 if (Tok.isNot(tok::l_brace)) in ConsumeAndStoreFunctionPrologue() [all …]
|
D | ParseStmt.cpp | 134 nextTok.isOneOf(tok::l_paren, tok::semi, tok::identifier, tok::l_brace); in StatementFilterCCC() 233 case tok::l_brace: // C99 6.8.2: compound-statement in ParseStatementOrDeclarationAfterAttributes() 442 if (Tok.isNot(tok::l_brace)) in ParseSEHTryBlock() 443 return StmtError(Diag(Tok, diag::err_expected) << tok::l_brace); in ParseSEHTryBlock() 512 if (Tok.isNot(tok::l_brace)) in ParseSEHExceptBlock() 513 return StmtError(Diag(Tok, diag::err_expected) << tok::l_brace); in ParseSEHExceptBlock() 533 if (Tok.isNot(tok::l_brace)) in ParseSEHFinallyBlock() 534 return StmtError(Diag(Tok, diag::err_expected) << tok::l_brace); in ParseSEHFinallyBlock() 859 assert(Tok.is(tok::l_brace) && "Not a compount stmt!"); in ParseCompoundStatement() 937 BalancedDelimiterTracker T(*this, tok::l_brace); in ParseCompoundStatementBody() [all …]
|
D | ParseDeclCXX.cpp | 123 BalancedDelimiterTracker T(*this, tok::l_brace); in ParseNamespace() 126 Diag(Tok, diag::err_expected) << tok::l_brace; in ParseNamespace() 128 Diag(Tok, diag::err_expected_either) << tok::identifier << tok::l_brace; in ParseNamespace() 309 Tok.is(tok::l_brace) ? Tok.getLocation() : SourceLocation()); in ParseLinkage() 315 if (Tok.isNot(tok::l_brace)) { in ParseLinkage() 332 BalancedDelimiterTracker T(*this, tok::l_brace); in ParseLinkage() 1488 else if (Tok.is(tok::l_brace) || in ParseClassSpecifier() 1491 (NextToken().is(tok::l_brace) || NextToken().is(tok::colon)))) { in ParseClassSpecifier() 1531 if (Tok.isOneOf(tok::l_brace, tok::colon)) in ParseClassSpecifier() 1768 assert(Tok.is(tok::l_brace) || in ParseClassSpecifier() [all …]
|
D | ParseObjc.cpp | 307 if (Tok.is(tok::l_brace)) in ParseObjCAtInterfaceDeclaration() 383 if (Tok.is(tok::l_brace)) in ParseObjCAtInterfaceDeclaration() 556 tok::minus, tok::plus, tok::colon, tok::l_paren, tok::l_brace, in parseObjCTypeParamListOrProtocolRefs() 1924 assert(Tok.is(tok::l_brace) && "expected {"); in ParseObjCClassInstanceVariables() 1930 BalancedDelimiterTracker T(*this, tok::l_brace); in ParseObjCClassInstanceVariables() 2217 if (Tok.is(tok::l_brace)) // we have ivars in ParseObjCAtImplementationDeclaration() 2492 SkipUntil(tok::l_brace, StopAtSemi | StopBeforeMatch); in ParseObjCSynchronizedStmt() 2496 if (Tok.isNot(tok::l_brace)) { in ParseObjCSynchronizedStmt() 2498 Diag(Tok, diag::err_expected) << tok::l_brace; in ParseObjCSynchronizedStmt() 2537 if (Tok.isNot(tok::l_brace)) { in ParseObjCTryStmt() [all …]
|
D | ParseInit.cpp | 392 BalancedDelimiterTracker T(*this, tok::l_brace); in ParseBraceInitializer() 486 BalancedDelimiterTracker Braces(*this, tok::l_brace); in ParseMicrosoftIfExistsBraceInitializer() 488 Diag(Tok, diag::err_expected) << tok::l_brace; in ParseMicrosoftIfExistsBraceInitializer()
|
D | Parser.cpp | 317 case tok::l_brace: in SkipUntil() 839 if (Tok.is(tok::l_brace)) // int X() {} in isStartOfFunctionDefinition() 1003 if (Tok.isNot(tok::l_brace) && in ParseFunctionDefinition() 1010 SkipUntil(tok::l_brace, StopAtSemi | StopBeforeMatch); in ParseFunctionDefinition() 1013 if (Tok.isNot(tok::l_brace)) in ParseFunctionDefinition() 1065 (Tok.is(tok::l_brace) || Tok.is(tok::kw_try) || in ParseFunctionDefinition() 1161 if (!Tok.is(tok::l_brace)) { in ParseFunctionDefinition() 1192 SkipUntil(tok::l_brace); in SkipFunctionBody() 1302 if (SkipUntil(tok::l_brace, StopAtSemi | StopBeforeMatch)) in ParseKNRParamDeclarations() 1967 BalancedDelimiterTracker Braces(*this, tok::l_brace); in ParseMicrosoftIfExistsExternalDeclaration() [all …]
|
D | ParseTentative.cpp | 302 } else if (Tok.is(tok::l_brace)) { in TryParseInitDeclaratorList() 435 (getLangOpts().CPlusPlus11 && Tok.is(tok::l_brace))) { in isCXXConditionDeclarationOrInitStatement() 1084 tok::l_brace, tok::identifier); in TentativeParseCCC() 1469 bool isFollowedByBrace = Tok.is(tok::l_brace); in isCXXDeclarationSpecifier() 1510 if (getLangOpts().CPlusPlus11 && NextToken().is(tok::l_brace)) in isCXXDeclarationSpecifier() 1527 bool isFollowedByBrace = Tok.is(tok::l_brace); in isCXXDeclarationSpecifier() 1680 tok::l_brace, tok::kw_try, tok::equal, tok::arrow) || in isCXXFunctionDeclarator()
|
/external/llvm-project/clang/lib/Parse/ |
D | ParseCXXInlineMethods.cpp | 29 assert(Tok.isOneOf(tok::l_brace, tok::colon, tok::kw_try, tok::equal) && in ParseCXXInlineMethodDef() 159 ConsumeAndStoreUntil(tok::l_brace, Toks, /*StopAtSemi=*/false); in ParseCXXInlineMethodDef() 185 assert(Tok.isOneOf(tok::l_brace, tok::equal) && in ParseCXXNonStaticMemberInitializer() 199 if (kind == tok::l_brace) { in ParseCXXNonStaticMemberInitializer() 377 if (getLangOpts().CPlusPlus11 && Tok.is(tok::l_brace)) { in ParseLexedMethodDeclaration() 537 assert(Tok.isOneOf(tok::l_brace, tok::colon, tok::kw_try) in ParseLexedMethodDef() 560 if (!Tok.is(tok::l_brace)) { in ParseLexedMethodDef() 834 case tok::l_brace: in ConsumeAndStoreUntil() 897 ConsumeAndStoreUntil(tok::l_brace, tok::r_brace, Toks, in ConsumeAndStoreFunctionPrologue() 900 if (Tok.isNot(tok::l_brace)) in ConsumeAndStoreFunctionPrologue() [all …]
|
D | ParseStmt.cpp | 128 nextTok.isOneOf(tok::l_paren, tok::semi, tok::identifier, tok::l_brace); in StatementFilterCCC() 247 case tok::l_brace: // C99 6.8.2: compound-statement in ParseStatementOrDeclarationAfterAttributes() 486 if (Tok.isNot(tok::l_brace)) in ParseSEHTryBlock() 487 return StmtError(Diag(Tok, diag::err_expected) << tok::l_brace); in ParseSEHTryBlock() 557 if (Tok.isNot(tok::l_brace)) in ParseSEHExceptBlock() 558 return StmtError(Diag(Tok, diag::err_expected) << tok::l_brace); in ParseSEHExceptBlock() 578 if (Tok.isNot(tok::l_brace)) in ParseSEHFinallyBlock() 579 return StmtError(Diag(Tok, diag::err_expected) << tok::l_brace); in ParseSEHFinallyBlock() 902 assert(Tok.is(tok::l_brace) && "Not a compount stmt!"); in ParseCompoundStatement() 1041 BalancedDelimiterTracker T(*this, tok::l_brace); in ParseCompoundStatementBody() [all …]
|
D | ParseDeclCXX.cpp | 137 BalancedDelimiterTracker T(*this, tok::l_brace); in ParseNamespace() 140 Diag(Tok, diag::err_expected) << tok::l_brace; in ParseNamespace() 142 Diag(Tok, diag::err_expected_either) << tok::identifier << tok::l_brace; in ParseNamespace() 345 Tok.is(tok::l_brace) ? Tok.getLocation() : SourceLocation()); in ParseLinkage() 350 if (Tok.isNot(tok::l_brace)) { in ParseLinkage() 367 BalancedDelimiterTracker T(*this, tok::l_brace); in ParseLinkage() 425 Tok.is(tok::l_brace) ? Tok.getLocation() : SourceLocation()); in ParseExportDeclaration() 427 if (Tok.isNot(tok::l_brace)) { in ParseExportDeclaration() 437 BalancedDelimiterTracker T(*this, tok::l_brace); in ParseExportDeclaration() 1694 else if (Tok.is(tok::l_brace) || in ParseClassSpecifier() [all …]
|
D | ParseObjc.cpp | 291 if (Tok.is(tok::l_brace)) in ParseObjCAtInterfaceDeclaration() 362 if (Tok.is(tok::l_brace)) in ParseObjCAtInterfaceDeclaration() 530 tok::minus, tok::plus, tok::colon, tok::l_paren, tok::l_brace, in parseObjCTypeParamListOrProtocolRefs() 1906 assert(Tok.is(tok::l_brace) && "expected {"); in ParseObjCClassInstanceVariables() 1912 BalancedDelimiterTracker T(*this, tok::l_brace); in ParseObjCClassInstanceVariables() 2193 if (Tok.is(tok::l_brace)) // we have ivars in ParseObjCAtImplementationDeclaration() 2460 SkipUntil(tok::l_brace, StopAtSemi | StopBeforeMatch); in ParseObjCSynchronizedStmt() 2464 if (Tok.isNot(tok::l_brace)) { in ParseObjCSynchronizedStmt() 2466 Diag(Tok, diag::err_expected) << tok::l_brace; in ParseObjCSynchronizedStmt() 2505 if (Tok.isNot(tok::l_brace)) { in ParseObjCTryStmt() [all …]
|
D | ParseInit.cpp | 398 if (Tok.is(tok::l_brace) && getLangOpts().CPlusPlus11) { in ParseInitializerWithPotentialDesignator() 435 BalancedDelimiterTracker T(*this, tok::l_brace); in ParseBraceInitializer() 537 BalancedDelimiterTracker Braces(*this, tok::l_brace); in ParseMicrosoftIfExistsBraceInitializer() 539 Diag(Tok, diag::err_expected) << tok::l_brace; in ParseMicrosoftIfExistsBraceInitializer()
|
D | ParseTentative.cpp | 296 } else if (Tok.is(tok::l_brace)) { in TryParseInitDeclaratorList() 453 if (Tok.is(tok::l_brace) || (AllowSemi && Tok.is(tok::semi))) in isEnumBase() 506 (getLangOpts().CPlusPlus11 && Tok.is(tok::l_brace))) { in isCXXConditionDeclarationOrInitStatement() 1115 Next.isOneOf(tok::l_paren, tok::r_paren, tok::greater, tok::l_brace, in TentativeParseCCC() 1606 bool isFollowedByBrace = Tok.is(tok::l_brace); in isCXXDeclarationSpecifier() 1653 if (getLangOpts().CPlusPlus11 && NextToken().is(tok::l_brace)) in isCXXDeclarationSpecifier() 1670 bool isFollowedByBrace = Tok.is(tok::l_brace); in isCXXDeclarationSpecifier() 1705 if (getLangOpts().CPlusPlus11 && Tok.is(tok::l_brace)) in isCXXDeclarationSpecifier() 1847 tok::l_brace, tok::kw_try, tok::equal, tok::arrow) || in isCXXFunctionDeclarator() 2057 if (Tok.is(tok::l_brace)) in TryParseBracketDeclarator()
|
D | ParseExprCXX.cpp | 189 if (NextKind == tok::l_brace) { in ParseOptionalCXXScopeSpecifier() 409 if (Next.is(tok::coloncolon) && GetLookAheadToken(2).is(tok::l_brace)) { in ParseOptionalCXXScopeSpecifier() 734 SkipUntil(tok::l_brace, StopAtSemi); in ParseLambdaExpression() 991 } else if (Tok.isOneOf(tok::l_brace, tok::equal)) { in ParseLambdaIntroducer() 1005 } else if (Tok.is(tok::l_brace)) { in ParseLambdaIntroducer() 1006 BalancedDelimiterTracker Braces(*this, tok::l_brace); in ParseLambdaIntroducer() 1296 SkipUntil({tok::l_brace, tok::l_paren}, StopAtSemi | StopBeforeMatch); in ParseLambdaExpressionAfterIntroducer() 1510 if (!Tok.is(tok::l_brace)) { in ParseLambdaExpressionAfterIntroducer() 1863 ExprResult Expr = Tok.is(tok::l_brace) ? ParseBraceInitializer() in ParseCoyieldExpression() 1900 (getLangOpts().CPlusPlus11 && Tok.is(tok::l_brace))) in ParseCXXTypeConstructExpression() [all …]
|