Lines Matching refs:last
40 static const char *parse_type(const char *first, const char *last, C &db);
42 static const char *parse_encoding(const char *first, const char *last, C &db);
44 static const char *parse_name(const char *first, const char *last, C &db,
47 static const char *parse_expression(const char *first, const char *last, C &db);
49 static const char *parse_template_args(const char *first, const char *last,
52 static const char *parse_operator_name(const char *first, const char *last,
55 static const char *parse_unqualified_name(const char *first, const char *last,
58 static const char *parse_decltype(const char *first, const char *last, C &db);
62 static const char *parse_number(const char *first, const char *last) { in parse_number() argument
63 if (first != last) { in parse_number()
67 if (t != last) { in parse_number()
72 while (first != last && std::isdigit(*first)) in parse_number()
116 static const char *parse_floating_number(const char *first, const char *last, in parse_floating_number() argument
119 if (static_cast<std::size_t>(last - first) > N) { in parse_floating_number()
120 last = first + N; in parse_floating_number()
127 for (; t != last; ++t, ++e) { in parse_floating_number()
155 static const char *parse_source_name(const char *first, const char *last, in parse_source_name() argument
157 if (first != last) { in parse_source_name()
159 if (isdigit(c) && first + 1 != last) { in parse_source_name()
164 if (++t == last) in parse_source_name()
167 if (static_cast<size_t>(last - t) >= n) { in parse_source_name()
192 static const char *parse_substitution(const char *first, const char *last, in parse_substitution() argument
194 if (last - first >= 2) { in parse_substitution()
236 for (++t; t != last && (std::isdigit(*t) || std::isupper(*t)); ++t) { in parse_substitution()
243 if (t == last || *t != '_') in parse_substitution()
292 static const char *parse_builtin_type(const char *first, const char *last, in parse_builtin_type() argument
294 if (first != last) { in parse_builtin_type()
381 const char *t = parse_source_name(first + 1, last, db); in parse_builtin_type()
386 if (first + 1 != last) { in parse_builtin_type()
434 static const char *parse_cv_qualifiers(const char *first, const char *last, in parse_cv_qualifiers() argument
437 if (first != last) { in parse_cv_qualifiers()
458 static const char *parse_template_param(const char *first, const char *last, in parse_template_param() argument
460 if (last - first >= 2) { in parse_template_param()
477 for (++t; t != last && isdigit(*t); ++t) { in parse_template_param()
481 if (t == last || *t != '_' || db.template_param.empty()) in parse_template_param()
503 static const char *parse_const_cast_expr(const char *first, const char *last, in parse_const_cast_expr() argument
505 if (last - first >= 3 && first[0] == 'c' && first[1] == 'c') { in parse_const_cast_expr()
506 const char *t = parse_type(first + 2, last, db); in parse_const_cast_expr()
508 const char *t1 = parse_expression(t, last, db); in parse_const_cast_expr()
529 static const char *parse_dynamic_cast_expr(const char *first, const char *last, in parse_dynamic_cast_expr() argument
531 if (last - first >= 3 && first[0] == 'd' && first[1] == 'c') { in parse_dynamic_cast_expr()
532 const char *t = parse_type(first + 2, last, db); in parse_dynamic_cast_expr()
534 const char *t1 = parse_expression(t, last, db); in parse_dynamic_cast_expr()
556 const char *last, C &db) { in parse_reinterpret_cast_expr() argument
557 if (last - first >= 3 && first[0] == 'r' && first[1] == 'c') { in parse_reinterpret_cast_expr()
558 const char *t = parse_type(first + 2, last, db); in parse_reinterpret_cast_expr()
560 const char *t1 = parse_expression(t, last, db); in parse_reinterpret_cast_expr()
581 static const char *parse_static_cast_expr(const char *first, const char *last, in parse_static_cast_expr() argument
583 if (last - first >= 3 && first[0] == 's' && first[1] == 'c') { in parse_static_cast_expr()
584 const char *t = parse_type(first + 2, last, db); in parse_static_cast_expr()
586 const char *t1 = parse_expression(t, last, db); in parse_static_cast_expr()
604 static const char *parse_pack_expansion(const char *first, const char *last, in parse_pack_expansion() argument
606 if (last - first >= 3 && first[0] == 's' && first[1] == 'p') { in parse_pack_expansion()
607 const char *t = parse_expression(first + 2, last, db); in parse_pack_expansion()
617 static const char *parse_sizeof_type_expr(const char *first, const char *last, in parse_sizeof_type_expr() argument
619 if (last - first >= 3 && first[0] == 's' && first[1] == 't') { in parse_sizeof_type_expr()
620 const char *t = parse_type(first + 2, last, db); in parse_sizeof_type_expr()
634 static const char *parse_sizeof_expr_expr(const char *first, const char *last, in parse_sizeof_expr_expr() argument
636 if (last - first >= 3 && first[0] == 's' && first[1] == 'z') { in parse_sizeof_expr_expr()
637 const char *t = parse_expression(first + 2, last, db); in parse_sizeof_expr_expr()
653 const char *last, C &db) { in parse_sizeof_param_pack_expr() argument
654 if (last - first >= 3 && first[0] == 's' && first[1] == 'Z' && in parse_sizeof_param_pack_expr()
657 const char *t = parse_template_param(first + 2, last, db); in parse_sizeof_param_pack_expr()
687 static const char *parse_function_param(const char *first, const char *last, in parse_function_param() argument
689 if (last - first >= 3 && *first == 'f') { in parse_function_param()
692 const char *t = parse_cv_qualifiers(first + 2, last, cv); in parse_function_param()
693 const char *t1 = parse_number(t, last); in parse_function_param()
694 if (t1 != last && *t1 == '_') { in parse_function_param()
700 const char *t0 = parse_number(first + 2, last); in parse_function_param()
701 if (t0 != last && *t0 == 'p') { in parse_function_param()
703 const char *t = parse_cv_qualifiers(t0, last, cv); in parse_function_param()
704 const char *t1 = parse_number(t, last); in parse_function_param()
705 if (t1 != last && *t1 == '_') { in parse_function_param()
720 const char *last, in parse_sizeof_function_param_pack_expr() argument
722 if (last - first >= 3 && first[0] == 's' && first[1] == 'Z' && in parse_sizeof_function_param_pack_expr()
724 const char *t = parse_function_param(first + 2, last, db); in parse_sizeof_function_param_pack_expr()
739 static const char *parse_typeid_expr(const char *first, const char *last, in parse_typeid_expr() argument
741 if (last - first >= 3 && first[0] == 't' && in parse_typeid_expr()
745 t = parse_expression(first + 2, last, db); in parse_typeid_expr()
747 t = parse_type(first + 2, last, db); in parse_typeid_expr()
761 static const char *parse_throw_expr(const char *first, const char *last, in parse_throw_expr() argument
763 if (last - first >= 3 && first[0] == 't' && first[1] == 'w') { in parse_throw_expr()
764 const char *t = parse_expression(first + 2, last, db); in parse_throw_expr()
778 static const char *parse_dot_star_expr(const char *first, const char *last, in parse_dot_star_expr() argument
780 if (last - first >= 3 && first[0] == 'd' && first[1] == 's') { in parse_dot_star_expr()
781 const char *t = parse_expression(first + 2, last, db); in parse_dot_star_expr()
783 const char *t1 = parse_expression(t, last, db); in parse_dot_star_expr()
800 static const char *parse_simple_id(const char *first, const char *last, C &db) { in parse_simple_id() argument
801 if (first != last) { in parse_simple_id()
802 const char *t = parse_source_name(first, last, db); in parse_simple_id()
804 const char *t1 = parse_template_args(t, last, db); in parse_simple_id()
824 static const char *parse_unresolved_type(const char *first, const char *last, in parse_unresolved_type() argument
826 if (first != last) { in parse_unresolved_type()
831 t = parse_template_param(first, last, db); in parse_unresolved_type()
843 t = parse_decltype(first, last, db); in parse_unresolved_type()
852 t = parse_substitution(first, last, db); in parse_unresolved_type()
856 if (last - first > 2 && first[1] == 't') { in parse_unresolved_type()
857 t = parse_unqualified_name(first + 2, last, db); in parse_unresolved_type()
879 static const char *parse_destructor_name(const char *first, const char *last, in parse_destructor_name() argument
881 if (first != last) { in parse_destructor_name()
882 const char *t = parse_unresolved_type(first, last, db); in parse_destructor_name()
884 t = parse_simple_id(first, last, db); in parse_destructor_name()
914 const char *last, C &db) { in parse_base_unresolved_name() argument
915 if (last - first >= 2) { in parse_base_unresolved_name()
918 const char *t = parse_operator_name(first + 2, last, db); in parse_base_unresolved_name()
920 first = parse_template_args(t, last, db); in parse_base_unresolved_name()
930 const char *t = parse_destructor_name(first + 2, last, db); in parse_base_unresolved_name()
935 const char *t = parse_simple_id(first, last, db); in parse_base_unresolved_name()
937 t = parse_operator_name(first, last, db); in parse_base_unresolved_name()
939 first = parse_template_args(t, last, db); in parse_base_unresolved_name()
959 const char *last, C &db) { in parse_unresolved_qualifier_level() argument
960 return parse_simple_id(first, last, db); in parse_unresolved_qualifier_level()
988 static const char *parse_unresolved_name(const char *first, const char *last, in parse_unresolved_name() argument
990 if (last - first > 2) { in parse_unresolved_name()
997 const char *t2 = parse_base_unresolved_name(t, last, db); in parse_unresolved_name()
1005 } else if (last - t > 2 && t[0] == 's' && t[1] == 'r') { in parse_unresolved_name()
1008 const char *t1 = parse_unresolved_type(t, last, db); in parse_unresolved_name()
1009 if (t1 == t || t1 == last) in parse_unresolved_name()
1012 t1 = parse_template_args(t, last, db); in parse_unresolved_name()
1020 if (t == last) { in parse_unresolved_name()
1026 t1 = parse_unresolved_qualifier_level(t, last, db); in parse_unresolved_name()
1027 if (t1 == t || t1 == last || db.names.size() < 2) in parse_unresolved_name()
1035 t1 = parse_base_unresolved_name(t, last, db); in parse_unresolved_name()
1049 const char *t1 = parse_unresolved_type(t, last, db); in parse_unresolved_name()
1052 t1 = parse_template_args(t, last, db); in parse_unresolved_name()
1061 t1 = parse_base_unresolved_name(t, last, db); in parse_unresolved_name()
1074 t1 = parse_unresolved_qualifier_level(t, last, db); in parse_unresolved_name()
1075 if (t1 == t || t1 == last) in parse_unresolved_name()
1084 t1 = parse_unresolved_qualifier_level(t, last, db); in parse_unresolved_name()
1085 if (t1 == t || t1 == last || db.names.size() < 2) in parse_unresolved_name()
1093 t1 = parse_base_unresolved_name(t, last, db); in parse_unresolved_name()
1115 static const char *parse_dot_expr(const char *first, const char *last, C &db) { in parse_dot_expr() argument
1116 if (last - first >= 3 && first[0] == 'd' && first[1] == 't') { in parse_dot_expr()
1117 const char *t = parse_expression(first + 2, last, db); in parse_dot_expr()
1119 const char *t1 = parse_unresolved_name(t, last, db); in parse_dot_expr()
1138 static const char *parse_call_expr(const char *first, const char *last, C &db) { in parse_call_expr() argument
1139 if (last - first >= 4 && first[0] == 'c' && first[1] == 'l') { in parse_call_expr()
1140 const char *t = parse_expression(first + 2, last, db); in parse_call_expr()
1142 if (t == last) in parse_call_expr()
1151 const char *t1 = parse_expression(t, last, db); in parse_call_expr()
1152 if (t1 == t || t1 == last) in parse_call_expr()
1189 static const char *parse_new_expr(const char *first, const char *last, C &db) { in parse_new_expr() argument
1190 if (last - first >= 4) { in parse_new_expr()
1200 if (t == last) in parse_new_expr()
1205 const char *t1 = parse_expression(t, last, db); in parse_new_expr()
1206 if (t1 == t || t1 == last) in parse_new_expr()
1225 const char *t1 = parse_type(t, last, db); in parse_new_expr()
1226 if (t1 == t || t1 == last) in parse_new_expr()
1230 if (last - t >= 3 && t[0] == 'p' && t[1] == 'i') { in parse_new_expr()
1235 t1 = parse_expression(t, last, db); in parse_new_expr()
1236 if (t1 == t || t1 == last) in parse_new_expr()
1299 static const char *parse_conversion_expr(const char *first, const char *last, in parse_conversion_expr() argument
1301 if (last - first >= 3 && first[0] == 'c' && first[1] == 'v') { in parse_conversion_expr()
1304 const char *t = parse_type(first + 2, last, db); in parse_conversion_expr()
1306 if (t != first + 2 && t != last) { in parse_conversion_expr()
1308 const char *t1 = parse_expression(t, last, db); in parse_conversion_expr()
1314 if (t == last) in parse_conversion_expr()
1321 const char *t1 = parse_expression(t, last, db); in parse_conversion_expr()
1322 if (t1 == t || t1 == last) in parse_conversion_expr()
1356 static const char *parse_arrow_expr(const char *first, const char *last, in parse_arrow_expr() argument
1358 if (last - first >= 3 && first[0] == 'p' && first[1] == 't') { in parse_arrow_expr()
1359 const char *t = parse_expression(first + 2, last, db); in parse_arrow_expr()
1361 const char *t1 = parse_expression(t, last, db); in parse_arrow_expr()
1382 static const char *parse_function_type(const char *first, const char *last, in parse_function_type() argument
1384 if (first != last && *first == 'F') { in parse_function_type()
1386 if (t != last) { in parse_function_type()
1389 if (++t == last) in parse_function_type()
1392 const char *t1 = parse_type(t, last, db); in parse_function_type()
1398 if (t == last) { in parse_function_type()
1410 if (*t == 'R' && t + 1 != last && t[1] == 'E') { in parse_function_type()
1415 if (*t == 'O' && t + 1 != last && t[1] == 'E') { in parse_function_type()
1421 t1 = parse_type(t, last, db); in parse_function_type()
1423 if (t1 == t || t1 == last) in parse_function_type()
1458 const char *last, C &db) { in parse_pointer_to_member_type() argument
1459 if (first != last && *first == 'M') { in parse_pointer_to_member_type()
1460 const char *t = parse_type(first + 1, last, db); in parse_pointer_to_member_type()
1462 const char *t2 = parse_type(t, last, db); in parse_pointer_to_member_type()
1489 static const char *parse_array_type(const char *first, const char *last, in parse_array_type() argument
1491 if (first != last && *first == 'A' && first + 1 != last) { in parse_array_type()
1493 const char *t = parse_type(first + 2, last, db); in parse_array_type()
1503 const char *t = parse_number(first + 1, last); in parse_array_type()
1504 if (t != last && *t == '_') { in parse_array_type()
1505 const char *t2 = parse_type(t + 1, last, db); in parse_array_type()
1517 const char *t = parse_expression(first + 1, last, db); in parse_array_type()
1518 if (t != first + 1 && t != last && *t == '_') { in parse_array_type()
1519 const char *t2 = parse_type(++t, last, db); in parse_array_type()
1544 static const char *parse_decltype(const char *first, const char *last, C &db) { in parse_decltype() argument
1545 if (last - first >= 4 && first[0] == 'D') { in parse_decltype()
1549 const char *t = parse_expression(first + 2, last, db); in parse_decltype()
1550 if (t != first + 2 && t != last && *t == 'E') { in parse_decltype()
1570 static const char *parse_vector_type(const char *first, const char *last, in parse_vector_type() argument
1572 if (last - first > 3 && first[0] == 'D' && first[1] == 'v') { in parse_vector_type()
1574 const char *t = parse_number(first + 2, last); in parse_vector_type()
1575 if (t == last || *t != '_') in parse_vector_type()
1579 if (++t != last) { in parse_vector_type()
1581 const char *t1 = parse_type(t, last, db); in parse_vector_type()
1598 const char *t = parse_expression(t1, last, db); in parse_vector_type()
1607 if (t1 != last && *t1 == '_' && ++t1 != last) { in parse_vector_type()
1608 const char *t = parse_type(t1, last, db); in parse_vector_type()
1647 static const char *parse_type(const char *first, const char *last, C &db) { in parse_type() argument
1648 if (first != last) { in parse_type()
1654 const char *t = parse_cv_qualifiers(first, last, cv); in parse_type()
1658 const char *t1 = parse_type(t, last, db); in parse_type()
1696 const char *t = parse_builtin_type(first, last, db); in parse_type()
1702 t = parse_array_type(first, last, db); in parse_type()
1711 t = parse_type(first + 1, last, db); in parse_type()
1721 t = parse_function_type(first, last, db); in parse_type()
1730 t = parse_type(first + 1, last, db); in parse_type()
1740 t = parse_pointer_to_member_type(first, last, db); in parse_type()
1750 t = parse_type(first + 1, last, db); in parse_type()
1772 t = parse_type(first + 1, last, db); in parse_type()
1799 t = parse_type(first + 1, last, db); in parse_type()
1821 t = parse_template_param(first, last, db); in parse_type()
1828 const char *t1 = parse_template_args(t, last, db); in parse_type()
1842 if (first + 1 != last) { in parse_type()
1843 t = parse_source_name(first + 1, last, db); in parse_type()
1845 const char *t2 = parse_type(t, last, db); in parse_type()
1872 if (first + 1 != last && first[1] == 't') { in parse_type()
1873 t = parse_name(first, last, db); in parse_type()
1881 t = parse_substitution(first, last, db); in parse_type()
1886 t = parse_template_args(first, last, db); in parse_type()
1902 if (first + 1 != last) { in parse_type()
1906 t = parse_type(first + 2, last, db); in parse_type()
1919 t = parse_decltype(first, last, db); in parse_type()
1929 t = parse_vector_type(first, last, db); in parse_type()
1944 t = parse_builtin_type(first, last, db); in parse_type()
1948 t = parse_name(first, last, db); in parse_type()
2020 static const char *parse_operator_name(const char *first, const char *last, in parse_operator_name() argument
2022 if (last - first >= 2) { in parse_operator_name()
2062 const char *t = parse_type(first + 2, last, db); in parse_operator_name()
2139 const char *t = parse_source_name(first + 2, last, db); in parse_operator_name()
2281 const char *t = parse_source_name(first + 2, last, db); in parse_operator_name()
2296 static const char *parse_integer_literal(const char *first, const char *last, in parse_integer_literal() argument
2298 const char *t = parse_number(first, last); in parse_integer_literal()
2299 if (t != first && t != last && *t == 'E') { in parse_integer_literal()
2330 static const char *parse_expr_primary(const char *first, const char *last, in parse_expr_primary() argument
2332 if (last - first >= 4 && *first == 'L') { in parse_expr_primary()
2335 const char *t = parse_integer_literal(first + 2, last, "wchar_t", db); in parse_expr_primary()
2354 const char *t = parse_integer_literal(first + 2, last, "char", db); in parse_expr_primary()
2359 const char *t = parse_integer_literal(first + 2, last, "signed char", db); in parse_expr_primary()
2365 parse_integer_literal(first + 2, last, "unsigned char", db); in parse_expr_primary()
2370 const char *t = parse_integer_literal(first + 2, last, "short", db); in parse_expr_primary()
2376 parse_integer_literal(first + 2, last, "unsigned short", db); in parse_expr_primary()
2381 const char *t = parse_integer_literal(first + 2, last, "", db); in parse_expr_primary()
2386 const char *t = parse_integer_literal(first + 2, last, "u", db); in parse_expr_primary()
2391 const char *t = parse_integer_literal(first + 2, last, "l", db); in parse_expr_primary()
2396 const char *t = parse_integer_literal(first + 2, last, "ul", db); in parse_expr_primary()
2401 const char *t = parse_integer_literal(first + 2, last, "ll", db); in parse_expr_primary()
2406 const char *t = parse_integer_literal(first + 2, last, "ull", db); in parse_expr_primary()
2411 const char *t = parse_integer_literal(first + 2, last, "__int128", db); in parse_expr_primary()
2417 parse_integer_literal(first + 2, last, "unsigned __int128", db); in parse_expr_primary()
2422 const char *t = parse_floating_number<float>(first + 2, last, db); in parse_expr_primary()
2427 const char *t = parse_floating_number<double>(first + 2, last, db); in parse_expr_primary()
2432 const char *t = parse_floating_number<long double>(first + 2, last, db); in parse_expr_primary()
2438 const char *t = parse_encoding(first + 3, last, db); in parse_expr_primary()
2439 if (t != first + 3 && t != last && *t == 'E') in parse_expr_primary()
2449 const char *t = parse_type(first + 1, last, db); in parse_expr_primary()
2450 if (t != first + 1 && t != last) { in parse_expr_primary()
2453 for (; n != last && isdigit(*n); ++n) in parse_expr_primary()
2455 if (n != t && n != last && *n == 'E') { in parse_expr_primary()
2532 static const char *parse_ctor_dtor_name(const char *first, const char *last, in parse_ctor_dtor_name() argument
2534 if (last - first >= 2 && !db.names.empty()) { in parse_ctor_dtor_name()
2578 static const char *parse_unnamed_type_name(const char *first, const char *last, in parse_unnamed_type_name() argument
2580 if (last - first > 2 && first[0] == 'U') { in parse_unnamed_type_name()
2586 if (t0 == last) { in parse_unnamed_type_name()
2592 while (t1 != last && std::isdigit(*t1)) in parse_unnamed_type_name()
2598 if (t0 == last || *t0 != '_') { in parse_unnamed_type_name()
2611 const char *t1 = parse_type(t0, last, db); in parse_unnamed_type_name()
2624 t1 = parse_type(t0, last, db); in parse_unnamed_type_name()
2641 if (t0 == last || *t0 != 'E') { in parse_unnamed_type_name()
2647 if (t0 == last) { in parse_unnamed_type_name()
2654 while (t1 != last && std::isdigit(*t1)) in parse_unnamed_type_name()
2659 if (t0 == last || *t0 != '_') { in parse_unnamed_type_name()
2677 static const char *parse_unqualified_name(const char *first, const char *last, in parse_unqualified_name() argument
2679 if (first != last) { in parse_unqualified_name()
2684 t = parse_ctor_dtor_name(first, last, db); in parse_unqualified_name()
2689 t = parse_unnamed_type_name(first, last, db); in parse_unqualified_name()
2702 t = parse_source_name(first, last, db); in parse_unqualified_name()
2707 t = parse_operator_name(first, last, db); in parse_unqualified_name()
2721 static const char *parse_unscoped_name(const char *first, const char *last, in parse_unscoped_name() argument
2723 if (last - first >= 2) { in parse_unscoped_name()
2729 if (t0 != last && *t0 == 'L') in parse_unscoped_name()
2732 const char *t1 = parse_unqualified_name(t0, last, db); in parse_unscoped_name()
2748 static const char *parse_alignof_type(const char *first, const char *last, in parse_alignof_type() argument
2750 if (last - first >= 3 && first[0] == 'a' && first[1] == 't') { in parse_alignof_type()
2751 const char *t = parse_type(first + 2, last, db); in parse_alignof_type()
2766 static const char *parse_alignof_expr(const char *first, const char *last, in parse_alignof_expr() argument
2768 if (last - first >= 3 && first[0] == 'a' && first[1] == 'z') { in parse_alignof_expr()
2769 const char *t = parse_expression(first + 2, last, db); in parse_alignof_expr()
2782 const char *last, C &db) { in parse_noexcept_expression() argument
2783 const char *t1 = parse_expression(first, last, db); in parse_noexcept_expression()
2794 static const char *parse_prefix_expression(const char *first, const char *last, in parse_prefix_expression() argument
2797 const char *t1 = parse_expression(first, last, db); in parse_prefix_expression()
2808 static const char *parse_binary_expression(const char *first, const char *last, in parse_binary_expression() argument
2811 const char *t1 = parse_expression(first, last, db); in parse_binary_expression()
2813 const char *t2 = parse_expression(t1, last, db); in parse_binary_expression()
2915 static const char *parse_expression(const char *first, const char *last, in parse_expression() argument
2917 if (last - first >= 2) { in parse_expression()
2920 if (last - first >= 4 && t[0] == 'g' && t[1] == 's') { in parse_expression()
2926 first = parse_expr_primary(first, last, db); in parse_expression()
2929 first = parse_template_param(first, last, db); in parse_expression()
2932 first = parse_function_param(first, last, db); in parse_expression()
2937 t = parse_binary_expression(first + 2, last, "&&", db); in parse_expression()
2942 t = parse_prefix_expression(first + 2, last, "&", db); in parse_expression()
2947 t = parse_binary_expression(first + 2, last, "&", db); in parse_expression()
2952 t = parse_binary_expression(first + 2, last, "&=", db); in parse_expression()
2957 t = parse_binary_expression(first + 2, last, "=", db); in parse_expression()
2962 first = parse_alignof_type(first, last, db); in parse_expression()
2965 first = parse_alignof_expr(first, last, db); in parse_expression()
2972 first = parse_const_cast_expr(first, last, db); in parse_expression()
2975 first = parse_call_expr(first, last, db); in parse_expression()
2978 t = parse_binary_expression(first + 2, last, ",", db); in parse_expression()
2983 t = parse_prefix_expression(first + 2, last, "~", db); in parse_expression()
2988 first = parse_conversion_expr(first, last, db); in parse_expression()
2995 const char *t1 = parse_expression(t + 2, last, db); in parse_expression()
3006 first = parse_dynamic_cast_expr(first, last, db); in parse_expression()
3009 t = parse_prefix_expression(first + 2, last, "*", db); in parse_expression()
3014 const char *t1 = parse_expression(t + 2, last, db); in parse_expression()
3025 return parse_unresolved_name(first, last, db); in parse_expression()
3027 first = parse_dot_star_expr(first, last, db); in parse_expression()
3030 first = parse_dot_expr(first, last, db); in parse_expression()
3033 t = parse_binary_expression(first + 2, last, "/", db); in parse_expression()
3038 t = parse_binary_expression(first + 2, last, "/=", db); in parse_expression()
3047 t = parse_binary_expression(first + 2, last, "^", db); in parse_expression()
3052 t = parse_binary_expression(first + 2, last, "^=", db); in parse_expression()
3057 t = parse_binary_expression(first + 2, last, "==", db); in parse_expression()
3066 t = parse_binary_expression(first + 2, last, ">=", db); in parse_expression()
3071 t = parse_binary_expression(first + 2, last, ">", db); in parse_expression()
3079 const char *t1 = parse_expression(first + 2, last, db); in parse_expression()
3081 const char *t2 = parse_expression(t1, last, db); in parse_expression()
3098 t = parse_binary_expression(first + 2, last, "<=", db); in parse_expression()
3103 t = parse_binary_expression(first + 2, last, "<<", db); in parse_expression()
3108 t = parse_binary_expression(first + 2, last, "<<=", db); in parse_expression()
3113 t = parse_binary_expression(first + 2, last, "<", db); in parse_expression()
3122 t = parse_binary_expression(first + 2, last, "-", db); in parse_expression()
3127 t = parse_binary_expression(first + 2, last, "-=", db); in parse_expression()
3132 t = parse_binary_expression(first + 2, last, "*", db); in parse_expression()
3137 t = parse_binary_expression(first + 2, last, "*=", db); in parse_expression()
3142 if (first + 2 != last && first[2] == '_') { in parse_expression()
3143 t = parse_prefix_expression(first + 3, last, "--", db); in parse_expression()
3147 const char *t1 = parse_expression(first + 2, last, db); in parse_expression()
3162 first = parse_new_expr(first, last, db); in parse_expression()
3165 t = parse_binary_expression(first + 2, last, "!=", db); in parse_expression()
3170 t = parse_prefix_expression(first + 2, last, "-", db); in parse_expression()
3175 t = parse_prefix_expression(first + 2, last, "!", db); in parse_expression()
3180 t = parse_noexcept_expression(first + 2, last, db); in parse_expression()
3189 return parse_unresolved_name(first, last, db); in parse_expression()
3191 t = parse_binary_expression(first + 2, last, "||", db); in parse_expression()
3196 t = parse_binary_expression(first + 2, last, "|", db); in parse_expression()
3201 t = parse_binary_expression(first + 2, last, "|=", db); in parse_expression()
3210 t = parse_binary_expression(first + 2, last, "->*", db); in parse_expression()
3215 t = parse_binary_expression(first + 2, last, "+", db); in parse_expression()
3220 t = parse_binary_expression(first + 2, last, "+=", db); in parse_expression()
3225 if (first + 2 != last && first[2] == '_') { in parse_expression()
3226 t = parse_prefix_expression(first + 3, last, "++", db); in parse_expression()
3230 const char *t1 = parse_expression(first + 2, last, db); in parse_expression()
3240 t = parse_prefix_expression(first + 2, last, "+", db); in parse_expression()
3245 first = parse_arrow_expr(first, last, db); in parse_expression()
3251 const char *t1 = parse_expression(first + 2, last, db); in parse_expression()
3253 const char *t2 = parse_expression(t1, last, db); in parse_expression()
3255 const char *t3 = parse_expression(t2, last, db); in parse_expression()
3280 first = parse_reinterpret_cast_expr(first, last, db); in parse_expression()
3283 t = parse_binary_expression(first + 2, last, "%", db); in parse_expression()
3288 t = parse_binary_expression(first + 2, last, "%=", db); in parse_expression()
3293 t = parse_binary_expression(first + 2, last, ">>", db); in parse_expression()
3298 t = parse_binary_expression(first + 2, last, ">>=", db); in parse_expression()
3307 first = parse_static_cast_expr(first, last, db); in parse_expression()
3310 first = parse_pack_expansion(first, last, db); in parse_expression()
3313 return parse_unresolved_name(first, last, db); in parse_expression()
3315 first = parse_sizeof_type_expr(first, last, db); in parse_expression()
3318 first = parse_sizeof_expr_expr(first, last, db); in parse_expression()
3321 if (last - t >= 3) { in parse_expression()
3324 first = parse_sizeof_param_pack_expr(first, last, db); in parse_expression()
3327 first = parse_sizeof_function_param_pack_expr(first, last, db); in parse_expression()
3338 first = parse_typeid_expr(first, last, db); in parse_expression()
3345 first = parse_throw_expr(first, last, db); in parse_expression()
3358 return parse_unresolved_name(first, last, db); in parse_expression()
3376 static const char *parse_template_arg(const char *first, const char *last, in parse_template_arg() argument
3378 if (first != last) { in parse_template_arg()
3382 t = parse_expression(first + 1, last, db); in parse_template_arg()
3384 if (t != last && *t == 'E') in parse_template_arg()
3390 if (t == last) in parse_template_arg()
3393 const char *t1 = parse_template_arg(t, last, db); in parse_template_arg()
3402 if (first + 1 != last && first[1] == 'Z') { in parse_template_arg()
3403 t = parse_encoding(first + 2, last, db); in parse_template_arg()
3404 if (t != first + 2 && t != last && *t == 'E') in parse_template_arg()
3407 first = parse_expr_primary(first, last, db); in parse_template_arg()
3411 first = parse_type(first, last, db); in parse_template_arg()
3422 static const char *parse_template_args(const char *first, const char *last, in parse_template_args() argument
3424 if (last - first >= 2 && *first == 'I') { in parse_template_args()
3433 const char *t1 = parse_template_arg(t, last, db); in parse_template_args()
3437 if (t1 == t || t1 == last) in parse_template_args()
3483 static const char *parse_nested_name(const char *first, const char *last, C &db, in parse_nested_name() argument
3485 if (first != last && *first == 'N') { in parse_nested_name()
3487 const char *t0 = parse_cv_qualifiers(first + 1, last, cv); in parse_nested_name()
3488 if (t0 == last) in parse_nested_name()
3499 if (last - t0 >= 2 && t0[0] == 'S' && t0[1] == 't') { in parse_nested_name()
3503 if (t0 == last) { in parse_nested_name()
3514 if (t0 + 1 != last && t0[1] == 't') in parse_nested_name()
3516 t1 = parse_substitution(t0, last, db); in parse_nested_name()
3517 if (t1 != t0 && t1 != last) { in parse_nested_name()
3533 t1 = parse_template_param(t0, last, db); in parse_nested_name()
3534 if (t1 != t0 && t1 != last) { in parse_nested_name()
3550 if (t0 + 1 != last && t0[1] != 't' && t0[1] != 'T') in parse_nested_name()
3552 t1 = parse_decltype(t0, last, db); in parse_nested_name()
3553 if (t1 != t0 && t1 != last) { in parse_nested_name()
3569 t1 = parse_template_args(t0, last, db); in parse_nested_name()
3570 if (t1 != t0 && t1 != last) { in parse_nested_name()
3583 if (++t0 == last) in parse_nested_name()
3588 t1 = parse_unqualified_name(t0, last, db); in parse_nested_name()
3589 if (t1 != t0 && t1 != last) { in parse_nested_name()
3619 static const char *parse_discriminator(const char *first, const char *last) { in parse_discriminator() argument
3621 if (first != last) { in parse_discriminator()
3624 if (t1 != last) { in parse_discriminator()
3628 for (++t1; t1 != last && std::isdigit(*t1); ++t1) in parse_discriminator()
3630 if (t1 != last && *t1 == '_') in parse_discriminator()
3636 for (; t1 != last && std::isdigit(*t1); ++t1) in parse_discriminator()
3638 if (t1 == last) in parse_discriminator()
3639 first = last; in parse_discriminator()
3651 static const char *parse_local_name(const char *first, const char *last, C &db, in parse_local_name() argument
3653 if (first != last && *first == 'Z') { in parse_local_name()
3654 const char *t = parse_encoding(first + 1, last, db); in parse_local_name()
3655 if (t != first + 1 && t != last && *t == 'E' && ++t != last) { in parse_local_name()
3658 first = parse_discriminator(t + 1, last); in parse_local_name()
3664 if (++t != last) { in parse_local_name()
3665 const char *t1 = parse_number(t, last); in parse_local_name()
3666 if (t1 != last && *t1 == '_') { in parse_local_name()
3668 t1 = parse_name(t, last, db, ends_with_template_args); in parse_local_name()
3685 const char *t1 = parse_name(t, last, db, ends_with_template_args); in parse_local_name()
3688 first = parse_discriminator(t1, last); in parse_local_name()
3715 static const char *parse_name(const char *first, const char *last, C &db, in parse_name() argument
3717 if (last - first >= 2) { in parse_name()
3724 const char *t1 = parse_nested_name(t0, last, db, ends_with_template_args); in parse_name()
3730 const char *t1 = parse_local_name(t0, last, db, ends_with_template_args); in parse_name()
3736 const char *t1 = parse_unscoped_name(t0, last, db); in parse_name()
3738 if (t1 != last && in parse_name()
3745 t1 = parse_template_args(t0, last, db); in parse_name()
3761 t1 = parse_substitution(t0, last, db); in parse_name()
3762 if (t1 != t0 && t1 != last && *t1 == 'I') { in parse_name()
3764 t1 = parse_template_args(t0, last, db); in parse_name()
3795 static const char *parse_call_offset(const char *first, const char *last) { in parse_call_offset() argument
3796 if (first != last) { in parse_call_offset()
3799 const char *t = parse_number(first + 1, last); in parse_call_offset()
3800 if (t != first + 1 && t != last && *t == '_') in parse_call_offset()
3804 const char *t = parse_number(first + 1, last); in parse_call_offset()
3805 if (t != first + 1 && t != last && *t == '_') { in parse_call_offset()
3806 const char *t2 = parse_number(++t, last); in parse_call_offset()
3807 if (t2 != t && t2 != last && *t2 == '_') in parse_call_offset()
3834 static const char *parse_special_name(const char *first, const char *last, in parse_special_name() argument
3836 if (last - first > 2) { in parse_special_name()
3843 t = parse_type(first + 2, last, db); in parse_special_name()
3853 t = parse_type(first + 2, last, db); in parse_special_name()
3863 t = parse_type(first + 2, last, db); in parse_special_name()
3873 t = parse_type(first + 2, last, db); in parse_special_name()
3884 const char *t0 = parse_call_offset(first + 2, last); in parse_special_name()
3887 const char *t1 = parse_call_offset(t0, last); in parse_special_name()
3890 t = parse_encoding(t1, last, db); in parse_special_name()
3902 t = parse_type(first + 2, last, db); in parse_special_name()
3904 const char *t0 = parse_number(t, last); in parse_special_name()
3905 if (t0 != t && t0 != last && *t0 == '_') { in parse_special_name()
3906 const char *t1 = parse_type(++t0, last, db); in parse_special_name()
3925 const char *t0 = parse_call_offset(first + 1, last); in parse_special_name()
3928 t = parse_encoding(t0, last, db); in parse_special_name()
3948 t = parse_name(first + 2, last, db); in parse_special_name()
3958 t = parse_name(first + 2, last, db); in parse_special_name()
3993 static const char *parse_encoding(const char *first, const char *last, C &db) { in parse_encoding() argument
3994 if (first != last) { in parse_encoding()
4003 first = parse_special_name(first, last, db); in parse_encoding()
4007 const char *t = parse_name(first, last, db, &ends_with_template_args); in parse_encoding()
4011 if (t != last && *t != 'E' && *t != '.') { in parse_encoding()
4022 t2 = parse_type(t, last, db); in parse_encoding()
4039 if (t != last && *t == 'v') { in parse_encoding()
4045 t2 = parse_type(t, last, db); in parse_encoding()
4104 static const char *parse_block_invoke(const char *first, const char *last, in parse_block_invoke() argument
4106 if (last - first >= 13) { in parse_block_invoke()
4113 if (t != last) { in parse_block_invoke()
4116 if (++t == last || !std::isdigit(*t)) in parse_block_invoke()
4121 while (t != last && isdigit(*t)) in parse_block_invoke()
4136 static const char *parse_dot_suffix(const char *first, const char *last, in parse_dot_suffix() argument
4138 if (first != last && *first == '.') { in parse_dot_suffix()
4141 db.names.back().first += " (" + std::string(first, last) + ")"; in parse_dot_suffix()
4142 first = last; in parse_dot_suffix()
4154 static void demangle(const char *first, const char *last, C &db, int &status) { in demangle() argument
4155 if (first >= last) { in demangle()
4160 if (last - first >= 4) { in demangle()
4162 const char *t = parse_encoding(first + 2, last, db); in demangle()
4163 if (t != first + 2 && t != last && *t == '.') in demangle()
4164 t = parse_dot_suffix(t, last, db); in demangle()
4165 if (t != last) in demangle()
4168 const char *t = parse_encoding(first + 4, last, db); in demangle()
4169 if (t != first + 4 && t != last) { in demangle()
4170 const char *t1 = parse_block_invoke(t, last, db); in demangle()
4171 if (t1 != last) in demangle()
4180 const char *t = parse_type(first, last, db); in demangle()
4181 if (t != last) in demangle()