Merge pull request #21743 from hvitved/cfg/body-parts

C#: Move handling of callables into shared control flow library
This commit is contained in:
Tom Hvitved
2026-04-23 14:10:46 +02:00
committed by GitHub
3 changed files with 147 additions and 121 deletions

View File

@@ -468,6 +468,7 @@ private module NonReturningCalls {
private module Input implements InputSig1, InputSig2 {
private import java as J
private import codeql.util.Void
predicate cfgCachedStageRef() { CfgCachedStage::ref() }
@@ -533,6 +534,8 @@ private module Input implements InputSig1, InputSig2 {
l = TYield() and n instanceof SwitchExpr
}
class CallableBodyPartContext = Void;
predicate inConditionalContext(Ast::AstNode n, ConditionKind kind) {
kind.isBoolean() and
(