Lines Matching refs:TPResult
104 // isCXXDeclarationSpecifier will return TPResult::Ambiguous() only in such
108 TPResult TPR = isCXXDeclarationSpecifier(TPResult::False(),
110 if (TPR != TPResult::Ambiguous())
111 return TPR != TPResult::False(); // Returns true for TPResult::True() or
112 // TPResult::Error().
134 if (TPR == TPResult::Error())
138 if (TPR == TPResult::Ambiguous())
139 TPR = TPResult::True();
141 assert(TPR == TPResult::True() || TPR == TPResult::False());
142 return TPR == TPResult::True();
153 Parser::TPResult Parser::TryParseSimpleDeclaration(bool AllowForRangeDecl) {
169 TPResult TPR = isCXXDeclarationSpecifier();
170 if (TPR == TPResult::Ambiguous())
171 return TPResult::True();
172 if (TPR == TPResult::True() || TPR == TPResult::Error())
174 assert(TPR == TPResult::False());
177 TPResult TPR = TryParseInitDeclaratorList();
178 if (TPR != TPResult::Ambiguous())
182 return TPResult::False();
184 return TPResult::Ambiguous();
214 Parser::TPResult Parser::TryParseInitDeclaratorList() {
217 TPResult TPR = TryParseDeclarator(false/*mayBeAbstract*/);
218 if (TPR != TPResult::Ambiguous())
223 return TPResult::True();
230 return TPResult::Error();
234 return TPResult::True();
250 return TPResult::True();
258 return TPResult::Ambiguous();
275 TPResult TPR = isCXXDeclarationSpecifier();
276 if (TPR != TPResult::Ambiguous())
277 return TPR != TPResult::False(); // Returns true for TPResult::True() or
278 // TPResult::Error().
303 if (TPR == TPResult::Error())
304 TPR = TPResult::True();
306 if (TPR == TPResult::Ambiguous()) {
311 TPR = TPResult::True();
313 TPR = TPResult::True();
315 TPR = TPResult::False();
320 assert(TPR == TPResult::True() || TPR == TPResult::False());
321 return TPR == TPResult::True();
352 TPResult TPR = isCXXDeclarationSpecifier();
353 if (TPR != TPResult::Ambiguous())
354 return TPR != TPResult::False(); // Returns true for TPResult::True() or
355 // TPResult::Error().
381 if (TPR == TPResult::Error())
382 TPR = TPResult::True();
384 if (TPR == TPResult::Ambiguous()) {
388 TPR = TPResult::True();
397 TPR = TPResult::True();
401 TPR = TPResult::False();
406 assert(TPR == TPResult::True() || TPR == TPResult::False());
407 return TPR == TPResult::True();
623 Parser::TPResult Parser::TryParseDeclarator(bool mayBeAbstract,
632 return TPResult::Error();
671 TPResult TPR = TryParseFunctionDeclarator();
672 if (TPR != TPResult::Ambiguous())
685 return TPResult::True(); // attributes indicate declaration
686 TPResult TPR = TryParseDeclarator(mayBeAbstract, mayHaveIdentifier);
687 if (TPR != TPResult::Ambiguous())
690 return TPResult::False();
694 return TPResult::False();
698 TPResult TPR(TPResult::Ambiguous());
724 if (TPR != TPResult::Ambiguous())
728 return TPResult::Ambiguous();
731 Parser::TPResult
811 return TPResult::True();
864 return TPResult::False();
870 return TPResult::Ambiguous();
879 /// isCXXDeclarationSpecifier - Returns TPResult::True() if it is a declaration
880 /// specifier, TPResult::False() if it is not, TPResult::Ambiguous() if it could
881 /// be either a decl-specifier or a function-style cast, and TPResult::Error()
888 /// parse error) should be treated as types. Returns TPResult::Ambiguous() in
984 Parser::TPResult
985 Parser::isCXXDeclarationSpecifier(Parser::TPResult BracedCastResult,
992 return TPResult::True();
997 return TPResult::True();
1010 return TPResult::Error();
1012 return TPResult::False();
1016 return GreaterThanIsOperator ? TPResult::True() : TPResult::False();
1018 return HasMissingTypename ? TPResult::Ambiguous() : TPResult::False();
1030 return TPResult::Error();
1035 return TPResult::False();
1046 return TPResult::Error();
1053 return TPResult::False();
1060 return TPResult::Error();
1116 return TPResult::True();
1131 return TPResult::True();
1135 return TPResult::True();
1139 return TPResult::True();
1144 return TPResult::False();
1154 return TPResult::Error();
1168 TPResult TPR = TPResult::False();
1175 TPR == TPResult::True() || TPR == TPResult::Error())
1176 return TPResult::Error();
1182 return TPResult::Ambiguous();
1189 return TPResult::Error();
1191 return TPResult::False();
1195 return GreaterThanIsOperator ? TPResult::True() : TPResult::False();
1197 return HasMissingTypename ? TPResult::Ambiguous()
1198 : TPResult::False();
1208 return TPResult::False();
1238 TPResult TPR = TryParseProtocolQualifiers();
1244 if (TPR == TPResult::Error())
1245 return TPResult::Error();
1248 return TPResult::Ambiguous();
1253 return TPResult::True();
1274 return TPResult::Ambiguous();
1286 return TPResult::False();
1288 return TPResult::True();
1293 return TPResult::True();
1297 TPResult TPR = TryParseTypeofSpecifier();
1303 if (TPR == TPResult::Error())
1304 return TPResult::Error();
1307 return TPResult::Ambiguous();
1312 return TPResult::True();
1317 return TPResult::True();
1321 return TPResult::True();
1324 return TPResult::False();
1332 Parser::TPResult Parser::TryParseTypeofSpecifier() {
1340 return TPResult::Error();
1342 return TPResult::Ambiguous();
1347 Parser::TPResult Parser::TryParseProtocolQualifiers() {
1352 return TPResult::Error();
1362 return TPResult::Ambiguous();
1366 return TPResult::Error();
1369 Parser::TPResult
1371 TPResult TPR = isCXXDeclarationSpecifier(TPResult::False(),
1373 if (TPR != TPResult::Ambiguous())
1387 return TPResult::Ambiguous();
1415 TPResult TPR = TryParseParameterDeclarationClause(&InvalidAsDeclaration);
1416 if (TPR == TPResult::Ambiguous()) {
1418 TPR = TPResult::False();
1430 TPR = TPResult::True();
1433 TPR = TPResult::False();
1439 if (IsAmbiguous && TPR == TPResult::Ambiguous())
1443 return TPR != TPResult::False();
1463 Parser::TPResult
1467 return TPResult::Ambiguous();
1481 return TPResult::True(); // '...)' is a sign of a function declarator.
1483 return TPResult::False();
1489 return TPResult::True();
1497 TPResult TPR = TryParseDeclarationSpecifier(InvalidAsDeclaration);
1498 if (TPR != TPResult::Ambiguous())
1504 if (TPR != TPResult::Ambiguous())
1509 return TPResult::True();
1516 return TPResult::Error();
1522 return TPResult::True(); // '...)' is a sign of a function declarator.
1524 return TPResult::False();
1532 return TPResult::Ambiguous();
1538 /// return TPResult::Ambiguous(), otherwise it will return either False() or
1547 Parser::TPResult Parser::TryParseFunctionDeclarator() {
1551 TPResult TPR = TryParseParameterDeclarationClause();
1552 if (TPR == TPResult::Ambiguous() && Tok.isNot(tok::r_paren))
1553 TPR = TPResult::False();
1555 if (TPR == TPResult::False() || TPR == TPResult::Error())
1560 return TPResult::Error();
1576 return TPResult::Error();
1581 return TPResult::Error();
1590 return TPResult::Error();
1594 return TPResult::Ambiguous();
1599 Parser::TPResult Parser::TryParseBracketDeclarator() {
1602 return TPResult::Error();
1604 return TPResult::Ambiguous();