Open
Description
I think this is because member_function_t
is not treated as a container in detail::visit
, and simply the callback is called instead of recursive visitation. I'd assume standardese would need to parse function paramters, wouldn't it?
- cppast version: 2be20f6
- parser:
libclang_parser
- clang version: 4.0
Explanation of the error.
Input:
auto code = R"(
class foo {
void f(int a, int b){};
};
)";
cpp_entity_index idx;
auto file = parse(idx, "cpp_class.cpp", code);
unsigned filtered_count = 0;
auto visitor_callback = [&](const cpp_entity &e, cppast::visitor_info info) {
if (info.event == cppast::visitor_info::container_entity_exit)
return true;
std::cout << e.name() << " : " << cppast::to_string(e.kind()) << "\n";
};
cppast::visit(*file, visitor_callback);
Output:
cpp_class.cpp : file
foo : class
f : member function
I would expect the function parameters a
and b
to be visible in the output.