Skip to content

Feature Request: Add a compact style for ccall-wrapper functions #407

Description

@Gnimuc

By default, Clang.jl will simply generate 3-line-ccall-wrapper functions like:

@checked function zeDriverGetIpcProperties(hDriver, pIpcProperties)
    ccall((:zeDriverGetIpcProperties, libze_loader), ze_result_t, (ze_driver_handle_t, Ptr{ze_driver_ipc_properties_t}), hDriver, pIpcProperties)
end

@maleadt implemented an indenting pass which can format the code above in a style of:

@checked function zeDriverGetIpcProperties(hDriver, pIpcProperties)
    ccall((:zeDriverGetIpcProperties, libze_loader), ze_result_t,
          (ze_driver_handle_t, Ptr{ze_driver_ipc_properties_t}),
          hDriver, pIpcProperties)
end

I believe this functionality should live in this repo, so more Clang.jl users can take advantage of this.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions