diff options
author | bors-servo <lbergstrom+bors@mozilla.com> | 2016-12-21 11:25:54 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-12-21 11:25:54 -0800 |
commit | 96e5d770eccb9b56b01aa1fd30e04e885d107ad0 (patch) | |
tree | 0efa8aa8333ecb123147bcd741ab88afbb1f304a /libbindgen/src | |
parent | d80b797754e7d84516999e32c3448b9b38632a59 (diff) | |
parent | 50a3a6ba89f6e3104ce50f72995b01850f6aff55 (diff) |
Auto merge of #352 - emilio:auto, r=fitzgen
ir: Handle CXType_Auto.
Fixes #351
Diffstat (limited to 'libbindgen/src')
-rw-r--r-- | libbindgen/src/ir/ty.rs | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/libbindgen/src/ir/ty.rs b/libbindgen/src/ir/ty.rs index 3d379969..ada3d9b1 100644 --- a/libbindgen/src/ir/ty.rs +++ b/libbindgen/src/ir/ty.rs @@ -780,6 +780,15 @@ impl Type { return Err(ParseError::Continue); } } + CXType_Auto => { + // We don't want to blow the stack. + assert!(canonical_ty != *ty, "Couldn't find deduced type"); + return Self::from_clang_ty(potential_id, + &canonical_ty, + location, + parent_id, + ctx); + } // NOTE: We don't resolve pointers eagerly because the pointee type // might not have been parsed, and if it contains templates or // something else we might get confused, see the comment inside |