Conversation
There was a problem hiding this comment.
Important
Looks good to me! 👍
Reviewed everything up to e232c3e in 22 seconds. Click for details.
- Reviewed
104lines of code in3files - Skipped
0files when reviewing. - Skipped posting
0draft comments. View those below. - Modify your settings and rules to customize what types of comments Ellipsis leaves. And don't forget to react with 👍 or 👎 to teach Ellipsis.
Workflow ID: wflow_mXjTyxrRydBDgO73
You can customize by changing your verbosity settings, reacting with 👍 or 👎, replying to comments, or adding code review rules.
Greptile Summaryadds support for parsing edges and shifts attributes as strings in addition to floats for Liberty library generated clock definitions. the PR converts string values to floats using
the test file validates the functionality with mixed string/numeric values, but the implementation needs fixes before merging Confidence Score: 1/5
Important Files Changed
Flowchart%%{init: {'theme': 'neutral'}}%%
flowchart TD
A[Parse edges/shifts attribute] --> B{Is Complex?}
B -->|No| C[Error: Must be complex]
B -->|Yes| D[Create sequence]
D --> E[Iterate values]
E --> F{Value type?}
F -->|Float| G[Get float value]
F -->|String| H[Convert string to float]
F -->|Other| I[Error + Memory leak]
G --> J{edges or shifts?}
H --> J
J -->|edges| K[Cast to int - MISSING]
J -->|shifts| L[Push float]
K --> M[Push to sequence]
L --> M
M --> N{Size == 3?}
N -->|No| O[Error: Must have 3 values]
N -->|Yes| P[Set on generated_clock]
Last reviewed commit: e232c3e |
| } | ||
| else if (value->isString()) { | ||
| const char *string_value = value->stringValue(); | ||
| float float_value = strtof(string_value, nullptr); |
There was a problem hiding this comment.
strtof with nullptr as the second parameter doesn't validate conversion errors. invalid strings like "abc" will silently convert to 0.0. see line 5282 in this file for proper error handling pattern with char *end
Edges/Shifts were only valid for floats, changed so that they are valid for tuples of strings now. Updated test to test these changes.
Important
LibertyReader.ccnow supportsedgesandshiftsas floats or strings, with tests updated accordingly.visitShifts()andvisitEdges()inLibertyReader.ccnow accept both float and string values, converting strings to floats.shiftsoredgesare not complex attributes or do not have exactly 3 values.generated_clock.libto include string values foredgesandshifts.generated_clock.okto reflect changes, including warning for unsupported shifts.This description was created by
for e232c3e. You can customize this summary. It will automatically update as commits are pushed.