summaryrefslogtreecommitdiff
path: root/libbindgen/src
diff options
context:
space:
mode:
authorbors-servo <lbergstrom+bors@mozilla.com>2016-12-28 01:47:57 -0800
committerGitHub <noreply@github.com>2016-12-28 01:47:57 -0800
commitba1cb0a005cae7b7eac48673d1af317f181325b1 (patch)
treee76647498967883c068199869754eb82ebdb7ed6 /libbindgen/src
parent3ba3a76f8c7f393c81bc14eb497ae2b3047ead98 (diff)
parent912abe5b584960e9c15a3cd050f965ab69bf5f7e (diff)
Auto merge of #365 - upsuper:skip-functpl, r=emilio
ir: Skip function template earlier. This fixes #364. r? @emilio
Diffstat (limited to 'libbindgen/src')
-rw-r--r--libbindgen/src/ir/function.rs5
1 files changed, 5 insertions, 0 deletions
diff --git a/libbindgen/src/ir/function.rs b/libbindgen/src/ir/function.rs
index 7aed3d7e..88ab861d 100644
--- a/libbindgen/src/ir/function.rs
+++ b/libbindgen/src/ir/function.rs
@@ -134,6 +134,11 @@ impl FunctionSig {
use clang_sys::*;
debug!("FunctionSig::from_ty {:?} {:?}", ty, cursor);
+ // Skip function templates
+ if cursor.kind() == CXCursor_FunctionTemplate {
+ return Err(ParseError::Continue);
+ }
+
// Don't parse operatorxx functions in C++
let spelling = cursor.spelling();
if spelling.starts_with("operator") {