summaryrefslogtreecommitdiff
path: root/bindgen/ir/comp.rs
diff options
context:
space:
mode:
Diffstat (limited to 'bindgen/ir/comp.rs')
-rw-r--r--bindgen/ir/comp.rs3
1 files changed, 1 insertions, 2 deletions
diff --git a/bindgen/ir/comp.rs b/bindgen/ir/comp.rs
index f44c5d67..039742a4 100644
--- a/bindgen/ir/comp.rs
+++ b/bindgen/ir/comp.rs
@@ -1422,8 +1422,7 @@ impl CompInfo {
// A declaration of an union or a struct without name
// could also be an unnamed field, unfortunately.
- if cur.spelling().is_empty() &&
- cur.kind() != CXCursor_EnumDecl
+ if cur.is_anonymous() && cur.kind() != CXCursor_EnumDecl
{
let ty = cur.cur_type();
let public = cur.public_accessible();