-
Notifications
You must be signed in to change notification settings - Fork 159
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
Added support for simple pointer arithmetic. Fixes #434 #441
Conversation
Not ready for review |
Ready for review if Ok in travis |
Reviewed 4 of 6 files at r1, 3 of 3 files at r2. transpiler/call.go, line 74 at r2 (raw file):
Can you be sure that Something like this? children := GetNodesOfType(n.Children(), (*ast.Something)(nil))
if functionName == "calloc" && len(children) == 3 {
// children is not reliable even when the AST has other child nodes
// that are not arguments.
} It will make the code more robust if there are any extra children that are not arguments. Also you rely on indexes like transpiler/unary.go, line 173 at r2 (raw file):
This is really awesome! Does this also work with decrementing pointer arithmetic? Like the common loop: Comments from Reviewable |
Review status: all files reviewed at latest revision, 2 unresolved discussions, some commit checks failed. transpiler/call.go, line 74 at r2 (raw file): Previously, elliotchance (Elliot Chance) wrote…
This is the method: https://github.com/elliotchance/c2go/blob/master/ast/traverse.go#L12 However, that is recursive. You may want to create a similar method that does not recursive. Comments from Reviewable |
Review status: all files reviewed at latest revision, 2 unresolved discussions, some commit checks failed. transpiler/call.go, line 74 at r2 (raw file): Previously, elliotchance (Elliot Chance) wrote…
3 node:
transpiler/unary.go, line 173 at r2 (raw file): Previously, elliotchance (Elliot Chance) wrote…
Now, it is not support Comments from Reviewable |
Codecov Report
@@ Coverage Diff @@
## master #441 +/- ##
=========================================
+ Coverage 81.03% 81.1% +0.06%
=========================================
Files 145 145
Lines 6434 6509 +75
=========================================
+ Hits 5214 5279 +65
- Misses 962 968 +6
- Partials 258 262 +4
Continue to review full report at Codecov.
|
Reviewed 2 of 2 files at r3. tests/array.c, line 232 at r3 (raw file):
Awesome! Comments from Reviewable |
Close #434
See #67
This change is