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()
135 if (TPR == TPResult::Error) in isCXXSimpleDeclaration()
139 if (TPR == TPResult::Ambiguous) in isCXXSimpleDeclaration()
140 TPR = TPResult::True; in isCXXSimpleDeclaration()
142 assert(TPR == TPResult::True || TPR == TPResult::False); in isCXXSimpleDeclaration()
143 return TPR == TPResult::True; in isCXXSimpleDeclaration()
148 Parser::TPResult Parser::TryConsumeDeclarationSpecifier() { in TryConsumeDeclarationSpecifier()
161 return TPResult::Error; in TryConsumeDeclarationSpecifier()
164 return TPResult::Error; in TryConsumeDeclarationSpecifier()
188 return TPResult::Error; in TryConsumeDeclarationSpecifier()
192 return TPResult::Error; in TryConsumeDeclarationSpecifier()
195 return TPResult::Error; in TryConsumeDeclarationSpecifier()
202 return TPResult::Error; in TryConsumeDeclarationSpecifier()
206 return TPResult::Error; in TryConsumeDeclarationSpecifier()
221 return TPResult::Ambiguous; in TryConsumeDeclarationSpecifier()
232 Parser::TPResult Parser::TryParseSimpleDeclaration(bool AllowForRangeDecl) { in TryParseSimpleDeclaration()
233 if (TryConsumeDeclarationSpecifier() == TPResult::Error) in TryParseSimpleDeclaration()
234 return TPResult::Error; in TryParseSimpleDeclaration()
240 TPResult TPR = isCXXDeclarationSpecifier(); in TryParseSimpleDeclaration()
241 if (TPR == TPResult::Ambiguous) in TryParseSimpleDeclaration()
242 return TPResult::True; in TryParseSimpleDeclaration()
243 if (TPR == TPResult::True || TPR == TPResult::Error) in TryParseSimpleDeclaration()
245 assert(TPR == TPResult::False); in TryParseSimpleDeclaration()
248 TPResult TPR = TryParseInitDeclaratorList(); in TryParseSimpleDeclaration()
249 if (TPR != TPResult::Ambiguous) in TryParseSimpleDeclaration()
253 return TPResult::False; in TryParseSimpleDeclaration()
255 return TPResult::Ambiguous; in TryParseSimpleDeclaration()
285 Parser::TPResult Parser::TryParseInitDeclaratorList() { in TryParseInitDeclaratorList()
288 TPResult TPR = TryParseDeclarator(false/*mayBeAbstract*/); in TryParseInitDeclaratorList()
289 if (TPR != TPResult::Ambiguous) in TryParseInitDeclaratorList()
294 return TPResult::True; in TryParseInitDeclaratorList()
301 return TPResult::Error; in TryParseInitDeclaratorList()
305 return TPResult::True; in TryParseInitDeclaratorList()
323 return TPResult::True; in TryParseInitDeclaratorList()
330 return TPResult::Ambiguous; in TryParseInitDeclaratorList()
364 bool update(TPResult IsDecl) { in update()
366 case TPResult::True: in update()
369 case TPResult::False: in update()
372 case TPResult::Ambiguous: in update()
374 case TPResult::Error: in update()
493 TPResult TPR = isCXXDeclarationSpecifier(); in isCXXTypeId()
494 if (TPR != TPResult::Ambiguous) in isCXXTypeId()
495 return TPR != TPResult::False; // Returns true for TPResult::True or in isCXXTypeId()
514 if (TPR == TPResult::Error) in isCXXTypeId()
515 TPR = TPResult::True; in isCXXTypeId()
517 if (TPR == TPResult::Ambiguous) { in isCXXTypeId()
521 TPR = TPResult::True; in isCXXTypeId()
530 TPR = TPResult::True; in isCXXTypeId()
534 TPR = TPResult::False; in isCXXTypeId()
537 assert(TPR == TPResult::True || TPR == TPResult::False); in isCXXTypeId()
538 return TPR == TPResult::True; in isCXXTypeId()
693 Parser::TPResult Parser::TryParsePtrOperatorSeq() { in TryParsePtrOperatorSeq()
697 return TPResult::Error; in TryParsePtrOperatorSeq()
708 return TPResult::True; in TryParsePtrOperatorSeq()
731 Parser::TPResult Parser::TryParseOperatorId() { in TryParseOperatorId()
743 return TPResult::True; in TryParseOperatorId()
750 return TPResult::True; in TryParseOperatorId()
756 return TPResult::True; in TryParseOperatorId()
764 return TPResult::True; in TryParseOperatorId()
784 return TPResult::Error; in TryParseOperatorId()
786 return TPResult::True; in TryParseOperatorId()
792 TPResult TPR = isCXXDeclarationSpecifier(); in TryParseOperatorId()
793 if (TPR == TPResult::Error) in TryParseOperatorId()
795 if (TPR == TPResult::False) { in TryParseOperatorId()
797 return TPResult::Error; in TryParseOperatorId()
800 if (TryConsumeDeclarationSpecifier() == TPResult::Error) in TryParseOperatorId()
801 return TPResult::Error; in TryParseOperatorId()
860 Parser::TPResult Parser::TryParseDeclarator(bool mayBeAbstract, in TryParseDeclarator()
865 if (TryParsePtrOperatorSeq() == TPResult::Error) in TryParseDeclarator()
866 return TPResult::Error; in TryParseDeclarator()
883 if (TryParseOperatorId() == TPResult::Error) in TryParseDeclarator()
884 return TPResult::Error; in TryParseDeclarator()
896 TPResult TPR = TryParseFunctionDeclarator(); in TryParseDeclarator()
897 if (TPR != TPResult::Ambiguous) in TryParseDeclarator()
906 return TPResult::True; // attributes indicate declaration in TryParseDeclarator()
907 TPResult TPR = TryParseDeclarator(mayBeAbstract, mayHaveIdentifier); in TryParseDeclarator()
908 if (TPR != TPResult::Ambiguous) in TryParseDeclarator()
911 return TPResult::False; in TryParseDeclarator()
915 return TPResult::False; in TryParseDeclarator()
919 TPResult TPR(TPResult::Ambiguous); in TryParseDeclarator()
945 if (TPR != TPResult::Ambiguous) in TryParseDeclarator()
949 return TPResult::Ambiguous; in TryParseDeclarator()
952 Parser::TPResult
1012 return TPResult::True; in isExpressionOrTypeSpecifierSimple()
1063 return TPResult::False; in isExpressionOrTypeSpecifierSimple()
1069 return TPResult::Ambiguous; in isExpressionOrTypeSpecifierSimple()
1205 Parser::TPResult
1206 Parser::isCXXDeclarationSpecifier(Parser::TPResult BracedCastResult, in isCXXDeclarationSpecifier()
1213 return TPResult::True; in isCXXDeclarationSpecifier()
1218 return TPResult::True; in isCXXDeclarationSpecifier()
1228 return TPResult::Error; in isCXXDeclarationSpecifier()
1230 return TPResult::False; in isCXXDeclarationSpecifier()
1234 return GreaterThanIsOperator ? TPResult::True : TPResult::False; in isCXXDeclarationSpecifier()
1236 return HasMissingTypename ? TPResult::Ambiguous : TPResult::False; in isCXXDeclarationSpecifier()
1248 return TPResult::Error; in isCXXDeclarationSpecifier()
1253 return TPResult::False; in isCXXDeclarationSpecifier()
1264 return TPResult::Error; in isCXXDeclarationSpecifier()
1271 return TPResult::False; in isCXXDeclarationSpecifier()
1279 return TPResult::Error; in isCXXDeclarationSpecifier()
1339 return TPResult::True; in isCXXDeclarationSpecifier()
1359 return TPResult::True; in isCXXDeclarationSpecifier()
1363 return TPResult::True; in isCXXDeclarationSpecifier()
1367 return TPResult::True; in isCXXDeclarationSpecifier()
1372 return TPResult::False; in isCXXDeclarationSpecifier()
1382 return TPResult::Error; in isCXXDeclarationSpecifier()
1396 TPResult TPR = TPResult::False; in isCXXDeclarationSpecifier()
1402 TPR == TPResult::True || TPR == TPResult::Error) in isCXXDeclarationSpecifier()
1403 return TPResult::Error; in isCXXDeclarationSpecifier()
1409 return TPResult::Ambiguous; in isCXXDeclarationSpecifier()
1418 return TPResult::Error; in isCXXDeclarationSpecifier()
1420 return TPResult::False; in isCXXDeclarationSpecifier()
1424 return GreaterThanIsOperator ? TPResult::True : TPResult::False; in isCXXDeclarationSpecifier()
1426 return HasMissingTypename ? TPResult::Ambiguous in isCXXDeclarationSpecifier()
1427 : TPResult::False; in isCXXDeclarationSpecifier()
1437 return TPResult::False; in isCXXDeclarationSpecifier()
1467 TPResult TPR = TryParseProtocolQualifiers(); in isCXXDeclarationSpecifier()
1471 if (TPR == TPResult::Error) in isCXXDeclarationSpecifier()
1472 return TPResult::Error; in isCXXDeclarationSpecifier()
1475 return TPResult::Ambiguous; in isCXXDeclarationSpecifier()
1480 return TPResult::True; in isCXXDeclarationSpecifier()
1502 return TPResult::Ambiguous; in isCXXDeclarationSpecifier()
1514 return TPResult::False; in isCXXDeclarationSpecifier()
1516 return TPResult::True; in isCXXDeclarationSpecifier()
1521 return TPResult::True; in isCXXDeclarationSpecifier()
1525 TPResult TPR = TryParseTypeofSpecifier(); in isCXXDeclarationSpecifier()
1529 if (TPR == TPResult::Error) in isCXXDeclarationSpecifier()
1530 return TPResult::Error; in isCXXDeclarationSpecifier()
1533 return TPResult::Ambiguous; in isCXXDeclarationSpecifier()
1538 return TPResult::True; in isCXXDeclarationSpecifier()
1543 return TPResult::True; in isCXXDeclarationSpecifier()
1547 return TPResult::True; in isCXXDeclarationSpecifier()
1550 return TPResult::False; in isCXXDeclarationSpecifier()
1610 Parser::TPResult Parser::TryParseTypeofSpecifier() { in TryParseTypeofSpecifier()
1618 return TPResult::Error; in TryParseTypeofSpecifier()
1620 return TPResult::Ambiguous; in TryParseTypeofSpecifier()
1625 Parser::TPResult Parser::TryParseProtocolQualifiers() { in TryParseProtocolQualifiers()
1630 return TPResult::Error; in TryParseProtocolQualifiers()
1640 return TPResult::Ambiguous; in TryParseProtocolQualifiers()
1644 return TPResult::Error; in TryParseProtocolQualifiers()
1672 TPResult TPR = TryParseParameterDeclarationClause(&InvalidAsDeclaration); in isCXXFunctionDeclarator()
1673 if (TPR == TPResult::Ambiguous) { in isCXXFunctionDeclarator()
1675 TPR = TPResult::False; in isCXXFunctionDeclarator()
1685 TPR = TPResult::True; in isCXXFunctionDeclarator()
1688 TPR = TPResult::False; in isCXXFunctionDeclarator()
1692 if (IsAmbiguous && TPR == TPResult::Ambiguous) in isCXXFunctionDeclarator()
1696 return TPR != TPResult::False; in isCXXFunctionDeclarator()
1716 Parser::TPResult
1721 return TPResult::Ambiguous; in TryParseParameterDeclarationClause()
1735 return TPResult::True; // '...)' is a sign of a function declarator. in TryParseParameterDeclarationClause()
1737 return TPResult::False; in TryParseParameterDeclarationClause()
1743 return TPResult::True; in TryParseParameterDeclarationClause()
1751 TPResult TPR = isCXXDeclarationSpecifier(TPResult::False, in TryParseParameterDeclarationClause()
1754 if (VersusTemplateArgument && TPR == TPResult::True) { in TryParseParameterDeclarationClause()
1760 if (TryConsumeDeclarationSpecifier() == TPResult::Error) in TryParseParameterDeclarationClause()
1761 return TPResult::Error; in TryParseParameterDeclarationClause()
1765 return TPResult::True; in TryParseParameterDeclarationClause()
1767 TPR = isCXXDeclarationSpecifier(TPResult::False, in TryParseParameterDeclarationClause()
1769 if (TPR == TPResult::Error) in TryParseParameterDeclarationClause()
1771 } while (TPR != TPResult::False); in TryParseParameterDeclarationClause()
1772 } else if (TPR == TPResult::Ambiguous) { in TryParseParameterDeclarationClause()
1774 if (TryConsumeDeclarationSpecifier() == TPResult::Error) in TryParseParameterDeclarationClause()
1775 return TPResult::Error; in TryParseParameterDeclarationClause()
1782 if (TPR != TPResult::Ambiguous) in TryParseParameterDeclarationClause()
1787 return TPResult::True; in TryParseParameterDeclarationClause()
1800 return Tok.isOneOf(tok::equal, tok::r_paren) ? TPResult::True in TryParseParameterDeclarationClause()
1801 : TPResult::False; in TryParseParameterDeclarationClause()
1808 return TPResult::Error; in TryParseParameterDeclarationClause()
1814 return TPResult::True; // '...)' is a sign of a function declarator. in TryParseParameterDeclarationClause()
1816 return TPResult::False; in TryParseParameterDeclarationClause()
1823 return TPResult::Ambiguous; in TryParseParameterDeclarationClause()
1838 Parser::TPResult Parser::TryParseFunctionDeclarator() { in TryParseFunctionDeclarator()
1842 TPResult TPR = TryParseParameterDeclarationClause(); in TryParseFunctionDeclarator()
1843 if (TPR == TPResult::Ambiguous && Tok.isNot(tok::r_paren)) in TryParseFunctionDeclarator()
1844 TPR = TPResult::False; in TryParseFunctionDeclarator()
1846 if (TPR == TPResult::False || TPR == TPResult::Error) in TryParseFunctionDeclarator()
1851 return TPResult::Error; in TryParseFunctionDeclarator()
1865 return TPResult::Error; in TryParseFunctionDeclarator()
1870 return TPResult::Error; in TryParseFunctionDeclarator()
1879 return TPResult::Error; in TryParseFunctionDeclarator()
1883 return TPResult::Ambiguous; in TryParseFunctionDeclarator()
1888 Parser::TPResult Parser::TryParseBracketDeclarator() { in TryParseBracketDeclarator()
1891 return TPResult::Error; in TryParseBracketDeclarator()
1893 return TPResult::Ambiguous; in TryParseBracketDeclarator()