From 9763aa5faf773df0804ac0be544b6e01ab79e38d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emilio=20Cobos=20=C3=81lvarez?= Date: Tue, 18 Oct 2022 02:21:54 +0200 Subject: [PATCH] Plus valid ident check. --- bindgen/ir/ty.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bindgen/ir/ty.rs b/bindgen/ir/ty.rs index 19974ade56..32c831146a 100644 --- a/bindgen/ir/ty.rs +++ b/bindgen/ir/ty.rs @@ -1193,7 +1193,7 @@ impl Type { } }; - name = name.filter(|n| !n.is_empty()); + name = name.filter(|n| !n.is_empty() && clang::is_valid_identifier(n)); let is_const = ty.is_const() || (ty.kind() == CXType_ConstantArray &&