File tree Expand file tree Collapse file tree 1 file changed +13
-2
lines changed
cpp/ql/src/semmle/code/cpp Expand file tree Collapse file tree 1 file changed +13
-2
lines changed Original file line number Diff line number Diff line change @@ -904,15 +904,26 @@ class ArrayType extends DerivedType {
904904 ArrayType ( ) { derivedtypes ( underlyingElement ( this ) , _, 4 , _) }
905905
906906 predicate hasArraySize ( ) { arraysizes ( underlyingElement ( this ) , _, _, _) }
907+
908+ /**
909+ * Gets the number of elements in this array. Only has a result for arrays declared to be of a
910+ * constant size. See `getByteSize` for getting the number of bytes.
911+ */
907912 int getArraySize ( ) { arraysizes ( underlyingElement ( this ) , result , _, _) }
908913
914+ /**
915+ * Gets the byte size of this array. Only has a result for arrays declared to be of a constant
916+ * size. This predicate is a synonym for `getByteSize`. See `getArraySize` for getting the number
917+ * of elements.
918+ */
909919 int getByteSize ( ) { arraysizes ( underlyingElement ( this ) , _, result , _) }
910920
911921 override int getAlignment ( ) { arraysizes ( underlyingElement ( this ) , _, _, result ) }
912922
913923 /**
914- * Gets the size of this array (only valid for arrays declared to be of a constant
915- * size, will fail for all others).
924+ * Gets the byte size of this array. Only has a result for arrays declared to be of a constant
925+ * size. This predicate is a synonym for `getByteSize`. See `getArraySize` for getting the number
926+ * of elements.
916927 */
917928 override int getSize ( ) {
918929 result = this .getByteSize ( )
You can’t perform that action at this time.
0 commit comments