Lines Matching refs:TPResult
108 TPResult TPR = isCXXDeclarationSpecifier(TPResult::False, in isCXXSimpleDeclaration()
110 if (TPR != TPResult::Ambiguous) in isCXXSimpleDeclaration()
111 return TPR != TPResult::False; // Returns true for TPResult::True or in isCXXSimpleDeclaration()
134 if (TPR == TPResult::Error) in isCXXSimpleDeclaration()
138 if (TPR == TPResult::Ambiguous) in isCXXSimpleDeclaration()
139 TPR = TPResult::True; in isCXXSimpleDeclaration()
141 assert(TPR == TPResult::True || TPR == TPResult::False); in isCXXSimpleDeclaration()
142 return TPR == TPResult::True; in isCXXSimpleDeclaration()
147 Parser::TPResult Parser::TryConsumeDeclarationSpecifier() { in TryConsumeDeclarationSpecifier()
160 return TPResult::Error; in TryConsumeDeclarationSpecifier()
163 return TPResult::Error; in TryConsumeDeclarationSpecifier()
187 return TPResult::Error; in TryConsumeDeclarationSpecifier()
191 return TPResult::Error; in TryConsumeDeclarationSpecifier()
194 return TPResult::Error; in TryConsumeDeclarationSpecifier()
201 return TPResult::Error; in TryConsumeDeclarationSpecifier()
205 return TPResult::Error; in TryConsumeDeclarationSpecifier()
220 return TPResult::Ambiguous; in TryConsumeDeclarationSpecifier()
231 Parser::TPResult Parser::TryParseSimpleDeclaration(bool AllowForRangeDecl) { in TryParseSimpleDeclaration()
232 if (TryConsumeDeclarationSpecifier() == TPResult::Error) in TryParseSimpleDeclaration()
233 return TPResult::Error; in TryParseSimpleDeclaration()
239 TPResult TPR = isCXXDeclarationSpecifier(); in TryParseSimpleDeclaration()
240 if (TPR == TPResult::Ambiguous) in TryParseSimpleDeclaration()
241 return TPResult::True; in TryParseSimpleDeclaration()
242 if (TPR == TPResult::True || TPR == TPResult::Error) in TryParseSimpleDeclaration()
244 assert(TPR == TPResult::False); in TryParseSimpleDeclaration()
247 TPResult TPR = TryParseInitDeclaratorList(); in TryParseSimpleDeclaration()
248 if (TPR != TPResult::Ambiguous) in TryParseSimpleDeclaration()
252 return TPResult::False; in TryParseSimpleDeclaration()
254 return TPResult::Ambiguous; in TryParseSimpleDeclaration()
284 Parser::TPResult Parser::TryParseInitDeclaratorList() { in TryParseInitDeclaratorList()
287 TPResult TPR = TryParseDeclarator(false/*mayBeAbstract*/); in TryParseInitDeclaratorList()
288 if (TPR != TPResult::Ambiguous) in TryParseInitDeclaratorList()
293 return TPResult::True; in TryParseInitDeclaratorList()
300 return TPResult::Error; in TryParseInitDeclaratorList()
304 return TPResult::True; in TryParseInitDeclaratorList()
322 return TPResult::True; in TryParseInitDeclaratorList()
329 return TPResult::Ambiguous; in TryParseInitDeclaratorList()
346 TPResult TPR = isCXXDeclarationSpecifier(); in isCXXConditionDeclaration()
347 if (TPR != TPResult::Ambiguous) in isCXXConditionDeclaration()
348 return TPR != TPResult::False; // Returns true for TPResult::True or in isCXXConditionDeclaration()
367 if (TPR == TPResult::Error) in isCXXConditionDeclaration()
368 TPR = TPResult::True; in isCXXConditionDeclaration()
370 if (TPR == TPResult::Ambiguous) { in isCXXConditionDeclaration()
375 TPR = TPResult::True; in isCXXConditionDeclaration()
377 TPR = TPResult::True; in isCXXConditionDeclaration()
379 TPR = TPResult::False; in isCXXConditionDeclaration()
384 assert(TPR == TPResult::True || TPR == TPResult::False); in isCXXConditionDeclaration()
385 return TPR == TPResult::True; in isCXXConditionDeclaration()
416 TPResult TPR = isCXXDeclarationSpecifier(); in isCXXTypeId()
417 if (TPR != TPResult::Ambiguous) in isCXXTypeId()
418 return TPR != TPResult::False; // Returns true for TPResult::True or in isCXXTypeId()
437 if (TPR == TPResult::Error) in isCXXTypeId()
438 TPR = TPResult::True; in isCXXTypeId()
440 if (TPR == TPResult::Ambiguous) { in isCXXTypeId()
444 TPR = TPResult::True; in isCXXTypeId()
453 TPR = TPResult::True; in isCXXTypeId()
457 TPR = TPResult::False; in isCXXTypeId()
462 assert(TPR == TPResult::True || TPR == TPResult::False); in isCXXTypeId()
463 return TPR == TPResult::True; in isCXXTypeId()
625 Parser::TPResult Parser::TryParsePtrOperatorSeq() { in TryParsePtrOperatorSeq()
629 return TPResult::Error; in TryParsePtrOperatorSeq()
641 return TPResult::True; in TryParsePtrOperatorSeq()
664 Parser::TPResult Parser::TryParseOperatorId() { in TryParseOperatorId()
676 return TPResult::True; in TryParseOperatorId()
683 return TPResult::True; in TryParseOperatorId()
689 return TPResult::True; in TryParseOperatorId()
697 return TPResult::True; in TryParseOperatorId()
717 return TPResult::Error; in TryParseOperatorId()
719 return TPResult::True; in TryParseOperatorId()
725 TPResult TPR = isCXXDeclarationSpecifier(); in TryParseOperatorId()
726 if (TPR == TPResult::Error) in TryParseOperatorId()
728 if (TPR == TPResult::False) { in TryParseOperatorId()
730 return TPResult::Error; in TryParseOperatorId()
733 if (TryConsumeDeclarationSpecifier() == TPResult::Error) in TryParseOperatorId()
734 return TPResult::Error; in TryParseOperatorId()
793 Parser::TPResult Parser::TryParseDeclarator(bool mayBeAbstract, in TryParseDeclarator()
798 if (TryParsePtrOperatorSeq() == TPResult::Error) in TryParseDeclarator()
799 return TPResult::Error; in TryParseDeclarator()
816 if (TryParseOperatorId() == TPResult::Error) in TryParseDeclarator()
817 return TPResult::Error; in TryParseDeclarator()
829 TPResult TPR = TryParseFunctionDeclarator(); in TryParseDeclarator()
830 if (TPR != TPResult::Ambiguous) in TryParseDeclarator()
844 return TPResult::True; // attributes indicate declaration in TryParseDeclarator()
845 TPResult TPR = TryParseDeclarator(mayBeAbstract, mayHaveIdentifier); in TryParseDeclarator()
846 if (TPR != TPResult::Ambiguous) in TryParseDeclarator()
849 return TPResult::False; in TryParseDeclarator()
853 return TPResult::False; in TryParseDeclarator()
857 TPResult TPR(TPResult::Ambiguous); in TryParseDeclarator()
883 if (TPR != TPResult::Ambiguous) in TryParseDeclarator()
887 return TPResult::Ambiguous; in TryParseDeclarator()
890 Parser::TPResult
950 return TPResult::True; in isExpressionOrTypeSpecifierSimple()
998 return TPResult::False; in isExpressionOrTypeSpecifierSimple()
1004 return TPResult::Ambiguous; in isExpressionOrTypeSpecifierSimple()
1140 Parser::TPResult
1141 Parser::isCXXDeclarationSpecifier(Parser::TPResult BracedCastResult, in isCXXDeclarationSpecifier()
1148 return TPResult::True; in isCXXDeclarationSpecifier()
1153 return TPResult::True; in isCXXDeclarationSpecifier()
1163 return TPResult::Error; in isCXXDeclarationSpecifier()
1165 return TPResult::False; in isCXXDeclarationSpecifier()
1169 return GreaterThanIsOperator ? TPResult::True : TPResult::False; in isCXXDeclarationSpecifier()
1171 return HasMissingTypename ? TPResult::Ambiguous : TPResult::False; in isCXXDeclarationSpecifier()
1183 return TPResult::Error; in isCXXDeclarationSpecifier()
1188 return TPResult::False; in isCXXDeclarationSpecifier()
1199 return TPResult::Error; in isCXXDeclarationSpecifier()
1206 return TPResult::False; in isCXXDeclarationSpecifier()
1214 return TPResult::Error; in isCXXDeclarationSpecifier()
1271 return TPResult::True; in isCXXDeclarationSpecifier()
1287 return TPResult::True; in isCXXDeclarationSpecifier()
1291 return TPResult::True; in isCXXDeclarationSpecifier()
1295 return TPResult::True; in isCXXDeclarationSpecifier()
1300 return TPResult::False; in isCXXDeclarationSpecifier()
1310 return TPResult::Error; in isCXXDeclarationSpecifier()
1324 TPResult TPR = TPResult::False; in isCXXDeclarationSpecifier()
1331 TPR == TPResult::True || TPR == TPResult::Error) in isCXXDeclarationSpecifier()
1332 return TPResult::Error; in isCXXDeclarationSpecifier()
1338 return TPResult::Ambiguous; in isCXXDeclarationSpecifier()
1345 return TPResult::Error; in isCXXDeclarationSpecifier()
1347 return TPResult::False; in isCXXDeclarationSpecifier()
1351 return GreaterThanIsOperator ? TPResult::True : TPResult::False; in isCXXDeclarationSpecifier()
1353 return HasMissingTypename ? TPResult::Ambiguous in isCXXDeclarationSpecifier()
1354 : TPResult::False; in isCXXDeclarationSpecifier()
1364 return TPResult::False; in isCXXDeclarationSpecifier()
1394 TPResult TPR = TryParseProtocolQualifiers(); in isCXXDeclarationSpecifier()
1400 if (TPR == TPResult::Error) in isCXXDeclarationSpecifier()
1401 return TPResult::Error; in isCXXDeclarationSpecifier()
1404 return TPResult::Ambiguous; in isCXXDeclarationSpecifier()
1409 return TPResult::True; in isCXXDeclarationSpecifier()
1430 return TPResult::Ambiguous; in isCXXDeclarationSpecifier()
1442 return TPResult::False; in isCXXDeclarationSpecifier()
1444 return TPResult::True; in isCXXDeclarationSpecifier()
1449 return TPResult::True; in isCXXDeclarationSpecifier()
1453 TPResult TPR = TryParseTypeofSpecifier(); in isCXXDeclarationSpecifier()
1459 if (TPR == TPResult::Error) in isCXXDeclarationSpecifier()
1460 return TPResult::Error; in isCXXDeclarationSpecifier()
1463 return TPResult::Ambiguous; in isCXXDeclarationSpecifier()
1468 return TPResult::True; in isCXXDeclarationSpecifier()
1473 return TPResult::True; in isCXXDeclarationSpecifier()
1477 return TPResult::True; in isCXXDeclarationSpecifier()
1480 return TPResult::False; in isCXXDeclarationSpecifier()
1538 Parser::TPResult Parser::TryParseTypeofSpecifier() { in TryParseTypeofSpecifier()
1546 return TPResult::Error; in TryParseTypeofSpecifier()
1548 return TPResult::Ambiguous; in TryParseTypeofSpecifier()
1553 Parser::TPResult Parser::TryParseProtocolQualifiers() { in TryParseProtocolQualifiers()
1558 return TPResult::Error; in TryParseProtocolQualifiers()
1568 return TPResult::Ambiguous; in TryParseProtocolQualifiers()
1572 return TPResult::Error; in TryParseProtocolQualifiers()
1600 TPResult TPR = TryParseParameterDeclarationClause(&InvalidAsDeclaration); in isCXXFunctionDeclarator()
1601 if (TPR == TPResult::Ambiguous) { in isCXXFunctionDeclarator()
1603 TPR = TPResult::False; in isCXXFunctionDeclarator()
1615 TPR = TPResult::True; in isCXXFunctionDeclarator()
1618 TPR = TPResult::False; in isCXXFunctionDeclarator()
1624 if (IsAmbiguous && TPR == TPResult::Ambiguous) in isCXXFunctionDeclarator()
1628 return TPR != TPResult::False; in isCXXFunctionDeclarator()
1648 Parser::TPResult
1653 return TPResult::Ambiguous; in TryParseParameterDeclarationClause()
1667 return TPResult::True; // '...)' is a sign of a function declarator. in TryParseParameterDeclarationClause()
1669 return TPResult::False; in TryParseParameterDeclarationClause()
1675 return TPResult::True; in TryParseParameterDeclarationClause()
1683 TPResult TPR = isCXXDeclarationSpecifier(TPResult::False, in TryParseParameterDeclarationClause()
1686 if (VersusTemplateArgument && TPR == TPResult::True) { in TryParseParameterDeclarationClause()
1692 if (TryConsumeDeclarationSpecifier() == TPResult::Error) in TryParseParameterDeclarationClause()
1693 return TPResult::Error; in TryParseParameterDeclarationClause()
1697 return TPResult::True; in TryParseParameterDeclarationClause()
1699 TPR = isCXXDeclarationSpecifier(TPResult::False, in TryParseParameterDeclarationClause()
1701 if (TPR == TPResult::Error) in TryParseParameterDeclarationClause()
1703 } while (TPR != TPResult::False); in TryParseParameterDeclarationClause()
1704 } else if (TPR == TPResult::Ambiguous) { in TryParseParameterDeclarationClause()
1706 if (TryConsumeDeclarationSpecifier() == TPResult::Error) in TryParseParameterDeclarationClause()
1707 return TPResult::Error; in TryParseParameterDeclarationClause()
1714 if (TPR != TPResult::Ambiguous) in TryParseParameterDeclarationClause()
1719 return TPResult::True; in TryParseParameterDeclarationClause()
1732 return (Tok.is(tok::equal) || Tok.is(tok::r_paren)) ? TPResult::True in TryParseParameterDeclarationClause()
1733 : TPResult::False; in TryParseParameterDeclarationClause()
1740 return TPResult::Error; in TryParseParameterDeclarationClause()
1746 return TPResult::True; // '...)' is a sign of a function declarator. in TryParseParameterDeclarationClause()
1748 return TPResult::False; in TryParseParameterDeclarationClause()
1755 return TPResult::Ambiguous; in TryParseParameterDeclarationClause()
1770 Parser::TPResult Parser::TryParseFunctionDeclarator() { in TryParseFunctionDeclarator()
1774 TPResult TPR = TryParseParameterDeclarationClause(); in TryParseFunctionDeclarator()
1775 if (TPR == TPResult::Ambiguous && Tok.isNot(tok::r_paren)) in TryParseFunctionDeclarator()
1776 TPR = TPResult::False; in TryParseFunctionDeclarator()
1778 if (TPR == TPResult::False || TPR == TPResult::Error) in TryParseFunctionDeclarator()
1783 return TPResult::Error; in TryParseFunctionDeclarator()
1799 return TPResult::Error; in TryParseFunctionDeclarator()
1804 return TPResult::Error; in TryParseFunctionDeclarator()
1813 return TPResult::Error; in TryParseFunctionDeclarator()
1817 return TPResult::Ambiguous; in TryParseFunctionDeclarator()
1822 Parser::TPResult Parser::TryParseBracketDeclarator() { in TryParseBracketDeclarator()
1825 return TPResult::Error; in TryParseBracketDeclarator()
1827 return TPResult::Ambiguous; in TryParseBracketDeclarator()