Skip to content

Duplicate definitions are dropped #389

Answered by Gnimuc
maleadt asked this question in Q&A
Discussion options

You must be logged in to vote

There is no trivial way to avoid this.

The following workaround ignores all macros:

julia> using Clang.LibClang

julia> function Clang.parse_header!(ctx::AbstractContext, header::AbstractString, args)
           flags = CXTranslationUnit_SkipFunctionBodies
           push!(ctx.trans_units, parse_header(ctx.index, header, args, flags))
           return ctx
       end

julia> function Clang.parse_headers!(ctx::AbstractContext, headers::Vector{<:AbstractString}, args)
           flags = CXTranslationUnit_SkipFunctionBodies
           tus = parse_headers(ctx.index, headers, args, flags)
               append!(ctx.trans_units, tus)
           return ctx
       end

julia> using Clang.Generato…

Replies: 2 comments 3 replies

Comment options

You must be logged in to vote
3 replies
@maleadt
Comment options

maleadt Oct 25, 2022
Maintainer Author

@Gnimuc
Comment options

@maleadt
Comment options

maleadt Oct 25, 2022
Maintainer Author

Answer selected by maleadt
Comment options

maleadt
Jan 27, 2023
Maintainer Author

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants