Handle parsing of extern templates
This commit is contained in:
parent
da3d515d09
commit
0875721452
2 changed files with 11 additions and 1 deletions
|
|
@ -24,6 +24,10 @@ namespace
|
||||||
|
|
||||||
detail::skip_if(stream, "friend");
|
detail::skip_if(stream, "friend");
|
||||||
|
|
||||||
|
if (detail::skip_if(stream, "extern"))
|
||||||
|
// extern template
|
||||||
|
detail::skip(stream, "template");
|
||||||
|
|
||||||
switch (kind)
|
switch (kind)
|
||||||
{
|
{
|
||||||
case CXCursor_ClassDecl:
|
case CXCursor_ClassDecl:
|
||||||
|
|
|
||||||
|
|
@ -92,6 +92,12 @@ class a<T*> {};
|
||||||
/// };
|
/// };
|
||||||
template <typename T>
|
template <typename T>
|
||||||
struct b<0, T> {};
|
struct b<0, T> {};
|
||||||
|
|
||||||
|
// extern template for good measure
|
||||||
|
// currently not really supported but parsing must not fail
|
||||||
|
/// template<>
|
||||||
|
/// class a<int>;
|
||||||
|
extern template class a<int>;
|
||||||
)";
|
)";
|
||||||
|
|
||||||
cpp_entity_index idx;
|
cpp_entity_index idx;
|
||||||
|
|
@ -263,5 +269,5 @@ struct b<0, T> {};
|
||||||
else
|
else
|
||||||
REQUIRE(false);
|
REQUIRE(false);
|
||||||
});
|
});
|
||||||
REQUIRE(count == 4u);
|
REQUIRE(count == 5u);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue