mirror of
https://github.com/github/codeql.git
synced 2025-12-16 16:53:25 +01:00
C++: Add upgrade and downgrade scripts
This commit is contained in:
2429
cpp/downgrades/1aa71a4a687fc93f807d4dfeeef70feceeced242/old.dbscheme
Normal file
2429
cpp/downgrades/1aa71a4a687fc93f807d4dfeeef70feceeced242/old.dbscheme
Normal file
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,17 @@
|
||||
class Stmt extends @stmt {
|
||||
string toString() { none() }
|
||||
}
|
||||
|
||||
class Location extends @location_stmt {
|
||||
string toString() { none() }
|
||||
}
|
||||
|
||||
predicate isConstevalIf(Stmt stmt) {
|
||||
exists(int kind | stmts(stmt, kind, _) | kind = 38 or kind = 39)
|
||||
}
|
||||
|
||||
from Stmt stmt, int kind, int kind_new, Location location
|
||||
where
|
||||
stmts(stmt, kind, location) and
|
||||
if isConstevalIf(stmt) then kind_new = 7 else kind_new = kind // Turns consteval if into a block with two block statement in it
|
||||
select stmt, kind_new, location
|
||||
@@ -0,0 +1,5 @@
|
||||
description: Support (not) consteval if
|
||||
compatibility: full
|
||||
consteval_if_then.rel: delete
|
||||
consteval_if_else.rel: delete
|
||||
stmts.rel: run stmts.qlo
|
||||
Reference in New Issue
Block a user