-
Notifications
You must be signed in to change notification settings - Fork 10.8k
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
[сlang] Representation of ellipsis in AST #63106
Comments
@llvm/issue-subscribers-clang-frontend |
I believe the null pointers are by design, but I don't think that design is a particularly good one. For example, having NULL pointer child nodes in the AST makes it harder to write a correct recursive AST visitor because you have to watch out for instances where NULL occurs with special meaning. I think it would be better to use a concrete AST node instead of an in-band indicator. |
Hi @Endilll, @AaronBallman Can anyone of you assign this task to me so that I could work |
@shahidiqbal13 Sure! But assignment is not formal or binding in any way: everyone can work on anything they want in LLVM project. |
Consider the following snippet with different usages of ellipsis:
clang -Xclang -ast-dump
outputs the following (omitting built-in typedefs):The first ellipsis (catch-all) is represented by
<<<NULL>>>
which comes fromllvm-project/clang/lib/AST/TextNodeDumper.cpp
Line 245 in b48ebad
The second ellipsis (vararg) is not represented at all.
Are those representations (or lack of thereof) by design? Is this inconsistency intentional?
https://godbolt.org/z/EafKE5KWs
The text was updated successfully, but these errors were encountered: