зеркало из https://github.com/github/codeql.git
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:
Родитель
4aa62757a9
Коммит
14283f01ac
|
@ -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
|
||||
|
|
Загрузка…
Ссылка в новой задаче