C++: add isVLA() to ArrayType to identify variable-length arrays

This commit is contained in:
idrissrio
2025-04-14 09:14:36 +02:00
parent 86313715a4
commit 033bade0ab
2 changed files with 7 additions and 0 deletions

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