Commit 797569a
committed
Fix remaining cases in #1163, and systematically early-return when an error is detected
Closes #1163
The three remaining cases were lack of backtracking after refusing to parse `: name *` with the helpful error about the Cpp1-style pointer declaration being invalid
But also more generally: Several recent ICE/ASAN bug reports, including the first two in #1163, have been because of trying to continue lexing/parsing for a bit after an error was identified, so I also went through to systematically ensure every time we record an error we (a) early-return and (b) don't do next() since there should be no point... (a) is the main improvement, (b) is just hygiene but probably has no effect. This change only changes the output of two regression test cases, and both are improvements.1 parent 4b28331 commit 797569a
File tree
7 files changed
+53
-22
lines changed- regression-tests/test-results
- source
7 files changed
+53
-22
lines changedLines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
| 3 | + | |
4 | 4 | | |
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
| 3 | + | |
4 | 4 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | | - | |
| 2 | + | |
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
779 | 779 | | |
780 | 780 | | |
781 | 781 | | |
| 782 | + | |
782 | 783 | | |
783 | 784 | | |
784 | 785 | | |
| |||
807 | 808 | | |
808 | 809 | | |
809 | 810 | | |
| 811 | + | |
810 | 812 | | |
811 | 813 | | |
812 | 814 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
751 | 751 | | |
752 | 752 | | |
753 | 753 | | |
| 754 | + | |
| 755 | + | |
754 | 756 | | |
755 | 757 | | |
756 | 758 | | |
| |||
1002 | 1004 | | |
1003 | 1005 | | |
1004 | 1006 | | |
| 1007 | + | |
1005 | 1008 | | |
1006 | 1009 | | |
1007 | 1010 | | |
| |||
1022 | 1025 | | |
1023 | 1026 | | |
1024 | 1027 | | |
| 1028 | + | |
1025 | 1029 | | |
1026 | 1030 | | |
1027 | 1031 | | |
1028 | 1032 | | |
1029 | 1033 | | |
1030 | 1034 | | |
1031 | 1035 | | |
| 1036 | + | |
1032 | 1037 | | |
1033 | | - | |
1034 | 1038 | | |
1035 | 1039 | | |
1036 | 1040 | | |
| |||
1052 | 1056 | | |
1053 | 1057 | | |
1054 | 1058 | | |
| 1059 | + | |
1055 | 1060 | | |
| 1061 | + | |
1056 | 1062 | | |
1057 | 1063 | | |
1058 | 1064 | | |
| |||
1535 | 1541 | | |
1536 | 1542 | | |
1537 | 1543 | | |
| 1544 | + | |
1538 | 1545 | | |
1539 | 1546 | | |
1540 | 1547 | | |
| |||
1579 | 1586 | | |
1580 | 1587 | | |
1581 | 1588 | | |
| 1589 | + | |
1582 | 1590 | | |
1583 | 1591 | | |
1584 | 1592 | | |
| |||
1592 | 1600 | | |
1593 | 1601 | | |
1594 | 1602 | | |
| 1603 | + | |
1595 | 1604 | | |
1596 | 1605 | | |
1597 | 1606 | | |
| |||
1658 | 1667 | | |
1659 | 1668 | | |
1660 | 1669 | | |
| 1670 | + | |
1661 | 1671 | | |
1662 | 1672 | | |
1663 | 1673 | | |
| |||
1725 | 1735 | | |
1726 | 1736 | | |
1727 | 1737 | | |
| 1738 | + | |
1728 | 1739 | | |
1729 | 1740 | | |
1730 | 1741 | | |
| |||
1783 | 1794 | | |
1784 | 1795 | | |
1785 | 1796 | | |
| 1797 | + | |
1786 | 1798 | | |
1787 | 1799 | | |
1788 | 1800 | | |
| |||
1791 | 1803 | | |
1792 | 1804 | | |
1793 | 1805 | | |
| 1806 | + | |
1794 | 1807 | | |
1795 | 1808 | | |
1796 | 1809 | | |
| |||
1816 | 1829 | | |
1817 | 1830 | | |
1818 | 1831 | | |
| 1832 | + | |
1819 | 1833 | | |
1820 | 1834 | | |
1821 | 1835 | | |
1822 | 1836 | | |
1823 | 1837 | | |
1824 | 1838 | | |
| 1839 | + | |
1825 | 1840 | | |
1826 | 1841 | | |
1827 | 1842 | | |
1828 | 1843 | | |
1829 | 1844 | | |
1830 | 1845 | | |
| 1846 | + | |
1831 | 1847 | | |
1832 | 1848 | | |
1833 | 1849 | | |
| |||
1854 | 1870 | | |
1855 | 1871 | | |
1856 | 1872 | | |
| 1873 | + | |
1857 | 1874 | | |
1858 | 1875 | | |
1859 | 1876 | | |
1860 | 1877 | | |
1861 | 1878 | | |
1862 | 1879 | | |
| 1880 | + | |
1863 | 1881 | | |
1864 | 1882 | | |
1865 | 1883 | | |
| |||
1873 | 1891 | | |
1874 | 1892 | | |
1875 | 1893 | | |
| 1894 | + | |
1876 | 1895 | | |
1877 | 1896 | | |
1878 | 1897 | | |
| |||
0 commit comments