Skip to content

Commit a6d7fb6

Browse files
committed
C++: fix typedef resolution in ArrayType
1 parent 3f595fd commit a6d7fb6

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

cpp/ql/lib/semmle/code/cpp/Type.qll

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1589,6 +1589,11 @@ class ArrayType extends DerivedType {
15891589
* Holds if this array is a variable-length array (VLA).
15901590
*/
15911591
predicate isVla() { type_is_vla(underlyingElement(this)) }
1592+
1593+
override Type resolveTypedefs() {
1594+
result.(ArrayType).getBaseType() = this.getBaseType().resolveTypedefs() and
1595+
result.(ArrayType).getArraySize() = this.getArraySize()
1596+
}
15921597
}
15931598

15941599
/**

0 commit comments

Comments
 (0)