Home
last modified time | relevance | path

Searched refs:l_brace (Results 1 – 25 of 31) sorted by relevance

12

/external/clang/lib/Format/
DUnwrappedLineParser.cpp272 kind = tok::l_brace; in parseLevel()
282 case tok::l_brace: in parseLevel()
322 assert(Tok->Tok.is(tok::l_brace)); in calculateBraceTypes()
333 case tok::l_brace: in calculateBraceTypes()
359 tok::r_paren, tok::r_square, tok::l_brace, in calculateBraceTypes()
403 assert(FormatTok->isOneOf(tok::l_brace, TT_MacroBlockBegin) && in parseBlock()
629 return Tok.isNot(tok::semi) && Tok.isNot(tok::l_brace) && in tokenCanStartNewLine()
653 assert(!FormatTok->Tok.is(tok::l_brace)); in parseStructuralElement()
657 if (FormatTok->Tok.is(tok::l_brace)) { in parseStructuralElement()
681 if (FormatTok->Tok.is(tok::l_brace)) { in parseStructuralElement()
[all …]
DTokenAnnotator.cpp225 if (CurrentToken->is(tok::l_brace)) in parseParens()
266 CurrentToken->isNot(tok::l_brace) && in parseSquare()
280 Contexts.back().ContextKind == tok::l_brace && in parseSquare()
281 Parent->isOneOf(tok::l_brace, tok::comma)) { in parseSquare()
358 ScopedContextCreator ContextCreator(*this, tok::l_brace, 1); in parseBrace()
373 if (CurrentToken->isOneOf(tok::colon, tok::l_brace)) { in parseBrace()
393 if (Current->is(tok::l_brace) && !Current->is(TT_DictLiteral)) in updateParameterCount()
528 case tok::l_brace: in consumeToken()
957 !Current.Next->isOneOf(tok::semi, tok::colon, tok::l_brace)) in determineTokenType()
984 PreviousNoComment->isOneOf(tok::comma, tok::l_brace)) in determineTokenType()
[all …]
DFormatToken.cpp83 if (!LBrace || LBrace->isNot(tok::l_brace) || LBrace->BlockKind == BK_Block || in formatAfterToken()
147 if (!Token->MatchingParen || Token->isNot(tok::l_brace)) in precomputeFormattingInfos()
179 if (ItemBegin->is(tok::l_brace)) in precomputeFormattingInfos()
DContinuationIndenter.cpp102 if (!Current.MustBreakBefore && Previous.is(tok::l_brace) && in canBreak()
105 Previous.Previous->isOneOf(tok::l_brace, tok::l_paren, tok::comma)) in canBreak()
112 if (Previous.opensScope() && Previous.isNot(tok::l_brace) && in canBreak()
121 if (Previous.is(tok::l_brace) && State.Stack.size() > 1 && in canBreak()
155 if (((Previous.is(TT_DictLiteral) && Previous.is(tok::l_brace)) || in mustBreak()
246 Previous.is(tok::l_brace) && !Current.isOneOf(tok::r_brace, tok::comment)) in mustBreak()
537 (PreviousNonComment->isOneOf(tok::l_brace, TT_ArrayInitializerLSquare))) in addTokenOnNewLine()
544 if (!Previous.isOneOf(tok::l_paren, tok::l_brace, TT_BinaryOperator) || in addTokenOnNewLine()
574 if (NextNonComment->is(tok::l_brace) && NextNonComment->BlockKind == BK_Block) in getNewLineColumn()
730 Previous->isOneOf(tok::l_brace, TT_ArrayInitializerLSquare) && in moveStateToNextToken()
[all …]
DUnwrappedLineFormatter.cpp25 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()
927 PreviousLine->Last->is(tok::l_brace) && in formatFirstToken()
DFormatToken.h322 return isOneOf(tok::l_paren, tok::l_brace, tok::l_square, in opensScope()
417 (is(tok::l_brace) && in opensBlockOrBlockTypeList()
DWhitespaceManager.cpp249 } else if (Changes[i].Kind == tok::l_brace || in AlignTokens()
/external/clang/lib/Parse/
DParseCXXInlineMethods.cpp32 assert(Tok.isOneOf(tok::l_brace, tok::colon, tok::kw_try, tok::equal) && in ParseCXXInlineMethodDef()
156 ConsumeAndStoreUntil(tok::l_brace, Toks, /*StopAtSemi=*/false); in ParseCXXInlineMethodDef()
191 assert(Tok.isOneOf(tok::l_brace, tok::equal) && in ParseCXXNonStaticMemberInitializer()
205 if (kind == tok::l_brace) { in ParseCXXNonStaticMemberInitializer()
344 if (getLangOpts().CPlusPlus11 && Tok.is(tok::l_brace)) { in ParseLexedMethodDeclaration()
511 assert(Tok.isOneOf(tok::l_brace, tok::colon, tok::kw_try) in ParseLexedMethodDef()
533 if (!Tok.is(tok::l_brace)) { in ParseLexedMethodDef()
696 case tok::l_brace: in ConsumeAndStoreUntil()
772 ConsumeAndStoreUntil(tok::l_brace, tok::r_brace, Toks, in ConsumeAndStoreFunctionPrologue()
775 if (Tok.isNot(tok::l_brace)) in ConsumeAndStoreFunctionPrologue()
[all …]
DParseStmt.cpp127 nextTok.isOneOf(tok::l_paren, tok::semi, tok::identifier, tok::l_brace); in StatementFilterCCC()
225 case tok::l_brace: // C99 6.8.2: compound-statement in ParseStatementOrDeclarationAfterAttributes()
430 if (Tok.isNot(tok::l_brace)) in ParseSEHTryBlock()
431 return StmtError(Diag(Tok, diag::err_expected) << tok::l_brace); in ParseSEHTryBlock()
500 if (Tok.isNot(tok::l_brace)) in ParseSEHExceptBlock()
501 return StmtError(Diag(Tok, diag::err_expected) << tok::l_brace); in ParseSEHExceptBlock()
521 if (Tok.isNot(tok::l_brace)) in ParseSEHFinallyBlock()
522 return StmtError(Diag(Tok, diag::err_expected) << tok::l_brace); in ParseSEHFinallyBlock()
843 assert(Tok.is(tok::l_brace) && "Not a compount stmt!"); in ParseCompoundStatement()
918 BalancedDelimiterTracker T(*this, tok::l_brace); in ParseCompoundStatementBody()
[all …]
DParseDeclCXX.cpp123 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()
1473 else if (Tok.is(tok::l_brace) || in ParseClassSpecifier()
1476 (NextToken().is(tok::l_brace) || NextToken().is(tok::colon)))) { in ParseClassSpecifier()
1516 if (Tok.isOneOf(tok::l_brace, tok::colon)) in ParseClassSpecifier()
1753 assert(Tok.is(tok::l_brace) || in ParseClassSpecifier()
[all …]
DParseObjc.cpp302 if (Tok.is(tok::l_brace)) in ParseObjCAtInterfaceDeclaration()
383 if (Tok.is(tok::l_brace)) in ParseObjCAtInterfaceDeclaration()
570 tok::minus, tok::plus, tok::colon, tok::l_paren, tok::l_brace, in parseObjCTypeParamListOrProtocolRefs()
1899 assert(Tok.is(tok::l_brace) && "expected {"); in ParseObjCClassInstanceVariables()
1905 BalancedDelimiterTracker T(*this, tok::l_brace); in ParseObjCClassInstanceVariables()
2193 if (Tok.is(tok::l_brace)) // we have ivars in ParseObjCAtImplementationDeclaration()
2438 SkipUntil(tok::l_brace, StopAtSemi | StopBeforeMatch); in ParseObjCSynchronizedStmt()
2442 if (Tok.isNot(tok::l_brace)) { in ParseObjCSynchronizedStmt()
2444 Diag(Tok, diag::err_expected) << tok::l_brace; in ParseObjCSynchronizedStmt()
2483 if (Tok.isNot(tok::l_brace)) { in ParseObjCTryStmt()
[all …]
DParseInit.cpp398 BalancedDelimiterTracker T(*this, tok::l_brace); in ParseBraceInitializer()
492 BalancedDelimiterTracker Braces(*this, tok::l_brace); in ParseMicrosoftIfExistsBraceInitializer()
494 Diag(Tok, diag::err_expected) << tok::l_brace; in ParseMicrosoftIfExistsBraceInitializer()
DParser.cpp317 case tok::l_brace: in SkipUntil()
832 if (Tok.is(tok::l_brace)) // int X() {} in isStartOfFunctionDefinition()
990 if (Tok.isNot(tok::l_brace) && in ParseFunctionDefinition()
997 SkipUntil(tok::l_brace, StopAtSemi | StopBeforeMatch); in ParseFunctionDefinition()
1000 if (Tok.isNot(tok::l_brace)) in ParseFunctionDefinition()
1046 (Tok.is(tok::l_brace) || Tok.is(tok::kw_try) || in ParseFunctionDefinition()
1135 if (!Tok.is(tok::l_brace)) { in ParseFunctionDefinition()
1166 SkipUntil(tok::l_brace); in SkipFunctionBody()
1276 if (SkipUntil(tok::l_brace, StopAtSemi | StopBeforeMatch)) in ParseKNRParamDeclarations()
1945 BalancedDelimiterTracker Braces(*this, tok::l_brace); in ParseMicrosoftIfExistsExternalDeclaration()
[all …]
DParseTentative.cpp301 } else if (Tok.is(tok::l_brace)) { in TryParseInitDeclaratorList()
375 else if (getLangOpts().CPlusPlus11 && Tok.is(tok::l_brace)) in isCXXConditionDeclaration()
1012 tok::l_brace, tok::identifier); in TentativeParseCCC()
1396 bool isFollowedByBrace = Tok.is(tok::l_brace); in isCXXDeclarationSpecifier()
1438 if (getLangOpts().CPlusPlus11 && NextToken().is(tok::l_brace)) in isCXXDeclarationSpecifier()
1455 bool isFollowedByBrace = Tok.is(tok::l_brace); in isCXXDeclarationSpecifier()
1609 tok::l_brace, tok::kw_try, tok::equal, tok::arrow) || in isCXXFunctionDeclarator()
DParseExprCXX.cpp231 if (NextKind == tok::l_brace) { in ParseOptionalCXXScopeSpecifier()
449 if (Next.is(tok::coloncolon) && GetLookAheadToken(2).is(tok::l_brace)) { in ParseOptionalCXXScopeSpecifier()
724 SkipUntil(tok::l_brace, StopAtSemi); in ParseLambdaExpression()
898 } else if (Tok.isOneOf(tok::l_brace, tok::equal)) { in ParseLambdaIntroducer()
912 } else if (Tok.is(tok::l_brace)) { in ParseLambdaIntroducer()
913 BalancedDelimiterTracker Braces(*this, tok::l_brace); in ParseLambdaIntroducer()
1242 if (!Tok.is(tok::l_brace)) { in ParseLambdaExpressionAfterIntroducer()
1571 ExprResult Expr = Tok.is(tok::l_brace) ? ParseBraceInitializer() in ParseCoyieldExpression()
1607 (getLangOpts().CPlusPlus11 && Tok.is(tok::l_brace))) in ParseCXXTypeConstructExpression()
1610 if (Tok.is(tok::l_brace)) { in ParseCXXTypeConstructExpression()
[all …]
DParseExpr.cpp230 if (K == tok::l_brace || K == tok::r_brace || in isNotExpressionStart()
361 if (getLangOpts().CPlusPlus11 && Tok.is(tok::l_brace)) { in ParseRHSOfBinaryExpression()
854 tok::l_brace)) { in ParseCastExpression()
1179 (!getLangOpts().CPlusPlus11 || Tok.isNot(tok::l_brace))) in ParseCastExpression()
1183 if (Tok.is(tok::l_brace)) in ParseCastExpression()
1412 if (getLangOpts().CPlusPlus11 && Tok.is(tok::l_brace)) { in ParsePostfixExpressionSuffix()
2178 if (ExprType >= CompoundStmt && Tok.is(tok::l_brace)) { in ParseParenExpression()
2284 if (Tok.is(tok::l_brace)) { in ParseParenExpression()
2402 assert(Tok.is(tok::l_brace) && "Not a compound literal!"); in ParseCompoundLiteralExpression()
2622 if (getLangOpts().CPlusPlus11 && Tok.is(tok::l_brace)) { in ParseExpressionList()
[all …]
DParseStmtAsm.cpp371 if (Tok.is(tok::l_brace)) { in ParseMicrosoftAsmStatement()
393 if (!InAsmComment && Tok.is(tok::l_brace)) { in ParseMicrosoftAsmStatement()
480 Diag(LBraceLocs.back(), diag::note_matching) << tok::l_brace; in ParseMicrosoftAsmStatement()
486 Diag(Tok, diag::err_expected) << tok::l_brace; in ParseMicrosoftAsmStatement()
DRAIIObjectsForParser.h373 case tok::l_brace: return P.BraceCount; in getDepth()
393 case tok::l_brace:
DParseDecl.cpp1580 case tok::l_brace: in MightBeDeclarator()
1615 case tok::l_brace: in SkipMalformedDecl()
1620 if (Tok.isOneOf(tok::comma, tok::l_brace, tok::kw_try)) { in SkipMalformedDecl()
1726 Fixit &= Tok.isOneOf(tok::semi, tok::l_brace, tok::kw_try); in ParseDeclGroup()
1772 if (Tok.is(tok::l_brace)) { in ParseDeclGroup()
1793 if (Tok.is(tok::l_brace)) in ParseDeclGroup()
2093 } else if (getLangOpts().CPlusPlus11 && Tok.is(tok::l_brace) && in ParseDeclarationAfterDeclaratorAndAttributes()
2197 tok::comma, tok::equal, tok::kw_asm, tok::l_brace, in isValidAfterIdentifierInDeclarator()
2345 case tok::l_brace: in ParseImplicitInt()
3580 BalancedDelimiterTracker T(*this, tok::l_brace); in ParseStructUnionBody()
[all …]
DParseTemplate.cpp1361 assert(Tok.isOneOf(tok::l_brace, tok::colon, tok::kw_try) && in ParseLateTemplatedFuncDef()
1382 if (Tok.is(tok::l_brace)) { in ParseLateTemplatedFuncDef()
1414 ConsumeAndStoreUntil(tok::l_brace, Toks, /*StopAtSemi=*/false); in LexTemplateFunctionForLateParsing()
/external/llvm/lib/TableGen/
DTGLexer.h37 l_brace, r_brace, // { } enumerator
DTGParser.cpp386 case tgtok::l_brace: in ParseObjectName()
634 if (Lex.getCode() != tgtok::l_brace) in ParseOptionalBitList()
1256 case tgtok::l_brace: { // Value ::= '{' ValueList '}' in ParseSimpleValue()
1476 case tgtok::l_brace: { in ParseValue()
1558 case tgtok::l_brace: in ParseValue()
1793 case tgtok::l_brace: { // '{' RangeList '}' in ParseForeachDeclaration()
1919 if (Lex.getCode() != tgtok::l_brace) in ParseBody()
2078 if (Lex.getCode() != tgtok::l_brace) { in ParseForeach()
2203 if (Lex.getCode() != tgtok::l_brace) { in ParseTopLevelLet()
2286 if (Lex.getCode() != tgtok::l_brace) { in ParseMultiClass()
DTGLexer.cpp109 case '{': return tgtok::l_brace; in LexToken()
/external/clang/lib/Lex/
DPPMacroExpansion.cpp592 } else if (I->is(tok::l_brace)) { in CheckMatchedBrackets()
640 if (I->is(tok::l_brace)) { in GenerateNewArgTokens()
660 if (FoundSeparatorToken && ArgStartIterator->is(tok::l_brace)) { in GenerateNewArgTokens()
/external/bison/tests/
Dexisting.at156 : l_brace statements r_brace opt_semi opt_nls
157 | l_brace r_brace opt_semi opt_nls
174 : l_brace statements r_brace opt_semi opt_nls
175 | l_brace r_brace opt_semi opt_nls
192 | l_brace r_brace
193 | l_brace statements r_brace
370 l_brace

12