JuliaInterop / Clang.jl

C binding generator and Julia interface to libclang
https://juliainterop.github.io/Clang.jl/
MIT License
225 stars 68 forks source link

problem with `resolve_dependency!(dag::ExprDAG, node::ExprNode{<:AbstractMacroNodeType, options)` #376

Closed jkozdon closed 2 years ago

jkozdon commented 2 years ago

I've been trying to revive some PETSc wrappers I started a long time ago, and upon updating Clang.jl to the latest release I ran into a problem caused by e6022d2f710563bfb98cd9738932f0c7c01ad885.

When this commit is applied, the RemoveCircularReference pass just loops forever.

If I revert these changes, even with the latest master branch, the code will at least complete for a simple test case.

I've tried to strip things down pretty minimally in this gist for what I am running.

Gnimuc commented 2 years ago

cc @melonedo

melonedo commented 2 years ago

This is because PETSc_jll/include/pestclog.h defines macros that "hide" the implementation, which looks like circular reference.

#define foo(a,b,c) log(a,b,c); foo(a,b,c)