mirror of
https://github.com/MaskRay/ccls.git
synced 2024-11-25 17:11:59 +00:00
Mark macros in index.
This commit is contained in:
parent
b5305e14f2
commit
6ab8a27313
@ -848,6 +848,7 @@ clang::VisiterResult VisitMacroDefinitionAndExpansions(clang::Cursor cursor, cla
|
||||
var_def->def.short_name = cursor.get_display_name();
|
||||
var_def->def.detailed_name = var_def->def.short_name;
|
||||
var_def->def.is_local = false;
|
||||
var_def->def.is_macro = true;
|
||||
var_def->def.definition_spelling = decl_loc_spelling;
|
||||
var_def->def.definition_extent = ResolveExtent(cursor.cx_cursor);;
|
||||
}
|
||||
|
@ -54,7 +54,7 @@ OUTPUT:
|
||||
"definition_spelling": "1:9-1:12",
|
||||
"definition_extent": "1:9-3:32",
|
||||
"is_local": false,
|
||||
"is_macro": false,
|
||||
"is_macro": true,
|
||||
"uses": ["1:9-1:12", "12:1-12:4"]
|
||||
}]
|
||||
}
|
||||
|
@ -37,7 +37,7 @@ OUTPUT:
|
||||
"definition_spelling": "1:9-1:10",
|
||||
"definition_extent": "1:9-1:12",
|
||||
"is_local": false,
|
||||
"is_macro": false,
|
||||
"is_macro": true,
|
||||
"uses": ["1:9-1:10", "8:9-8:10"]
|
||||
}, {
|
||||
"id": 2,
|
||||
@ -47,7 +47,7 @@ OUTPUT:
|
||||
"definition_spelling": "2:9-2:17",
|
||||
"definition_extent": "2:9-2:46",
|
||||
"is_local": false,
|
||||
"is_macro": false,
|
||||
"is_macro": true,
|
||||
"uses": ["2:9-2:17", "5:3-5:11"]
|
||||
}]
|
||||
}
|
||||
|
@ -14,7 +14,7 @@ OUTPUT:
|
||||
"definition_spelling": "2:9-2:12",
|
||||
"definition_extent": "2:9-2:12",
|
||||
"is_local": false,
|
||||
"is_macro": false,
|
||||
"is_macro": true,
|
||||
"uses": ["2:9-2:12"]
|
||||
}]
|
||||
}
|
||||
|
@ -38,7 +38,7 @@ OUTPUT:
|
||||
"definition_spelling": "1:9-1:19",
|
||||
"definition_extent": "1:9-1:24",
|
||||
"is_local": false,
|
||||
"is_macro": false,
|
||||
"is_macro": true,
|
||||
"uses": ["1:9-1:19", "6:3-6:13"]
|
||||
}]
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user