Repository navigation
Commit c51e5cb
committed
fix(extract,mcp): retain pointer returns and exact signature status
Both merge parents be89d49 and 97ce23f stored only the base type node for C/C++ functions and methods, so const char * and char ** were published as char. The feature parent also marked requested get_code signature output as truncated source and emitted repair-oriented clipping metadata.
Add c_declarator_return_type_text at internal/cbm/extract_defs.c:3154 to retain leading qualifiers and every pointer_declarator in O(D) traversal time with O(return-type bytes) arena storage and checked size arithmetic. Route free-function and method return metadata through it. In src/mcp/mcp.c:13543, treat signature mode as a complete requested representation: retain total_lines, omit truncated/source_clipped/clipped_at_lines, and reuse one signature_mode predicate.
Tests require const char *, char **, unchanged scalar int, C++ method parity, total_lines=300, and absence of false clipping fields. Verified extraction 329/329, C LSP 752/752, token_reduction 56/56, MCP 314/314 under ASan/UBSan; test-leak 1194/1194 with 0 leaks; explicit four-file test-syntax and source safety pass. Clang analyzer reports no diagnostics in changed production ranges.
Signed-off-by: Andrew Hundt <[email protected]>1 parent 111d426 commit c51e5cb
4 files changed
Lines changed: 199 additions & 8 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3151 | 3151 | | |
3152 | 3152 | | |
3153 | 3153 | | |
| 3154 | + | |
| 3155 | + | |
| 3156 | + | |
| 3157 | + | |
| 3158 | + | |
| 3159 | + | |
| 3160 | + | |
| 3161 | + | |
| 3162 | + | |
| 3163 | + | |
| 3164 | + | |
| 3165 | + | |
| 3166 | + | |
| 3167 | + | |
| 3168 | + | |
| 3169 | + | |
| 3170 | + | |
| 3171 | + | |
| 3172 | + | |
| 3173 | + | |
| 3174 | + | |
| 3175 | + | |
| 3176 | + | |
| 3177 | + | |
| 3178 | + | |
| 3179 | + | |
| 3180 | + | |
| 3181 | + | |
| 3182 | + | |
| 3183 | + | |
| 3184 | + | |
| 3185 | + | |
| 3186 | + | |
| 3187 | + | |
| 3188 | + | |
| 3189 | + | |
| 3190 | + | |
| 3191 | + | |
| 3192 | + | |
| 3193 | + | |
| 3194 | + | |
| 3195 | + | |
| 3196 | + | |
| 3197 | + | |
| 3198 | + | |
| 3199 | + | |
| 3200 | + | |
| 3201 | + | |
| 3202 | + | |
| 3203 | + | |
| 3204 | + | |
| 3205 | + | |
| 3206 | + | |
| 3207 | + | |
| 3208 | + | |
| 3209 | + | |
| 3210 | + | |
| 3211 | + | |
| 3212 | + | |
| 3213 | + | |
| 3214 | + | |
| 3215 | + | |
| 3216 | + | |
| 3217 | + | |
| 3218 | + | |
| 3219 | + | |
| 3220 | + | |
| 3221 | + | |
| 3222 | + | |
| 3223 | + | |
| 3224 | + | |
| 3225 | + | |
| 3226 | + | |
| 3227 | + | |
| 3228 | + | |
| 3229 | + | |
| 3230 | + | |
| 3231 | + | |
| 3232 | + | |
| 3233 | + | |
| 3234 | + | |
| 3235 | + | |
| 3236 | + | |
| 3237 | + | |
| 3238 | + | |
| 3239 | + | |
| 3240 | + | |
| 3241 | + | |
| 3242 | + | |
| 3243 | + | |
| 3244 | + | |
| 3245 | + | |
| 3246 | + | |
| 3247 | + | |
| 3248 | + | |
| 3249 | + | |
| 3250 | + | |
| 3251 | + | |
| 3252 | + | |
| 3253 | + | |
| 3254 | + | |
| 3255 | + | |
| 3256 | + | |
| 3257 | + | |
| 3258 | + | |
| 3259 | + | |
| 3260 | + | |
| 3261 | + | |
| 3262 | + | |
| 3263 | + | |
| 3264 | + | |
| 3265 | + | |
| 3266 | + | |
| 3267 | + | |
| 3268 | + | |
| 3269 | + | |
3154 | 3270 | | |
3155 | 3271 | | |
3156 | 3272 | | |
| |||
3304 | 3420 | | |
3305 | 3421 | | |
3306 | 3422 | | |
3307 | | - | |
| 3423 | + | |
3308 | 3424 | | |
3309 | 3425 | | |
3310 | 3426 | | |
| |||
4311 | 4427 | | |
4312 | 4428 | | |
4313 | 4429 | | |
4314 | | - | |
| 4430 | + | |
4315 | 4431 | | |
4316 | 4432 | | |
4317 | 4433 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
13540 | 13540 | | |
13541 | 13541 | | |
13542 | 13542 | | |
| 13543 | + | |
13543 | 13544 | | |
13544 | 13545 | | |
13545 | 13546 | | |
| |||
13555 | 13556 | | |
13556 | 13557 | | |
13557 | 13558 | | |
13558 | | - | |
13559 | | - | |
| 13559 | + | |
| 13560 | + | |
13560 | 13561 | | |
13561 | 13562 | | |
13562 | 13563 | | |
| |||
13600 | 13601 | | |
13601 | 13602 | | |
13602 | 13603 | | |
13603 | | - | |
| 13604 | + | |
13604 | 13605 | | |
13605 | 13606 | | |
13606 | 13607 | | |
| |||
13641 | 13642 | | |
13642 | 13643 | | |
13643 | 13644 | | |
| 13645 | + | |
| 13646 | + | |
| 13647 | + | |
| 13648 | + | |
13644 | 13649 | | |
13645 | 13650 | | |
13646 | 13651 | | |
| |||
13652 | 13657 | | |
13653 | 13658 | | |
13654 | 13659 | | |
13655 | | - | |
| 13660 | + | |
13656 | 13661 | | |
13657 | 13662 | | |
13658 | 13663 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
908 | 908 | | |
909 | 909 | | |
910 | 910 | | |
| 911 | + | |
| 912 | + | |
| 913 | + | |
| 914 | + | |
| 915 | + | |
| 916 | + | |
| 917 | + | |
| 918 | + | |
| 919 | + | |
| 920 | + | |
| 921 | + | |
| 922 | + | |
| 923 | + | |
| 924 | + | |
| 925 | + | |
| 926 | + | |
| 927 | + | |
| 928 | + | |
| 929 | + | |
| 930 | + | |
| 931 | + | |
| 932 | + | |
| 933 | + | |
| 934 | + | |
| 935 | + | |
| 936 | + | |
| 937 | + | |
| 938 | + | |
| 939 | + | |
| 940 | + | |
| 941 | + | |
| 942 | + | |
| 943 | + | |
| 944 | + | |
911 | 945 | | |
912 | 946 | | |
913 | 947 | | |
| |||
932 | 966 | | |
933 | 967 | | |
934 | 968 | | |
| 969 | + | |
| 970 | + | |
| 971 | + | |
| 972 | + | |
| 973 | + | |
| 974 | + | |
| 975 | + | |
| 976 | + | |
| 977 | + | |
| 978 | + | |
| 979 | + | |
| 980 | + | |
| 981 | + | |
| 982 | + | |
| 983 | + | |
| 984 | + | |
| 985 | + | |
| 986 | + | |
| 987 | + | |
| 988 | + | |
| 989 | + | |
| 990 | + | |
| 991 | + | |
| 992 | + | |
| 993 | + | |
| 994 | + | |
| 995 | + | |
| 996 | + | |
| 997 | + | |
| 998 | + | |
935 | 999 | | |
936 | 1000 | | |
937 | 1001 | | |
| |||
5643 | 5707 | | |
5644 | 5708 | | |
5645 | 5709 | | |
| 5710 | + | |
5646 | 5711 | | |
5647 | 5712 | | |
| 5713 | + | |
5648 | 5714 | | |
5649 | 5715 | | |
5650 | 5716 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
387 | 387 | | |
388 | 388 | | |
389 | 389 | | |
390 | | - | |
391 | | - | |
| 390 | + | |
| 391 | + | |
| 392 | + | |
| 393 | + | |
| 394 | + | |
| 395 | + | |
392 | 396 | | |
393 | 397 | | |
394 | 398 | | |
| |||
0 commit comments