Add index test for #131

This commit is contained in:
Jacob Dufault 2017-12-12 00:27:25 -08:00
parent 17f23bf3bf
commit 48a7ec73eb

43
tests/types/typedefs.cc Normal file
View File

@ -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": []
}
*/