diff options
author | bors-servo <lbergstrom+bors@mozilla.com> | 2016-12-13 11:54:14 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-12-13 11:54:14 -0800 |
commit | a24cabf6dbb893bdcb42bb5b4a09a30e48c5004a (patch) | |
tree | 5b0436ec0b6eeb033a9644912ee860683dbd0504 /libbindgen/src | |
parent | f02edbe10952f1a3b5350563591afed52b534921 (diff) | |
parent | 8f0320d1b0c7a1f9ddf93ecf453af0a2266ec552 (diff) |
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`
Diffstat (limited to 'libbindgen/src')
-rw-r--r-- | libbindgen/src/ir/item.rs | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/libbindgen/src/ir/item.rs b/libbindgen/src/ir/item.rs index 301085dc..00c29822 100644 --- a/libbindgen/src/ir/item.rs +++ b/libbindgen/src/ir/item.rs @@ -950,6 +950,7 @@ impl ClangItemParser for Item { CXCursor_MacroDefinition | CXCursor_MacroExpansion | CXCursor_UsingDeclaration | + CXCursor_UsingDirective | CXCursor_StaticAssert | CXCursor_InclusionDirective => { debug!("Unhandled cursor kind {:?}: {:?}", @@ -957,9 +958,13 @@ impl ClangItemParser for Item { cursor); } _ => { - error!("Unhandled cursor kind {:?}: {:?}", - cursor.kind(), - cursor); + // ignore toplevel operator overloads + let spelling = cursor.spelling(); + if !spelling.starts_with("operator") { + error!("Unhandled cursor kind {:?}: {:?}", + cursor.kind(), + cursor); + } } } |