Skip to content

#define referencing a struct does not generate bindings #1546

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
jgrund opened this issue Mar 28, 2019 · 2 comments
Closed

#define referencing a struct does not generate bindings #1546

jgrund opened this issue Mar 28, 2019 · 2 comments

Comments

@jgrund
Copy link

jgrund commented Mar 28, 2019

Consider the following:

#define lov_user_mds_data lov_user_mds_data_v1
struct lov_user_mds_data_v1
{
    int lmd_st;
};

Running:

bindgen wrapper.h -o /tmp/output.rs --whitelist-type lov_user_mds_data

generates an empty bindings file.

I would expect the file to contain the struct lov_user_mds_data_v1 aliased as lov_user_mds_data.

Output from running:

[2019-03-28T17:18:06Z INFO  bindgen] Clang Version: clang version 5.0.1 (tags/RELEASE_501/final)
[2019-03-28T17:18:06Z WARN  bindgen] Using clang (5, 0), expected (3, 9)
[2019-03-28T17:18:06Z DEBUG bindgen] Generating bindings, libclang at /opt/rh/llvm-toolset-7/root/usr/lib64/libclang.so.5.0
[2019-03-28T17:18:06Z DEBUG bindgen] Trying to find clang with flags: []
[2019-03-28T17:18:06Z DEBUG bindgen] Found clang: Clang { path: "/opt/rh/llvm-toolset-7/root/usr/bin/clang", version: Some(CXVersion { Major: 5, Minor: 0, Subminor: 1 }), c_search_paths: Some(["/usr/local/include", "/opt/rh/llvm-toolset-7/root/usr/lib64/clang/5.0.1/include", "/usr/include"]), cpp_search_paths: Some(["/opt/rh/devtoolset-7/root/usr/lib/gcc/x86_64-redhat-linux/7/../../../../include/c++/7", "/opt/rh/devtoolset-7/root/usr/lib/gcc/x86_64-redhat-linux/7/../../../../include/c++/7/x86_64-redhat-linux", "/opt/rh/devtoolset-7/root/usr/lib/gcc/x86_64-redhat-linux/7/../../../../include/c++/7/backward", "/usr/local/include", "/opt/rh/llvm-toolset-7/root/usr/lib64/clang/5.0.1/include", "/usr/include"]) }
[2019-03-28T17:18:06Z DEBUG bindgen] Fixed-up options: BindgenOptions { blacklisted_types: RegexSet { items: [], matched: [], set: Some(RegexSet([])), record_matches: true }, blacklisted_functions: RegexSet { items: [], matched: [], set: Some(RegexSet([])), record_matches: true }, blacklisted_items: RegexSet { items: [], matched: [], set: Some(RegexSet([])), record_matches: true }, opaque_types: RegexSet { items: [], matched: [], set: Some(RegexSet([])), record_matches: true }, rustfmt_path: None, whitelisted_types: RegexSet { items: ["lov_user_mds_data"], matched: [Cell { value: false }], set: Some(RegexSet(["^lov_user_mds_data$"])), record_matches: true }, whitelisted_functions: RegexSet { items: [], matched: [], set: Some(RegexSet([])), record_matches: true }, whitelisted_vars: RegexSet { items: [], matched: [], set: Some(RegexSet([])), record_matches: true }, default_enum_style: Consts, bitfield_enums: RegexSet { items: [], matched: [], set: Some(RegexSet([])), record_matches: true }, rustified_enums: RegexSet { items: [], matched: [], set: Some(RegexSet([])), record_matches: true }, constified_enum_modules: RegexSet { items: [], matched: [], set: Some(RegexSet([])), record_matches: true }, constified_enums: RegexSet { items: [], matched: [], set: Some(RegexSet([])), record_matches: true }, builtins: false, emit_ast: false, emit_ir: false, emit_ir_graphviz: None, enable_cxx_namespaces: false, enable_function_attribute_detection: false, disable_name_namespacing: false, layout_tests: true, impl_debug: false, impl_partialeq: false, derive_copy: true, derive_debug: true, derive_default: false, derive_hash: false, derive_partialord: false, derive_ord: false, derive_partialeq: false, derive_eq: false, use_core: false, ctypes_prefix: None, time_phases: false, namespaced_constants: true, msvc_mangling: false, convert_floats: true, raw_lines: [], module_lines: {}, clang_args: ["-isystem", "/usr/local/include", "-isystem", "/opt/rh/llvm-toolset-7/root/usr/lib64/clang/5.0.1/include", "-isystem", "/usr/include", "/integrated-manager-for-lustre/liblustreapi-sys/wrapper.h"], input_header: Some("/integrated-manager-for-lustre/liblustreapi-sys/wrapper.h"), input_unsaved_files: [], parse_callbacks: None, codegen_config: FUNCTIONS | TYPES | VARS | METHODS | CONSTRUCTORS | DESTRUCTORS, conservative_inline_namespaces: false, generate_comments: true, generate_inline_functions: false, whitelist_recursively: true, objc_extern_crate: false, generate_block: false, block_extern_crate: false, enable_mangling: true, detect_include_paths: true, prepend_enum_name: true, rust_target: Stable_1_33, rust_features: RustFeatures { untagged_union: true, associated_const: true, builtin_clone_impls: true, repr_align: true, i128_and_u128: true, must_use_function: true, repr_transparent: true, repr_packed_n: true, thiscall_abi: false }, record_matches: true, rustfmt_bindings: true, rustfmt_configuration_file: None, no_partialeq_types: RegexSet { items: [], matched: [], set: Some(RegexSet([])), record_matches: true }, no_copy_types: RegexSet { items: [], matched: [], set: Some(RegexSet([])), record_matches: true }, no_hash_types: RegexSet { items: [], matched: [], set: Some(RegexSet([])), record_matches: true } }
[2019-03-28T17:18:06Z DEBUG bindgen::ir::item] Item::from_ty_with_id: ItemId(1)
	ty = Type(, kind: Invalid, cconv: 100, decl: Cursor( kind: NoDeclFound, loc: builtin definitions, usr: None), canon: Cursor( kind: NoDeclFound, loc: builtin definitions, usr: None)),
	location = Cursor(lov_user_mds_data kind: macro definition, loc: /integrated-manager-for-lustre/liblustreapi-sys/wrapper.h:5:9, usr: Some("c:wrapper.h@161@macro@lov_user_mds_data"))
[2019-03-28T17:18:06Z DEBUG bindgen::ir::context] builtin_or_resolved_ty: Type(, kind: Invalid, cconv: 100, decl: Cursor( kind: NoDeclFound, loc: builtin definitions, usr: None), canon: Cursor( kind: NoDeclFound, loc: builtin definitions, usr: None)), Some(Cursor(lov_user_mds_data kind: macro definition, loc: /integrated-manager-for-lustre/liblustreapi-sys/wrapper.h:5:9, usr: Some("c:wrapper.h@161@macro@lov_user_mds_data"))), Some(ItemId(0))
[2019-03-28T17:18:06Z DEBUG bindgen::ir::context] Not resolved, maybe builtin?
[2019-03-28T17:18:06Z DEBUG bindgen::ir::context] builtin_or_resolved_ty: Type(, kind: Invalid, cconv: 100, decl: Cursor( kind: NoDeclFound, loc: builtin definitions, usr: None), canon: Cursor( kind: NoDeclFound, loc: builtin definitions, usr: None)), Some(Cursor(lov_user_mds_data kind: macro definition, loc: /integrated-manager-for-lustre/liblustreapi-sys/wrapper.h:5:9, usr: Some("c:wrapper.h@161@macro@lov_user_mds_data"))), Some(ItemId(0))
[2019-03-28T17:18:06Z DEBUG bindgen::ir::context] Not resolved, maybe builtin?
[2019-03-28T17:18:06Z DEBUG bindgen::ir::ty] from_clang_ty: ItemId(1), ty: Type(, kind: Invalid, cconv: 100, decl: Cursor( kind: NoDeclFound, loc: builtin definitions, usr: None), canon: Cursor( kind: NoDeclFound, loc: builtin definitions, usr: None)), loc: Cursor(lov_user_mds_data kind: macro definition, loc: /integrated-manager-for-lustre/liblustreapi-sys/wrapper.h:5:9, usr: Some("c:wrapper.h@161@macro@lov_user_mds_data"))
[2019-03-28T17:18:06Z DEBUG bindgen::ir::ty] currently_parsed_types: []
[2019-03-28T17:18:06Z WARN  bindgen::ir::ty] invalid type Type(, kind: Invalid, cconv: 100, decl: Cursor( kind: NoDeclFound, loc: builtin definitions, usr: None), canon: Cursor( kind: NoDeclFound, loc: builtin definitions, usr: None))
[2019-03-28T17:18:06Z DEBUG bindgen::ir::item] Unhandled cursor kind 501: Cursor(lov_user_mds_data kind: macro definition, loc: /integrated-manager-for-lustre/liblustreapi-sys/wrapper.h:5:9, usr: Some("c:wrapper.h@161@macro@lov_user_mds_data"))
[2019-03-28T17:18:06Z DEBUG bindgen::ir::item] Item::from_ty_with_id: ItemId(2)
	ty = Type(struct lov_user_mds_data_v1, kind: Record, cconv: 100, decl: Cursor(lov_user_mds_data_v1 kind: StructDecl, loc: /integrated-manager-for-lustre/liblustreapi-sys/wrapper.h:6:8, usr: Some("c:@S@lov_user_mds_data_v1")), canon: Cursor(lov_user_mds_data_v1 kind: StructDecl, loc: /integrated-manager-for-lustre/liblustreapi-sys/wrapper.h:6:8, usr: Some("c:@S@lov_user_mds_data_v1"))),
	location = Cursor(lov_user_mds_data_v1 kind: StructDecl, loc: /integrated-manager-for-lustre/liblustreapi-sys/wrapper.h:6:8, usr: Some("c:@S@lov_user_mds_data_v1"))
