@@ -352,7 +352,23 @@ class UnknownType extends BuiltInType {
352
352
private predicate isArithmeticType ( @builtintype type , int kind ) {
353
353
builtintypes ( type , _, kind , _, _, _) and
354
354
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" }
356
372
}
357
373
358
374
/**
@@ -1084,7 +1100,7 @@ class NullPointerType extends BuiltInType {
1084
1100
/**
1085
1101
* A C/C++ derived type.
1086
1102
*
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.
1088
1104
* In all cases, the type is formed from a single base type. For example:
1089
1105
* ```
1090
1106
* int *pi;
@@ -1643,6 +1659,30 @@ class GNUVectorType extends DerivedType {
1643
1659
override predicate isDeeplyConstBelow ( ) { this .getBaseType ( ) .isDeeplyConst ( ) }
1644
1660
}
1645
1661
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
+
1646
1686
/**
1647
1687
* A C/C++ pointer to a function. See 7.7.
1648
1688
* ```
0 commit comments