Skip to content

Commit a24cabf

Browse files
author
bors-servo
authored
Auto merge of #336 - vvuk:misc-fix, r=emilio
Silence the 'Unhandled cursor kind' warning for a few things For toplevel operator overload, and for `CXCursor_UsingDirective`
2 parents f02edbe + 8f0320d commit a24cabf

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

libbindgen/src/ir/item.rs

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -950,16 +950,21 @@ impl ClangItemParser for Item {
950950
CXCursor_MacroDefinition |
951951
CXCursor_MacroExpansion |
952952
CXCursor_UsingDeclaration |
953+
CXCursor_UsingDirective |
953954
CXCursor_StaticAssert |
954955
CXCursor_InclusionDirective => {
955956
debug!("Unhandled cursor kind {:?}: {:?}",
956957
cursor.kind(),
957958
cursor);
958959
}
959960
_ => {
960-
error!("Unhandled cursor kind {:?}: {:?}",
961-
cursor.kind(),
962-
cursor);
961+
// ignore toplevel operator overloads
962+
let spelling = cursor.spelling();
963+
if !spelling.starts_with("operator") {
964+
error!("Unhandled cursor kind {:?}: {:?}",
965+
cursor.kind(),
966+
cursor);
967+
}
963968
}
964969
}
965970

0 commit comments

Comments
 (0)