From 5cc286885770930c1b5888e4478efc206e9f404c Mon Sep 17 00:00:00 2001 From: Tamas Vajk Date: Tue, 13 Dec 2022 15:51:20 +0100 Subject: [PATCH] Kotlin: Report CFG dead end consistency issues on `ErrorExpr` --- java/ql/consistency-queries/cfgDeadEnds.ql | 2 -- .../kotlin/library-tests/exprs/CONSISTENCY/cfgDeadEnds.expected | 1 + 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/java/ql/consistency-queries/cfgDeadEnds.ql b/java/ql/consistency-queries/cfgDeadEnds.ql index b2ad4b08f6b..c0f2e6cfe1f 100644 --- a/java/ql/consistency-queries/cfgDeadEnds.ql +++ b/java/ql/consistency-queries/cfgDeadEnds.ql @@ -53,8 +53,6 @@ predicate shouldBeDeadEnd(ControlFlowNode n) { not exists(n.getFile().getRelativePath()) // TODO or n = any(ConstCase c).getValue(_) // TODO - or - n instanceof ErrorExpr // TODO } from ControlFlowNode n, string s diff --git a/java/ql/test/kotlin/library-tests/exprs/CONSISTENCY/cfgDeadEnds.expected b/java/ql/test/kotlin/library-tests/exprs/CONSISTENCY/cfgDeadEnds.expected index 19cabccd05b..d7025aaef88 100644 --- a/java/ql/test/kotlin/library-tests/exprs/CONSISTENCY/cfgDeadEnds.expected +++ b/java/ql/test/kotlin/library-tests/exprs/CONSISTENCY/cfgDeadEnds.expected @@ -1 +1,2 @@ +| exprs.kt:278:52:278:66 | | ErrorExpr | unexpected dead end | | exprs.kt:278:52:278:66 | { ... } | BlockStmt | unexpected dead end |