diff --git a/tests/types/typedefs.cc b/tests/types/typedefs.cc new file mode 100644 index 00000000..5406d264 --- /dev/null +++ b/tests/types/typedefs.cc @@ -0,0 +1,43 @@ +typedef int (func)(const int *a, const int *b); +static func g; + +/* +OUTPUT: +{ + "includes": [], + "skipped_by_preprocessor": [], + "types": [{ + "id": 0, + "usr": "c:typedefs.cc@T@func", + "short_name": "func", + "detailed_name": "func", + "definition_spelling": "1:14-1:18", + "definition_extent": "1:1-1:47", + "parents": [], + "derived": [], + "types": [], + "funcs": [], + "vars": [], + "instances": [], + "uses": ["1:14-1:18", "2:8-2:12"] + }], + "funcs": [{ + "id": 0, + "is_operator": false, + "usr": "c:typedefs.cc@F@g#*1I#S0_#", + "short_name": "g", + "detailed_name": "func g", + "declarations": [{ + "spelling": "2:13-2:14", + "extent": "2:1-2:14", + "content": "static func g", + "param_spellings": ["2:13-2:13", "2:13-2:13"] + }], + "derived": [], + "locals": [], + "callers": [], + "callees": [] + }], + "vars": [] +} +*/ \ No newline at end of file