We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent a6b20d7 commit 9d4ae3fCopy full SHA for 9d4ae3f
2 files changed
cpp/ql/lib/semmle/code/cpp/Type.qll
@@ -1369,6 +1369,11 @@ class ArrayType extends DerivedType {
1369
override predicate isDeeplyConst() { this.getBaseType().isDeeplyConst() } // No such thing as a const array type
1370
1371
override predicate isDeeplyConstBelow() { this.getBaseType().isDeeplyConst() }
1372
+
1373
+ /**
1374
+ * Holds if this array is a variable-length array (VLA).
1375
+ */
1376
+ predicate isVla() { type_is_vla(underlyingElement(this)) }
1377
}
1378
1379
/**
cpp/ql/lib/semmlecode.cpp.dbscheme
@@ -2178,6 +2178,8 @@ variable_vla(
2178
int decl: @stmt_vla_decl ref
2179
);
2180
2181
+type_is_vla(unique int type_id: @type ref)
2182
2183
if_initialization(
2184
unique int if_stmt: @stmt_if ref,
2185
int init_id: @stmt ref
0 commit comments