File tree Expand file tree Collapse file tree 1 file changed +12
-2
lines changed
cpp/ql/src/semmle/code/cpp Expand file tree Collapse file tree 1 file changed +12
-2
lines changed Original file line number Diff line number Diff line change @@ -904,15 +904,25 @@ 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. See `getArraySize` for getting the number of elements.
917+ */
909918 int getByteSize ( ) { arraysizes ( underlyingElement ( this ) , _, result , _) }
910919
911920 override int getAlignment ( ) { arraysizes ( underlyingElement ( this ) , _, _, result ) }
912921
913922 /**
914- * Gets the size of this array (only valid for arrays declared to be of a constant
915- * size, will fail for all others).
923+ * Gets the byte size of this array. Only has a result for arrays declared to be of a constant
924+ * size. This predicate is a synonym for `getByteSize`. See `getArraySize` for getting the number
925+ * of elements.
916926 */
917927 override int getSize ( ) {
918928 result = this .getByteSize ( )
You can’t perform that action at this time.
0 commit comments