C++: add tests for ArrayType typedef resolution

This commit is contained in:
idrissrio
2025-06-17 18:47:42 +02:00
parent 9fb47cc125
commit 3f595fdd03
3 changed files with 16 additions and 0 deletions

View File

@@ -0,0 +1,7 @@
typedef int int_t;
int_t g1[10];
int_t g2[2][4];
typedef float float_t;
float_t arr1[5];
float_t (*a_pointer)[10];

View File

@@ -0,0 +1,5 @@
| file://:0:0:0:0 | float_t[5] | file://:0:0:0:0 | float_t[5] | ArrayTypedefs.cpp:6:9:6:12 | definition of arr1 |
| file://:0:0:0:0 | float_t[10] | file://:0:0:0:0 | float_t[10] | ArrayTypedefs.cpp:7:11:7:19 | definition of a_pointer |
| file://:0:0:0:0 | int_t[2][4] | file://:0:0:0:0 | int_t[2][4] | ArrayTypedefs.cpp:3:7:3:8 | definition of g2 |
| file://:0:0:0:0 | int_t[4] | file://:0:0:0:0 | int_t[4] | ArrayTypedefs.cpp:3:7:3:8 | definition of g2 |
| file://:0:0:0:0 | int_t[10] | file://:0:0:0:0 | int_t[10] | ArrayTypedefs.cpp:2:7:2:8 | definition of g1 |

View File

@@ -0,0 +1,4 @@
import cpp
from ArrayType type
select type, type.resolveTypedefs(), type.getATypeNameUse()