Skip to content

Commit cca276b

Browse files
committed
C++: Remove co_await range-based-for support for now
Initial impl won't support it
1 parent 78b5227 commit cca276b

2 files changed

Lines changed: 2 additions & 15 deletions

File tree

cpp/ql/src/semmle/code/cpp/stmts/Stmt.qll

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -380,7 +380,7 @@ class ConstexprIfStmt extends ConditionalStmt, @stmt_constexpr_if {
380380
}
381381
}
382382

383-
private class TLoop = @stmt_while or @stmt_end_test_while or @range_based_for_stmt or @stmt_for;
383+
private class TLoop = @stmt_while or @stmt_end_test_while or @stmt_range_based_for or @stmt_for;
384384

385385
/**
386386
* A C/C++ loop, that is, either a 'while' loop, a 'for' loop, or a
@@ -832,7 +832,7 @@ class DoStmt extends Loop, @stmt_end_test_while {
832832
* ```
833833
* where `begin_expr` and `end_expr` depend on the type of `xs`.
834834
*/
835-
class RangeBasedForStmt extends Loop, @range_based_for_stmt {
835+
class RangeBasedForStmt extends Loop, @stmt_range_based_for {
836836
override string getAPrimaryQlClass() { result = "RangeBasedForStmt" }
837837

838838
/**
@@ -908,16 +908,6 @@ class RangeBasedForStmt extends Loop, @range_based_for_stmt {
908908
LocalVariable getAnIterationVariable() { result = getBeginVariable() }
909909
}
910910

911-
/**
912-
* A C/C++ 'for await' statement.
913-
*
914-
* This represents a range-based 'for await' statement.
915-
class RangeBasedForAwaitStmt extends Loop, @stmt_range_based_for_co_await {
916-
override string getAPrimaryQlClass() { result = "RangeBasedForAwaitStmt" }
917-
918-
override string toString() { result = "for co_await(...:...) ..." }
919-
}
920-
921911
/**
922912
* A C/C++ 'for' statement.
923913
*

cpp/ql/src/semmlecode.cpp.dbscheme

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1856,11 +1856,8 @@ case @stmt.kind of
18561856
// ... 34 @stmt_finally_end deprecated
18571857
| 35 = @stmt_constexpr_if
18581858
| 37 = @stmt_co_return
1859-
| 38 = @stmt_range_based_for_co_await
18601859
;
18611860

1862-
@range_based_for_stmt = @stmt_range_based_for | @stmt_range_based_for_co_await;
1863-
18641861
type_vla(
18651862
int type_id: @type ref,
18661863
int decl: @stmt_vla_decl ref

0 commit comments

Comments
 (0)