Commit e010074
Fix ABI tag (B <source-name>) handling in nested names and function names
In DemangleNestedName(), the previous code broke out of the parsing loop
when it saw 'B' (an ABI tag prefix), leaving the 'E' nested-name terminator
unconsumed and causing the remainder of the qualified name (e.g. constructor
C1) to be lost.
The fix: instead of breaking, consume all consecutive 'B <source-name>'
sequences inline, appending "[abi:tag]" to the last name segment, then
continue parsing the rest of the nested name normally. The m_lastName is
saved and restored so that a following C1/D1 ctor/dtor still resolves to
the class name rather than the ABI tag string.
In DemangleFunction(), the old ad-hoc 'B' handler (which only recognized
"cxx11" and set a wrong return type) is replaced with the same ABI-tag
loop, allowing correct return-type detection for constructors/destructors
with ABI-tagged names.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>1 parent c816816 commit e010074
1 file changed
Lines changed: 30 additions & 18 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1818 | 1818 | | |
1819 | 1819 | | |
1820 | 1820 | | |
1821 | | - | |
1822 | 1821 | | |
1823 | 1822 | | |
1824 | 1823 | | |
| |||
1837 | 1836 | | |
1838 | 1837 | | |
1839 | 1838 | | |
1840 | | - | |
1841 | | - | |
1842 | | - | |
1843 | | - | |
1844 | | - | |
1845 | 1839 | | |
1846 | 1840 | | |
1847 | 1841 | | |
| |||
1886 | 1880 | | |
1887 | 1881 | | |
1888 | 1882 | | |
| 1883 | + | |
| 1884 | + | |
| 1885 | + | |
| 1886 | + | |
| 1887 | + | |
| 1888 | + | |
| 1889 | + | |
| 1890 | + | |
| 1891 | + | |
| 1892 | + | |
| 1893 | + | |
| 1894 | + | |
| 1895 | + | |
| 1896 | + | |
| 1897 | + | |
| 1898 | + | |
| 1899 | + | |
1889 | 1900 | | |
1890 | 1901 | | |
1891 | 1902 | | |
| |||
1897 | 1908 | | |
1898 | 1909 | | |
1899 | 1910 | | |
1900 | | - | |
1901 | | - | |
| 1911 | + | |
1902 | 1912 | | |
1903 | 1913 | | |
1904 | 1914 | | |
| |||
2426 | 2436 | | |
2427 | 2437 | | |
2428 | 2438 | | |
2429 | | - | |
| 2439 | + | |
| 2440 | + | |
| 2441 | + | |
| 2442 | + | |
2430 | 2443 | | |
2431 | 2444 | | |
2432 | | - | |
2433 | | - | |
2434 | | - | |
2435 | | - | |
2436 | | - | |
2437 | | - | |
2438 | | - | |
2439 | | - | |
2440 | | - | |
| 2445 | + | |
| 2446 | + | |
| 2447 | + | |
| 2448 | + | |
| 2449 | + | |
| 2450 | + | |
| 2451 | + | |
| 2452 | + | |
2441 | 2453 | | |
2442 | 2454 | | |
2443 | 2455 | | |
| |||
0 commit comments