mirror of
https://github.com/github/codeql.git
synced 2025-12-16 08:43:11 +01:00
C++: Fix the expression kind in two of the downgrade scripts
A 0 value for the expression kind is not valid, as 0 does not occur in the relevant case split. This should have been the value of `@errorexpr`, which is 1.
This commit is contained in:
@@ -13,5 +13,5 @@ predicate isExprWithNewBuiltin(Expr expr) {
|
||||
from Expr expr, int kind, int kind_new, Location location
|
||||
where
|
||||
exprs(expr, kind, location) and
|
||||
if isExprWithNewBuiltin(expr) then kind_new = 0 else kind_new = kind
|
||||
if isExprWithNewBuiltin(expr) then kind_new = 1 else kind_new = kind
|
||||
select expr, kind_new, location
|
||||
|
||||
@@ -9,5 +9,5 @@ class Location extends @location_expr {
|
||||
from Expr expr, int kind, int kind_new, Location location
|
||||
where
|
||||
exprs(expr, kind, location) and
|
||||
if expr instanceof @blockassignexpr then kind_new = 0 else kind_new = kind
|
||||
if expr instanceof @blockassignexpr then kind_new = 1 else kind_new = kind
|
||||
select expr, kind_new, location
|
||||
|
||||
Reference in New Issue
Block a user