@@ -352,7 +352,23 @@ class UnknownType extends BuiltInType {
352352private predicate isArithmeticType ( @builtintype type , int kind ) {
353353 builtintypes ( type , _, kind , _, _, _) and
354354 kind >= 4 and
355- kind != 34 // Exclude decltype(nullptr)
355+ kind != 34 and // Exclude decltype(nullptr)
356+ kind != 63 // Exclude __SVCount_t
357+ }
358+
359+ /**
360+ * The Arm scalable vector count type.
361+ *
362+ * In the following example, `a` is declared using the scalable vector
363+ * count type:
364+ * ```
365+ * svcount_t a;
366+ * ```
367+ */
368+ class ScalableVectorCount extends BuiltInType {
369+ ScalableVectorCount ( ) { builtintypes ( underlyingElement ( this ) , _, 63 , _, _, _) }
370+
371+ override string getAPrimaryQlClass ( ) { result = "ScalableVectorCount" }
356372}
357373
358374/**
@@ -1084,7 +1100,7 @@ class NullPointerType extends BuiltInType {
10841100/**
10851101 * A C/C++ derived type.
10861102 *
1087- * These are pointer and reference types, array and GNU vector types, and `const` and `volatile` types.
1103+ * These are pointer and reference types, array and vector types, and `const` and `volatile` types.
10881104 * In all cases, the type is formed from a single base type. For example:
10891105 * ```
10901106 * int *pi;
@@ -1643,6 +1659,30 @@ class GNUVectorType extends DerivedType {
16431659 override predicate isDeeplyConstBelow ( ) { this .getBaseType ( ) .isDeeplyConst ( ) }
16441660}
16451661
1662+ /**
1663+ * An Arm Scalable vector type.
1664+ *
1665+ * In the following example, `a` has a scalable vector type consisting
1666+ * of 8-bit signed integer elements:
1667+ * ```
1668+ * svint8_t a;
1669+ * ```
1670+ */
1671+ class ScalableVectorType extends DerivedType {
1672+ ScalableVectorType ( ) { derivedtypes ( underlyingElement ( this ) , _, 11 , _) }
1673+
1674+ /**
1675+ * Get the number of tuple elements of this scalable vector type.
1676+ */
1677+ int getNumTupleElements ( ) { tupleelements ( underlyingElement ( this ) , result ) }
1678+
1679+ override string getAPrimaryQlClass ( ) { result = "ScalableVectorType" }
1680+
1681+ override string explain ( ) { result = "scalable vector of {" + this .getBaseType ( ) .explain ( ) + "}" }
1682+
1683+ override predicate isDeeplyConstBelow ( ) { this .getBaseType ( ) .isDeeplyConst ( ) }
1684+ }
1685+
16461686/**
16471687 * A C/C++ pointer to a function. See 7.7.
16481688 * ```
0 commit comments