Conversation
| } | ||
| } | ||
|
|
||
| class LogicalOrBinaryOpExprTree extends PreOrderTree instanceof BinaryExpr { |
There was a problem hiding this comment.
The short-circuiting operators are pre-ordered s.t. nested operators can be handled in a way where impossible paths are eliminated.
There was a problem hiding this comment.
As discussed offline, this is fine for now, but we want to change this later to use splitting.
geoffw0
left a comment
There was a problem hiding this comment.
Looks very promising!
there probably are some bugs in there :)
Hopefully when we have consistency checks and actual queries depending on this we'll discover any issues quite rapidly.
hvitved
left a comment
There was a problem hiding this comment.
Really great work, Simon!
rust/ql/lib/codeql/rust/controlflow/internal/ControlFlowGraphImpl.qll
Outdated
Show resolved
Hide resolved
rust/ql/lib/codeql/rust/controlflow/internal/ControlFlowGraphImpl.qll
Outdated
Show resolved
Hide resolved
rust/ql/lib/codeql/rust/controlflow/internal/ControlFlowGraphImpl.qll
Outdated
Show resolved
Hide resolved
rust/ql/lib/codeql/rust/controlflow/internal/ControlFlowGraphImpl.qll
Outdated
Show resolved
Hide resolved
rust/ql/lib/codeql/rust/controlflow/internal/ControlFlowGraphImpl.qll
Outdated
Show resolved
Hide resolved
|
The PR is ready for re-review. I've addressed most of the comments. I didn't fix the |
I don't understand why the CFGs for |
|
You're right, I didn't notice that. It could be due to the changes in the extractor or maybe some of the last changes I made broke it. Let's investigate after merging :) |
With this PR CFG creation is (attempted) to cover every relevant node in the AST. Some noteworthy additions are
matchexpressions, closures,continueandbreakin loops (including with labels),if letexpressions and short-circuiting binary operators.I'm not aware of any syntax constructions that are not supported, but there probably are some bugs in there :)