Skip to content
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

Avoid method ambiguities in TypedefMutualRef's #458

Merged
merged 8 commits into from
Dec 24, 2023
2 changes: 1 addition & 1 deletion Project.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name = "Clang"
uuid = "40e3b903-d033-50b4-a0cc-940c62c95e31"
version = "0.17.7"
version = "0.17.8"

[deps]
CEnum = "fa961155-64e5-5f13-b03f-caf6b980ea82"
Expand Down
4 changes: 3 additions & 1 deletion docs/make.jl
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,13 @@ using Documenter

makedocs(;
modules=[Clang, Clang.LibClang],
repo="https://github.com/JuliaInterop/Clang.jl/blob/{commit}{path}#L{line}",
repo=Remotes.GitHub("JuliaInterop", "Clang.jl"),
sitename="Clang.jl",
format=Documenter.HTML(;
prettyurls=get(ENV, "CI", "false") == "true",
canonical="https://JuliaInterop.github.io/Clang.jl",
assets=String[],
size_threshold=700000
),
pages=[
"Introduction" => "index.md",
Expand All @@ -18,6 +19,7 @@ makedocs(;
"LibClang Wrapper API Reference" => "libclang.md",
"Clang API Reference" => "api.md",
],
warnonly=:missing_docs
)

deploydocs(; repo="github.com/JuliaInterop/Clang.jl.git")
11 changes: 11 additions & 0 deletions gen/generator.jl
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,16 @@ function rewrite!(dag::ExprDAG)
end
end

function get_docs(node::ExprNode)
whitelist = [:CXRewriter, :clang_disposeCXTUResourceUsage]

if node.id in whitelist
String["*Documentation not found in headers.*"]
else
String[]
end
end

import Pkg
import BinaryBuilderBase: PkgSpec, Prefix, temp_prefix, setup_dependencies, cleanup_dependencies, destdir

Expand All @@ -61,6 +71,7 @@ for (llvm_version, julia_version) in (#=(v"12.0.1", v"1.7"),=#
artifact_paths = setup_dependencies(prefix, dependencies, platform; verbose=true)

let options = deepcopy(options)
options["general"]["callback_documentation"] = get_docs
output_file_path = joinpath(libdir, string(llvm_version.major), options["general"]["output_file_path"])
isdir(dirname(output_file_path)) || mkpath(dirname(output_file_path))
options["general"]["output_file_path"] = output_file_path
Expand Down
9 changes: 9 additions & 0 deletions gen/generator.toml
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,15 @@ auto_mutability_includelist = []
# note: by default, Clang only parses doxygen comment, pass `-fparse-all-comments` to Clang in order to parse non-doxygen comments.
extract_c_comment_style = "doxygen"

# Pass a function to explicitly generate documentation. It will be called like
# `callback_documentation(node::ExprNode)` if `extract_c_comment_style` is not
# set, or if it is set and no docs were found automatically.
#
# Do *not* set this in the TOML file, it should be set in the generator script
# to a function that takes in an ExprNode and returns a String[] (string
# vector).
# callback_documentation = ""

# if set to true, single line comment will be printed as """comment""" instead of """\ncomment\n"""
fold_single_line_comment = false

Expand Down
8 changes: 8 additions & 0 deletions lib/13/LibClang.jl
Original file line number Diff line number Diff line change
Expand Up @@ -1696,6 +1696,11 @@ function clang_getCXTUResourceUsage(TU)
@ccall libclang.clang_getCXTUResourceUsage(TU::CXTranslationUnit)::CXTUResourceUsage
end

"""
clang_disposeCXTUResourceUsage(usage)

*Documentation not found in headers.*
"""
function clang_disposeCXTUResourceUsage(usage)
@ccall libclang.clang_disposeCXTUResourceUsage(usage::CXTUResourceUsage)::Cvoid
end
Expand Down Expand Up @@ -6836,6 +6841,9 @@ function clang_uninstall_llvm_fatal_error_handler()
@ccall libclang.clang_uninstall_llvm_fatal_error_handler()::Cvoid
end

"""
*Documentation not found in headers.*
"""
const CXRewriter = Ptr{Cvoid}

"""
Expand Down
8 changes: 8 additions & 0 deletions lib/14/LibClang.jl
Original file line number Diff line number Diff line change
Expand Up @@ -1696,6 +1696,11 @@ function clang_getCXTUResourceUsage(TU)
@ccall libclang.clang_getCXTUResourceUsage(TU::CXTranslationUnit)::CXTUResourceUsage
end

"""
clang_disposeCXTUResourceUsage(usage)

*Documentation not found in headers.*
"""
function clang_disposeCXTUResourceUsage(usage)
@ccall libclang.clang_disposeCXTUResourceUsage(usage::CXTUResourceUsage)::Cvoid
end
Expand Down Expand Up @@ -6842,6 +6847,9 @@ function clang_uninstall_llvm_fatal_error_handler()
@ccall libclang.clang_uninstall_llvm_fatal_error_handler()::Cvoid
end

"""
*Documentation not found in headers.*
"""
const CXRewriter = Ptr{Cvoid}

"""
Expand Down
Loading