summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/parser.rs11
1 files changed, 9 insertions, 2 deletions
diff --git a/src/parser.rs b/src/parser.rs
index 3fc03d57..32f46dff 100644
--- a/src/parser.rs
+++ b/src/parser.rs
@@ -201,13 +201,20 @@ fn decl_name(ctx: &mut ClangParserCtx, cursor: &Cursor) -> Global {
}
fn opaque_decl(ctx: &mut ClangParserCtx, decl: &Cursor) {
+ let spelling = decl.spelling();
+ let hide = ctx.options.blacklist_type.iter().any(|name| *name == spelling);
+
+ if hide {
+ return;
+ }
+
let name = decl_name(ctx, decl);
ctx.current_module_mut().globals.push(name);
}
fn fwd_decl<F:FnOnce(&mut ClangParserCtx)->()>(ctx: &mut ClangParserCtx, cursor: &Cursor, f: F) {
- let def = &cursor.definition();
- if cursor == def {
+ let def = cursor.definition();
+ if cursor == &def {
f(ctx);
} else if def.kind() == CXCursor_NoDeclFound ||
def.kind() == CXCursor_InvalidFile {