2017-06-16 06:43:02 +00:00
|
|
|
#define FOO(aaa, bbb) \
|
|
|
|
int a();\
|
|
|
|
int a() { return aaa + bbb; }
|
|
|
|
|
|
|
|
|
|
|
|
int make1() {
|
|
|
|
return 3;
|
|
|
|
}
|
|
|
|
const int make2 = 5;
|
|
|
|
|
|
|
|
|
|
|
|
FOO(make1(), make2);
|
|
|
|
|
|
|
|
/*
|
|
|
|
OUTPUT:
|
|
|
|
{
|
2017-12-12 05:15:37 +00:00
|
|
|
"includes": [],
|
|
|
|
"skipped_by_preprocessor": [],
|
|
|
|
"types": [],
|
2017-06-16 06:43:02 +00:00
|
|
|
"funcs": [{
|
|
|
|
"id": 0,
|
2017-12-02 01:07:03 +00:00
|
|
|
"is_operator": false,
|
2017-06-16 06:43:02 +00:00
|
|
|
"usr": "c:@F@make1#",
|
|
|
|
"short_name": "make1",
|
|
|
|
"detailed_name": "int make1()",
|
2017-12-12 05:15:37 +00:00
|
|
|
"declarations": [],
|
2017-06-16 06:43:02 +00:00
|
|
|
"definition_spelling": "6:5-6:10",
|
|
|
|
"definition_extent": "6:1-8:2",
|
2017-12-12 05:15:37 +00:00
|
|
|
"derived": [],
|
|
|
|
"locals": [],
|
|
|
|
"callers": ["1@12:5-12:10"],
|
|
|
|
"callees": []
|
2017-06-16 06:43:02 +00:00
|
|
|
}, {
|
|
|
|
"id": 1,
|
2017-12-02 01:07:03 +00:00
|
|
|
"is_operator": false,
|
2017-06-16 06:43:02 +00:00
|
|
|
"usr": "c:@F@a#",
|
|
|
|
"short_name": "a",
|
|
|
|
"detailed_name": "int a()",
|
|
|
|
"declarations": [{
|
|
|
|
"spelling": "12:1-12:20",
|
|
|
|
"extent": "12:1-12:20",
|
2017-12-12 05:15:37 +00:00
|
|
|
"content": "int a();\n int a() { return aaa + bbb; }\n\n\n int make1() {\n return 3;\n }\n const int make2 = 5;\n\n\n FOO(make1(), make2)",
|
|
|
|
"param_spellings": []
|
2017-06-16 06:43:02 +00:00
|
|
|
}],
|
|
|
|
"definition_spelling": "12:1-12:20",
|
|
|
|
"definition_extent": "12:1-12:20",
|
2017-12-12 05:15:37 +00:00
|
|
|
"derived": [],
|
|
|
|
"locals": [],
|
|
|
|
"callers": [],
|
2017-06-16 06:43:02 +00:00
|
|
|
"callees": ["0@12:5-12:10"]
|
|
|
|
}],
|
|
|
|
"vars": [{
|
|
|
|
"id": 0,
|
|
|
|
"usr": "c:complex.cc@make2",
|
|
|
|
"short_name": "make2",
|
|
|
|
"detailed_name": "const int make2",
|
|
|
|
"definition_spelling": "9:11-9:16",
|
|
|
|
"definition_extent": "9:1-9:20",
|
|
|
|
"is_local": false,
|
2017-06-29 06:25:19 +00:00
|
|
|
"is_macro": false,
|
2017-06-16 06:43:02 +00:00
|
|
|
"uses": ["9:11-9:16", "12:14-12:19"]
|
|
|
|
}, {
|
|
|
|
"id": 1,
|
|
|
|
"usr": "c:complex.cc@8@macro@FOO",
|
|
|
|
"short_name": "FOO",
|
2017-12-16 05:24:31 +00:00
|
|
|
"detailed_name": "#define FOO(aaa, bbb)\n int a();\n int a() { return aaa + bbb; }",
|
2017-06-16 06:43:02 +00:00
|
|
|
"definition_spelling": "1:9-1:12",
|
|
|
|
"definition_extent": "1:9-3:32",
|
|
|
|
"is_local": false,
|
2017-06-29 06:28:29 +00:00
|
|
|
"is_macro": true,
|
2017-06-16 06:43:02 +00:00
|
|
|
"uses": ["1:9-1:12", "12:1-12:4"]
|
|
|
|
}]
|
|
|
|
}
|
|
|
|
*/
|