mirror of
https://github.com/github/codeql.git
synced 2026-04-21 06:55:31 +02:00
Merge branch 'main' into post-release-prep/codeql-cli-2.21.1
This commit is contained in:
2446
cpp/downgrades/0f0a390468a5eb43d1dc72937c028070b106bf53/old.dbscheme
Normal file
2446
cpp/downgrades/0f0a390468a5eb43d1dc72937c028070b106bf53/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,3 @@
|
||||
description: Add a new predicate `isVla()` to the `ArrayType` class
|
||||
compatibility: full
|
||||
type_is_vla.rel: delete
|
||||
@@ -0,0 +1,4 @@
|
||||
---
|
||||
category: feature
|
||||
---
|
||||
* Added the `isVla()` predicate to the `ArrayType` class. This allows queries to identify variable-length arrays (VLAs).
|
||||
@@ -1369,6 +1369,11 @@ class ArrayType extends DerivedType {
|
||||
override predicate isDeeplyConst() { this.getBaseType().isDeeplyConst() } // No such thing as a const array type
|
||||
|
||||
override predicate isDeeplyConstBelow() { this.getBaseType().isDeeplyConst() }
|
||||
|
||||
/**
|
||||
* Holds if this array is a variable-length array (VLA).
|
||||
*/
|
||||
predicate isVla() { type_is_vla(underlyingElement(this)) }
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -2178,6 +2178,8 @@ variable_vla(
|
||||
int decl: @stmt_vla_decl ref
|
||||
);
|
||||
|
||||
type_is_vla(unique int type_id: @derivedtype ref)
|
||||
|
||||
if_initialization(
|
||||
unique int if_stmt: @stmt_if ref,
|
||||
int init_id: @stmt ref
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,2 @@
|
||||
description: Add a new predicate `isVla()` to the `ArrayType` class
|
||||
compatibility: backwards
|
||||
Reference in New Issue
Block a user