[2019-03-28T17:18:06Z DEBUG bindgen::ir::context] builtin_or_resolved_ty: Type(struct lov_user_mds_data_v1, kind: Record, cconv: 100, decl: Cursor(lov_user_mds_data_v1 kind: StructDecl, loc: /integrated-manager-for-lustre/liblustreapi-sys/wrapper.h:6:8, usr: Some("c:@S@lov_user_mds_data_v1")), canon: Cursor(lov_user_mds_data_v1 kind: StructDecl, loc: /integrated-manager-for-lustre/liblustreapi-sys/wrapper.h:6:8, usr: Some("c:@S@lov_user_mds_data_v1"))), Some(Cursor(lov_user_mds_data_v1 kind: StructDecl, loc: /integrated-manager-for-lustre/liblustreapi-sys/wrapper.h:6:8, usr: Some("c:@S@lov_user_mds_data_v1"))), Some(ItemId(0))
[2019-03-28T17:18:06Z DEBUG bindgen::ir::context] Not resolved, maybe builtin?
[2019-03-28T17:18:06Z DEBUG bindgen::ir::context] builtin_or_resolved_ty: Type(struct lov_user_mds_data_v1, kind: Record, cconv: 100, decl: Cursor(lov_user_mds_data_v1 kind: StructDecl, loc: /integrated-manager-for-lustre/liblustreapi-sys/wrapper.h:6:8, usr: Some("c:@S@lov_user_mds_data_v1")), canon: Cursor(lov_user_mds_data_v1 kind: StructDecl, loc: /integrated-manager-for-lustre/liblustreapi-sys/wrapper.h:6:8, usr: Some("c:@S@lov_user_mds_data_v1"))), Some(Cursor(lov_user_mds_data_v1 kind: StructDecl, loc: /integrated-manager-for-lustre/liblustreapi-sys/wrapper.h:6:8, usr: Some("c:@S@lov_user_mds_data_v1"))), Some(ItemId(0))
[2019-03-28T17:18:06Z DEBUG bindgen::ir::context] Not resolved, maybe builtin?
[2019-03-28T17:18:06Z DEBUG bindgen::ir::ty] from_clang_ty: ItemId(2), ty: Type(struct lov_user_mds_data_v1, kind: Record, cconv: 100, decl: Cursor(lov_user_mds_data_v1 kind: StructDecl, loc: /integrated-manager-for-lustre/liblustreapi-sys/wrapper.h:6:8, usr: Some("c:@S@lov_user_mds_data_v1")), canon: Cursor(lov_user_mds_data_v1 kind: StructDecl, loc: /integrated-manager-for-lustre/liblustreapi-sys/wrapper.h:6:8, usr: Some("c:@S@lov_user_mds_data_v1"))), loc: Cursor(lov_user_mds_data_v1 kind: StructDecl, loc: /integrated-manager-for-lustre/liblustreapi-sys/wrapper.h:6:8, usr: Some("c:@S@lov_user_mds_data_v1"))
[2019-03-28T17:18:06Z DEBUG bindgen::ir::ty] currently_parsed_types: [PartialType { decl: Cursor(lov_user_mds_data_v1 kind: StructDecl, loc: /integrated-manager-for-lustre/liblustreapi-sys/wrapper.h:6:8, usr: Some("c:@S@lov_user_mds_data_v1")), id: ItemId(2) }]
[2019-03-28T17:18:06Z DEBUG bindgen::ir::comp] CompInfo::from_ty(Struct, Cursor(lov_user_mds_data_v1 kind: StructDecl, loc: /integrated-manager-for-lustre/liblustreapi-sys/wrapper.h:6:8, usr: Some("c:@S@lov_user_mds_data_v1")))
[2019-03-28T17:18:06Z DEBUG bindgen::ir::item] from_ty_or_ref_with_id: ItemId(3) Type(int, kind: Int, cconv: 100, decl: Cursor( kind: NoDeclFound, loc: builtin definitions, usr: None), canon: Cursor( kind: NoDeclFound, loc: builtin definitions, usr: None)), Cursor(lmd_st kind: FieldDecl, loc: /integrated-manager-for-lustre/liblustreapi-sys/wrapper.h:8:9, usr: Some("c:@S@lov_user_mds_data_v1@FI@lmd_st")), Some(ItemId(2))
[2019-03-28T17:18:06Z DEBUG bindgen::ir::context] builtin_or_resolved_ty: Type(int, kind: Int, cconv: 100, decl: Cursor( kind: NoDeclFound, loc: builtin definitions, usr: None), canon: Cursor( kind: NoDeclFound, loc: builtin definitions, usr: None)), Some(Cursor(lmd_st kind: FieldDecl, loc: /integrated-manager-for-lustre/liblustreapi-sys/wrapper.h:8:9, usr: Some("c:@S@lov_user_mds_data_v1@FI@lmd_st"))), Some(ItemId(2))
[2019-03-28T17:18:06Z DEBUG bindgen::ir::context] Not resolved, maybe builtin?
[2019-03-28T17:18:06Z DEBUG bindgen::ir::context] add_builtin_item: item = Item { id: ItemId(4), local_id: Cell { value: None }, next_child_local_id: Cell { value: 1 }, canonical_name_cache: RefCell { value: None }, comment: None, annotations: Annotations { opaque: false, hide: false, use_instead_of: None, disallow_copy: false, private_fields: None, accessor_kind: None, constify_enum_variant: false, derives: [] }, parent_id: ItemId(0), kind: Type(Type { name: Some("int"), layout: Some(Layout { size: 4, align: 4, packed: false }), kind: Int(Int), is_const: false }) }
[2019-03-28T17:18:06Z DEBUG bindgen::ir::context] add_item_to_module: adding ItemId(4) as child of parent module ItemId(0)
[2019-03-28T17:18:06Z DEBUG bindgen::ir::item] TypeId(ItemId(4)) already resolved: Cursor(lmd_st kind: FieldDecl, loc: /integrated-manager-for-lustre/liblustreapi-sys/wrapper.h:8:9, usr: Some("c:@S@lov_user_mds_data_v1@FI@lmd_st"))
[2019-03-28T17:18:06Z DEBUG bindgen::ir::context] BindgenContext::add_item(Item { id: ItemId(2), local_id: Cell { value: None }, next_child_local_id: Cell { value: 1 }, canonical_name_cache: RefCell { value: None }, comment: None, annotations: Annotations { opaque: false, hide: false, use_instead_of: None, disallow_copy: false, private_fields: None, accessor_kind: None, constify_enum_variant: false, derives: [] }, parent_id: ItemId(0), kind: Type(Type { name: Some("lov_user_mds_data_v1"), layout: Some(Layout { size: 4, align: 4, packed: false }), kind: Comp(CompInfo { kind: Struct, fields: BeforeComputingBitfieldUnits([RawField(FieldData { name: Some("lmd_st"), ty: TypeId(ItemId(4)), comment: None, annotations: Annotations { opaque: false, hide: false, use_instead_of: None, disallow_copy: false, private_fields: None, accessor_kind: None, constify_enum_variant: false, derives: [] }, bitfield_width: None, mutable: false, offset: Some(0) })]), template_params: [], methods: [], constructors: [], destructor: None, base_members: [], inner_types: [], inner_vars: [], has_own_virtual_method: false, has_destructor: false, has_nonempty_base: false, has_non_type_template_params: false, packed_attr: false, found_unknown_attr: false, is_forward_declaration: false }), is_const: false }) }, declaration: Some(Cursor(lov_user_mds_data_v1 kind: StructDecl, loc: /integrated-manager-for-lustre/liblustreapi-sys/wrapper.h:6:8, usr: Some("c:@S@lov_user_mds_data_v1"))), loc: Some(Cursor(lov_user_mds_data_v1 kind: StructDecl, loc: /integrated-manager-for-lustre/liblustreapi-sys/wrapper.h:6:8, usr: Some("c:@S@lov_user_mds_data_v1")))
[2019-03-28T17:18:06Z DEBUG bindgen::ir::context] add_item_to_module: adding ItemId(2) as child of parent module ItemId(0)
[2019-03-28T17:18:06Z DEBUG bindgen::ir::context] No replacements to process
[2019-03-28T17:18:06Z DEBUG bindgen::ir::context] whitelisted_items: testing ""
[2019-03-28T17:18:06Z DEBUG bindgen::ir::context] whitelisted_items: testing "lov_user_mds_data_v1"
[2019-03-28T17:18:06Z DEBUG bindgen::ir::context] whitelisted_items: testing "int"
[2019-03-28T17:18:06Z ERROR bindgen::ir::context] unused option: --whitelist-type lov_user_mds_data
[2019-03-28T17:18:06Z TRACE bindgen::ir::analysis::has_vtable] constrain ItemId(0)
[2019-03-28T17:18:06Z TRACE bindgen::ir::analysis::template_params] constrain ItemId(0)
[2019-03-28T17:18:06Z TRACE bindgen::ir::analysis::template_params]   initially, used set is {}
[2019-03-28T17:18:06Z TRACE bindgen::ir::analysis::template_params]     other item: join with successors' usage
[2019-03-28T17:18:06Z TRACE bindgen::ir::analysis::template_params]   finally, used set is {}
[2019-03-28T17:18:06Z TRACE bindgen::ir::analysis::derive] constrain: ItemId(0)
[2019-03-28T17:18:06Z TRACE bindgen::ir::analysis::derive]     can derive Debug because there are no members
[2019-03-28T17:18:06Z TRACE bindgen::ir::analysis::derive] inserting ItemId(0) can_derive<Debug>=Yes
[2019-03-28T17:18:06Z TRACE bindgen::ir::analysis::derive] constrain: ItemId(0)
[2019-03-28T17:18:06Z TRACE bindgen::ir::analysis::derive]     can derive Copy because there are no members
[2019-03-28T17:18:06Z TRACE bindgen::ir::analysis::derive] inserting ItemId(0) can_derive<Copy>=Yes
[2019-03-28T17:18:06Z TRACE bindgen::ir::analysis::has_type_param_in_array] constrain: ItemId(0)
[2019-03-28T17:18:06Z TRACE bindgen::ir::analysis::has_type_param_in_array]     not a type; ignoring
[2019-03-28T17:18:06Z DEBUG bindgen::codegen] codegen: BindgenOptions { blacklisted_types: RegexSet { items: [], matched: [], set: Some(RegexSet([])), record_matches: true }, blacklisted_functions: RegexSet { items: [], matched: [], set: Some(RegexSet([])), record_matches: true }, blacklisted_items: RegexSet { items: [], matched: [], set: Some(RegexSet([])), record_matches: true }, opaque_types: RegexSet { items: [], matched: [], set: Some(RegexSet([])), record_matches: true }, rustfmt_path: None, whitelisted_types: RegexSet { items: ["lov_user_mds_data"], matched: [Cell { value: false }], set: Some(RegexSet(["^lov_user_mds_data$"])), record_matches: true }, whitelisted_functions: RegexSet { items: [], matched: [], set: Some(RegexSet([])), record_matches: true }, whitelisted_vars: RegexSet { items: [], matched: [], set: Some(RegexSet([])), record_matches: true }, default_enum_style: Consts, bitfield_enums: RegexSet { items: [], matched: [], set: Some(RegexSet([])), record_matches: true }, rustified_enums: RegexSet { items: [], matched: [], set: Some(RegexSet([])), record_matches: true }, constified_enum_modules: RegexSet { items: [], matched: [], set: Some(RegexSet([])), record_matches: true }, constified_enums: RegexSet { items: [], matched: [], set: Some(RegexSet([])), record_matches: true }, builtins: false, emit_ast: false, emit_ir: false, emit_ir_graphviz: None, enable_cxx_namespaces: false, enable_function_attribute_detection: false, disable_name_namespacing: false, layout_tests: true, impl_debug: false, impl_partialeq: false, derive_copy: true, derive_debug: true, derive_default: false, derive_hash: false, derive_partialord: false, derive_ord: false, derive_partialeq: false, derive_eq: false, use_core: false, ctypes_prefix: None, time_phases: false, namespaced_constants: true, msvc_mangling: false, convert_floats: true, raw_lines: [], module_lines: {}, clang_args: ["-isystem", "/usr/local/include", "-isystem", "/opt/rh/llvm-toolset-7/root/usr/lib64/clang/5.0.1/include", "-isystem", "/usr/include", "/integrated-manager-for-lustre/liblustreapi-sys/wrapper.h"], input_header: Some("/integrated-manager-for-lustre/liblustreapi-sys/wrapper.h"), input_unsaved_files: [], parse_callbacks: None, codegen_config: FUNCTIONS | TYPES | VARS | METHODS | CONSTRUCTORS | DESTRUCTORS, conservative_inline_namespaces: false, generate_comments: true, generate_inline_functions: false, whitelist_recursively: true, objc_extern_crate: false, generate_block: false, block_extern_crate: false, enable_mangling: true, detect_include_paths: true, prepend_enum_name: true, rust_target: Stable_1_33, rust_features: RustFeatures { untagged_union: true, associated_const: true, builtin_clone_impls: true, repr_align: true, i128_and_u128: true, must_use_function: true, repr_transparent: true, repr_packed_n: true, thiscall_abi: false }, record_matches: true, rustfmt_bindings: true, rustfmt_configuration_file: None, no_partialeq_types: RegexSet { items: [], matched: [], set: Some(RegexSet([])), record_matches: true }, no_copy_types: RegexSet { items: [], matched: [], set: Some(RegexSet([])), record_matches: true }, no_hash_types: RegexSet { items: [], matched: [], set: Some(RegexSet([])), record_matches: true } }
[2019-03-28T17:18:06Z DEBUG bindgen::codegen] <Item as CodeGenerator>::codegen: self = Item { id: ItemId(0), local_id: Cell { value: None }, next_child_local_id: Cell { value: 1 }, canonical_name_cache: RefCell { value: None }, comment: None, annotations: Annotations { opaque: false, hide: false, use_instead_of: None, disallow_copy: false, private_fields: None, accessor_kind: None, constify_enum_variant: false, derives: [] }, parent_id: ItemId(0), kind: Module(Module { name: Some("root"), kind: Normal, children: {ItemId(2), ItemId(4)} }) }
[2019-03-28T17:18:06Z DEBUG bindgen::codegen] <Module as CodeGenerator>::codegen: item = Item { id: ItemId(0), local_id: Cell { value: None }, next_child_local_id: Cell { value: 1 }, canonical_name_cache: RefCell { value: None }, comment: None, annotations: Annotations { opaque: false, hide: false, use_instead_of: None, disallow_copy: false, private_fields: None, accessor_kind: None, constify_enum_variant: false, derives: [] }, parent_id: ItemId(0), kind: Module(Module { name: Some("root"), kind: Normal, children: {ItemId(2), ItemId(4)} }) }
@emilio
Copy link
Contributor

emilio commented Mar 28, 2019

I'm not sure my expectation matches yours, what bindgen does there seems pretty reasonable.

#define is not a reasonable way to alias anything. Bindgen generates the right thing if you use a typedef instead as expected, but #defines in C could literally be anything.

We do a decent-ish job at handling macros that are just constants, but not sure we want to get into the business of trying to guess whether your macro is supposed to be a typedef to a struct or union, an enum variant defined somewhere else, a local variable name, ...

@emilio
Copy link
Contributor

emilio commented Oct 8, 2019

Let's merge this into #258, it seems the same underlying issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants