mirror of
https://github.com/MaskRay/ccls.git
synced 2024-11-24 08:35:08 +00:00
Improve comment and outline
This commit is contained in:
parent
f87ee1323c
commit
bde0e6d837
@ -25,7 +25,7 @@ OUTPUT:
|
|||||||
"storage": 0,
|
"storage": 0,
|
||||||
"declarations": ["12:1-12:20|0|1|1"],
|
"declarations": ["12:1-12:20|0|1|1"],
|
||||||
"spell": "12:1-12:20|0|1|2",
|
"spell": "12:1-12:20|0|1|2",
|
||||||
"extent": "1:1-1:1|0|1|0",
|
"extent": "12:1-12:20|0|1|0",
|
||||||
"bases": [],
|
"bases": [],
|
||||||
"derived": [],
|
"derived": [],
|
||||||
"vars": [],
|
"vars": [],
|
||||||
|
@ -21,7 +21,7 @@ OUTPUT:
|
|||||||
"storage": 0,
|
"storage": 0,
|
||||||
"declarations": [],
|
"declarations": [],
|
||||||
"spell": "5:12-5:15|15041163540773201510|2|1026",
|
"spell": "5:12-5:15|15041163540773201510|2|1026",
|
||||||
"extent": "1:1-1:1|15041163540773201510|2|0",
|
"extent": "5:12-5:15|15041163540773201510|2|0",
|
||||||
"bases": [],
|
"bases": [],
|
||||||
"derived": [],
|
"derived": [],
|
||||||
"vars": [],
|
"vars": [],
|
||||||
|
@ -338,7 +338,10 @@ public:
|
|||||||
p++;
|
p++;
|
||||||
if (p < E && *p == ' ')
|
if (p < E && *p == ' ')
|
||||||
p++;
|
p++;
|
||||||
pad = int(p - begin);
|
if (p + 1 == q)
|
||||||
|
p++;
|
||||||
|
else
|
||||||
|
pad = int(p - begin);
|
||||||
} else {
|
} else {
|
||||||
// Other lines, skip |pad| bytes
|
// Other lines, skip |pad| bytes
|
||||||
int prefix = pad;
|
int prefix = pad;
|
||||||
@ -611,9 +614,13 @@ public:
|
|||||||
auto do_def_decl = [&](auto *entity) {
|
auto do_def_decl = [&](auto *entity) {
|
||||||
if (is_def) {
|
if (is_def) {
|
||||||
entity->def.spell = GetUse(db, loc, SemDC, role);
|
entity->def.spell = GetUse(db, loc, SemDC, role);
|
||||||
|
SourceRange R = OrigD->getSourceRange();
|
||||||
entity->def.extent =
|
entity->def.extent =
|
||||||
GetUse(db, FromTokenRange(SM, Lang, OrigD->getSourceRange()), LexDC,
|
GetUse(db,
|
||||||
Role::None);
|
R.getBegin().isFileID()
|
||||||
|
? FromTokenRange(SM, Lang, OrigD->getSourceRange())
|
||||||
|
: loc,
|
||||||
|
LexDC, Role::None);
|
||||||
} else if (is_decl) {
|
} else if (is_decl) {
|
||||||
entity->declarations.push_back(GetUse(db, loc, LexDC, role));
|
entity->declarations.push_back(GetUse(db, loc, LexDC, role));
|
||||||
} else {
|
} else {
|
||||||
|
Loading…
Reference in New Issue
Block a user