Skip to content

Commit

Permalink
Add test for respect-cxx-access-specs and visibility annotations
Browse files Browse the repository at this point in the history
  • Loading branch information
Jethro Beekman committed May 19, 2023
1 parent 948d0d4 commit af66f4a
Show file tree
Hide file tree
Showing 2 changed files with 106 additions and 1 deletion.
91 changes: 91 additions & 0 deletions bindgen-tests/tests/expectations/tests/private_fields.rs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

16 changes: 15 additions & 1 deletion bindgen-tests/tests/headers/private_fields.hpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
// bindgen-flags: --respect-cxx-access-specs

class PubPriv {
public:
int x;
Expand Down Expand Up @@ -41,4 +42,17 @@ class WithAnonStruct {

class WithAnonUnion {
union {};
};
};

class Override {
public:
unsigned int a;
// override with annotation
/** <div rustbindgen private></div> */
unsigned int b;

unsigned int bf_a : 4;
// override with annotation
/** <div rustbindgen private></div> */
unsigned int bf_b : 4;
};

0 comments on commit af66f4a

Please sign in to comment.