diff options
-rw-r--r-- | src/parser.rs | 2 | ||||
-rw-r--r-- | tests/headers/class_nested.hpp | 7 |
2 files changed, 8 insertions, 1 deletions
diff --git a/src/parser.rs b/src/parser.rs index 9469ff72..dc4b6e06 100644 --- a/src/parser.rs +++ b/src/parser.rs @@ -614,7 +614,7 @@ fn visit_composite(cursor: &Cursor, parent: &Cursor, let field = FieldInfo::new(name, ty, comment, bitfields); ci.members.push(CompMember::Field(field)); } - CXCursor_StructDecl | CXCursor_UnionDecl => { + CXCursor_ClassDecl | CXCursor_StructDecl | CXCursor_UnionDecl => { fwd_decl(ctx, cursor, |ctx_| { // If the struct is anonymous (i.e. declared here) then it // cannot be used elsewhere and so does not need to be added diff --git a/tests/headers/class_nested.hpp b/tests/headers/class_nested.hpp new file mode 100644 index 00000000..e9c07d64 --- /dev/null +++ b/tests/headers/class_nested.hpp @@ -0,0 +1,7 @@ +class A { + int member_a; + class B { + int member_b; + }; +}; + |