Skip to content

Commit 8dbc5b6

Browse files
committed
Report mods in callbacks, and item parentage.
This makes two complementary improvements to the ParseCallbacks. The first is that Mods are now announced, as a new type of DiscoveredItem. The second is that the parentage of each item is announced. The parent of an item is often a mod (i.e. a C++ namespace) but not necessarily - it might be a struct within a struct, or similar. The reported information here is dependent on two pre-existing bindgen options: * whether to report C++ namespaces at all * whether to report inline namespaces conservatively. For that reason, the test suite gains two new tests. Part of google/autocxx#124
1 parent 743c469 commit 8dbc5b6

File tree

4 files changed

+445
-16
lines changed

4 files changed

+445
-16
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
void a();
2+
3+
namespace B {
4+
void c();
5+
6+
namespace D {
7+
void e();
8+
}
9+
10+
// We should not report empty namespaces
11+
namespace F {
12+
}
13+
14+
namespace {
15+
void g();
16+
}
17+
18+
inline namespace H {
19+
void i();
20+
namespace J {
21+
void k();
22+
}
23+
}
24+
25+
struct L {
26+
struct M {
27+
28+
};
29+
};
30+
};

0 commit comments

Comments
 (0)