summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/clang.rs2
-rw-r--r--src/lib.rs2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/clang.rs b/src/clang.rs
index 6af5d2c9..fc7950dc 100644
--- a/src/clang.rs
+++ b/src/clang.rs
@@ -80,7 +80,7 @@ impl Cursor {
/// Returns whether the cursor refers to a built-in definition.
pub fn is_builtin(&self) -> bool {
let (file, _, _, _) = self.location().location();
- !file.name().is_some()
+ file.name().is_none()
}
/// Get the `Cursor` for this cursor's referent's lexical parent.
diff --git a/src/lib.rs b/src/lib.rs
index 5d4df26a..30d9987b 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -826,7 +826,7 @@ impl<'ctx> Bindings<'ctx> {
/// Determines whether the given cursor is in any of the files matched by the
/// options.
fn filter_builtins(ctx: &BindgenContext, cursor: &clang::Cursor) -> bool {
- !cursor.is_builtin() || ctx.options().builtins
+ ctx.options().builtins || !cursor.is_builtin()
}
/// Parse one `Item` from the Clang cursor.