Commit e4b8541
committed
[clang][libclang] Fix auto function parameter type reporting
When auto is used as a function parameter type, clang-c API was
incorrectly reporting it as TypeRef with kind unexposed instead of
reporting it as CXType_Auto.
The issue was that CursorVisitor did not have a handler for AutoTypeLoc,
so it fell back to default behavior which resulted in unexposed types.
Add VisitAutoTypeLoc method to properly handle auto type locations in
function parameters. This brings consistency with how auto is handled
in variable declarations.
Fixes issue #1720721 parent f3c1645 commit e4b8541
File tree
3 files changed
+33
-0
lines changed- clang
- test/Index
- tools/libclang
3 files changed
+33
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1789 | 1789 | | |
1790 | 1790 | | |
1791 | 1791 | | |
| 1792 | + | |
| 1793 | + | |
| 1794 | + | |
| 1795 | + | |
| 1796 | + | |
| 1797 | + | |
| 1798 | + | |
| 1799 | + | |
| 1800 | + | |
1792 | 1801 | | |
1793 | 1802 | | |
1794 | 1803 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
150 | 150 | | |
151 | 151 | | |
152 | 152 | | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
153 | 163 | | |
154 | 164 | | |
155 | 165 | | |
| |||
0 commit comments