Merge branch 'main' into post-release-prep/codeql-cli-2.21.1

This commit is contained in:
Ian Lynagh
2025-04-16 11:54:23 +01:00
committed by GitHub
179 changed files with 39012 additions and 2465 deletions

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,3 @@
description: Add a new predicate `isVla()` to the `ArrayType` class
compatibility: full
type_is_vla.rel: delete

View File

@@ -0,0 +1,4 @@
---
category: feature
---
* Added the `isVla()` predicate to the `ArrayType` class. This allows queries to identify variable-length arrays (VLAs).

View File

@@ -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)) }
}
/**

View File

@@ -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

View File

@@ -0,0 +1,2 @@
description: Add a new predicate `isVla()` to the `ArrayType` class
compatibility: backwards