mirror of
https://github.com/github/codeql.git
synced 2026-04-26 01:05:15 +02:00
Merge pull request #19805 from github/idrissrio/namespace-attributes
C++: fix typedef resolution in `ArrayType`
This commit is contained in:
4
cpp/ql/lib/change-notes/2025-06-17-arraytype-typedefs.md
Normal file
4
cpp/ql/lib/change-notes/2025-06-17-arraytype-typedefs.md
Normal file
@@ -0,0 +1,4 @@
|
||||
---
|
||||
category: fix
|
||||
---
|
||||
* `resolveTypedefs` now properly resolves typedefs for `ArrayType`s.
|
||||
@@ -1589,6 +1589,11 @@ class ArrayType extends DerivedType {
|
||||
* Holds if this array is a variable-length array (VLA).
|
||||
*/
|
||||
predicate isVla() { type_is_vla(underlyingElement(this)) }
|
||||
|
||||
override Type resolveTypedefs() {
|
||||
result.(ArrayType).getBaseType() = this.getBaseType().resolveTypedefs() and
|
||||
result.(ArrayType).getArraySize() = this.getArraySize()
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user