-
Notifications
You must be signed in to change notification settings - Fork 10
gogensig:panic when redefined #285
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
Conversation
11e8f73
to
5869aa1
Compare
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #285 +/- ##
==========================================
- Coverage 80.31% 79.99% -0.33%
==========================================
Files 28 22 -6
Lines 2957 2919 -38
==========================================
- Hits 2375 2335 -40
+ Misses 567 564 -3
- Partials 15 20 +5 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
89305c2
to
656ce39
Compare
73a2e5a
to
8f5036e
Compare
30711b9
to
ee2cc1a
Compare
ee2cc1a
to
4a6e7fb
Compare
[Git-flow] Hi @luoliwoshang, There are some suggestions for your information: Rebase suggestions
Which seems insignificant, recommend to use For other If you have any questions about this comment, feel free to raise an issue here: |
db12645
to
224ce9c
Compare
5579bb3
to
ae9334a
Compare
ae9334a
to
cb36331
Compare
question 1
The following is valid because
enum algorithm
andtypedef algorithm
belong to different scopes:If, in this case, the typedef algorithm is allowed to be mapped to another name, such as
algorithm__1
, it would be impossible to describe this mapping in the mapping file without causing ambiguity.llcppg.pub
The cname would correspond to two nodes: the enum node and the typedef node. Therefore, for this situation, identifying and skipping such cases would be a more appropriate choice.
In the main branch of
llcppg
,llcppsigfetch
already supports filtering typedef self-references of this form, but now it needs to support multi-level self-references.question 2
The following is valid but currently causes a panic:
The reason is that struct
isl_arg_choice
and the enum itemisl_arg_choice
should exist in different scopes, but they are currently stored in the samemap[cname]pubname
without generating a new name with __x based on the node type.The isl_arg_choice as an enum item is still checked for whether its cname is in the current scope, used to submit a cname -> pubnamed type. However, for enum values, they exist as constant values and are not referenced as types in the code (e.g., syntax like isl_arg_choice x is invalid). Therefore, during the conversion process, we do not need to check the origin name of macros and enum items, but only verify their converted pubname.