C#: Rename and restructure control flow graph entities#140
Conversation
|
For some reason, github's "Hide whitespace changes" does not work well with the changes in |
375aff4 to
84da5a3
Compare
|
The change itself looks very reasonable, however I question whether this needs to go into the RC branch. We should also create some deprecated aliases for the old symbols (particularly, |
I did add entities for backwards compatibility: https://github.com/Semmle/ql/blob/84da5a36090b01c8f24d96c5ab36c6cfb284041f/csharp/ql/src/semmle/code/csharp/controlflow/ControlFlowGraph.qll#L3155 Sure, I can add a change note. I targeted the RC branch because I also removed all compiler warnings on this PR. |
| - `CallableExitNode` has been renamed to `ControlFlow::Nodes::ExitNode`. | ||
| - `ControlFlowEdgeType` has been renamed to `ControlFlow::SuccessorType`. | ||
| - `ControlFlowEdgeSuccessor` has been renamed to `ControlFlow::SuccessorTypes::NormalSuccessor`. | ||
| - `ControlFlowEdgeConditional has been renamed to ControlFlow::SuccessorTypes::ConditionalSuccessor`. |
There was a problem hiding this comment.
This line is missing a few backticks (before "has" and after "to").
Otherwise the change note LGTM.
|
Sorry Tom, I hadn't seen the aliases when I searched for them due to the large diff being hidden. |
|
There seems to be repetition in |
I prefer the naming as is; the nested |
Follow a naming structure similar to the data flow library: - `ControlFlowNode` -> `ControlFlow::Node`. - `CallableEntryNode` -> `ControlFlow::Nodes::EntryNode`. - `CallableExitNode` -> `ControlFlow::Nodes::ExitNode`. - `ControlFlowEdgeType` -> `ControlFlow::SuccessorType`. - `ControlFlowEdgeSuccessor` -> `ControlFlow::SuccessorTypes::NormalSuccessor`. - `ControlFlowEdgeConditional -> ControlFlow::SuccessorTypes::ConditionalSuccessor`. - `ControlFlowEdgeBoolean` -> `ControlFlow::SuccessorTypes::BooleanSuccessor`. - `ControlFlowEdgeNullness` -> `ControlFlow::SuccessorTypes::NullnessSuccessor`. - `ControlFlowEdgeMatching` -> `ControlFlow::SuccessorTypes::MatchingSuccessor`. - `ControlFlowEdgeEmptiness` -> `ControlFlow::SuccessorTypes::EmptinessSuccessor`. - `ControlFlowEdgeReturn` -> `ControlFlow::SuccessorTypes::ReturnSuccessor`. - `ControlFlowEdgeBreak` -> `ControlFlow::SuccessorTypes::BreakSuccessor`. - `ControlFlowEdgeContinue` -> `ControlFlow::SuccessorTypes::ContinueSuccessor`. - `ControlFlowEdgeGotoLabel` -> `ControlFlow::SuccessorTypes::GotoLabelSuccessor`. - `ControlFlowEdgeGotoCase` -> `ControlFlow::SuccessorTypes::GotoCaseSuccessor`. - `ControlFlowEdgeGotoDefault` -> `ControlFlow::SuccessorTypes::GotoDefaultSuccessor`. - `ControlFlowEdgeException` -> `ControlFlow::SuccessorTypes::ExceptionSuccessor`
40b0d42 to
061b3d4
Compare
AST: introduce 'Namespace' as super class of Class/Module
Kotlin: Allow comments on enum entries
…id-cp PS: Remove accidental CP
Follow a naming structure similar to the data flow library:
ControlFlowNode->ControlFlow::Node.CallableEntryNode->ControlFlow::Nodes::EntryNode.CallableExitNode->ControlFlow::Nodes::ExitNode.ControlFlowEdgeType->ControlFlow::SuccessorType.ControlFlowEdgeSuccessor->ControlFlow::SuccessorTypes::NormalSuccessor.ControlFlowEdgeConditional -> ControlFlow::SuccessorTypes::ConditionalSuccessor.ControlFlowEdgeBoolean->ControlFlow::SuccessorTypes::BooleanSuccessor.ControlFlowEdgeNullness->ControlFlow::SuccessorTypes::NullnessSuccessor.ControlFlowEdgeMatching->ControlFlow::SuccessorTypes::MatchingSuccessor.ControlFlowEdgeEmptiness->ControlFlow::SuccessorTypes::EmptinessSuccessor.ControlFlowEdgeReturn->ControlFlow::SuccessorTypes::ReturnSuccessor.ControlFlowEdgeBreak->ControlFlow::SuccessorTypes::BreakSuccessor.ControlFlowEdgeContinue->ControlFlow::SuccessorTypes::ContinueSuccessor.ControlFlowEdgeGotoLabel->ControlFlow::SuccessorTypes::GotoLabelSuccessor.ControlFlowEdgeGotoCase->ControlFlow::SuccessorTypes::GotoCaseSuccessor.ControlFlowEdgeGotoDefault->ControlFlow::SuccessorTypes::GotoDefaultSuccessor.ControlFlowEdgeException->ControlFlow::SuccessorTypes::ExceptionSuccessor.