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

llcppsigfetch:nil panic caused by access Name member of a nil ast.Ident #97

Open
tsingbx opened this issue Oct 16, 2024 · 2 comments
Open

Comments

@tsingbx
Copy link

tsingbx commented Oct 16, 2024

panic when convert a typedef under the case of typedef struct { a int; } XXX; which hasn't struct name.
__stddef_max_align_t.zip

fix:#101

@luoliwoshang luoliwoshang changed the title nil panic caused by access Name member of a nil ast.Indent nil panic caused by access Name member of a nil ast.Ident Oct 16, 2024
@luoliwoshang luoliwoshang changed the title nil panic caused by access Name member of a nil ast.Ident llcppsigfetch:nil panic caused by access Name member of a nil ast.Ident Oct 16, 2024
@luoliwoshang
Copy link
Owner

目前对于一个 typedef struct { a int; } XXX; 现在的 libclang 中实际上会认为他是存在两个节点,一个是匿名的节点 struct {a int; } 这个会生成一个匿名的Typedecl节点(即Name为nil的节点)另外一个节点即 typedef 节点,用于实际的typedef定义。

@luoliwoshang
Copy link
Owner

目前对于一个 typedef struct { a int; } XXX; 现在的 libclang 中实际上会认为他是存在两个节点,一个是匿名的节点 struct {a int; } 这个会生成一个匿名的Typedecl节点(即Name为nil的节点)另外一个节点即 typedef 节点,用于实际的typedef定义。

对于llcppsigfetch对应的匿名节点先我去做一个对应的识别

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