|
| 1 | +class Element extends @element { |
| 2 | + string toString() { none() } |
| 3 | +} |
| 4 | + |
| 5 | +predicate removedClass(Element e, string name, Element child) { |
| 6 | + current_context_isolation_exprs(e, child) and name = "CurrentContextIsolationExpr" |
| 7 | + or |
| 8 | + extract_function_isolation_exprs(e, child) and name = "ExtractFunctionIsolationExpr" |
| 9 | + or |
| 10 | + ( |
| 11 | + actor_isolation_erasure_exprs(e) and name = "ActorIsolationErasureExpr" |
| 12 | + or |
| 13 | + unreachable_exprs(e) and name = "UnreachableExpr" |
| 14 | + ) and |
| 15 | + implicit_conversion_exprs(e, child) |
| 16 | +} |
| 17 | + |
| 18 | +query predicate new_unspecified_elements(Element e, string property, string error) { |
| 19 | + unspecified_elements(e, property, error) |
| 20 | + or |
| 21 | + exists(string name | |
| 22 | + removedClass(e, name, _) and |
| 23 | + property = "" and |
| 24 | + error = name + " nodes removed during database downgrade. Please update your CodeQL code." |
| 25 | + ) |
| 26 | +} |
| 27 | + |
| 28 | +query predicate new_unspecified_element_children(Element e, int index, Element child) { |
| 29 | + unspecified_element_children(e, index, child) |
| 30 | + or |
| 31 | + removedClass(e, _, child) and index = 0 |
| 32 | +} |
| 33 | + |
| 34 | +query predicate new_implicit_conversion_exprs(Element e, Element child) { |
| 35 | + implicit_conversion_exprs(e, child) and not removedClass(e, _, _) |
| 36 | +} |
| 37 | + |
| 38 | +query predicate new_expr_types(Element e, Element type) { |
| 39 | + expr_types(e, type) and not removedClass(e, _, _) |
| 40 | +} |
0 commit comments