parent
3aaa73020d
commit
51c2fc6569
2 changed files with 7 additions and 1 deletions
|
|
@ -308,6 +308,10 @@ Extent get_extent(const CXTranslationUnit& tu, const CXFile& file, const CXCurso
|
||||||
}
|
}
|
||||||
else if (cursor_is_var(kind) || cursor_is_var(clang_getTemplateCursorKind(cur)))
|
else if (cursor_is_var(kind) || cursor_is_var(clang_getTemplateCursorKind(cur)))
|
||||||
{
|
{
|
||||||
|
// need to extend until the semicolon
|
||||||
|
while (!token_at_is(tu, file, end, ";"))
|
||||||
|
end = get_next_location(tu, file, end, 1);
|
||||||
|
|
||||||
if (has_inline_type_definition(cur))
|
if (has_inline_type_definition(cur))
|
||||||
{
|
{
|
||||||
// the type is declared inline,
|
// the type is declared inline,
|
||||||
|
|
|
||||||
|
|
@ -248,6 +248,8 @@ struct [[inline_type]] inline_type
|
||||||
[[field]] int field;
|
[[field]] int field;
|
||||||
}
|
}
|
||||||
[[s]] s;
|
[[s]] s;
|
||||||
|
|
||||||
|
int t [[t]];
|
||||||
)";
|
)";
|
||||||
|
|
||||||
auto file = parse({}, "cpp_attribute__matching.cpp", code);
|
auto file = parse({}, "cpp_attribute__matching.cpp", code);
|
||||||
|
|
@ -275,5 +277,5 @@ struct [[inline_type]] inline_type
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
});
|
});
|
||||||
REQUIRE(count == 43u);
|
REQUIRE(count == 44u);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue