mirror of
https://github.com/github/codeql.git
synced 2026-04-23 15:55:18 +02:00
C++: Handle Arm SVE in the IR
This commit is contained in:
@@ -54,6 +54,8 @@ private predicate isDeeplyConstBelow(Type t) {
|
||||
or
|
||||
isDeeplyConst(t.(GNUVectorType).getBaseType())
|
||||
or
|
||||
isDeeplyConst(t.(ScalableVectorType).getBaseType())
|
||||
or
|
||||
isDeeplyConst(t.(FunctionPointerIshType).getBaseType())
|
||||
or
|
||||
isDeeplyConst(t.(PointerWrapper).getTemplateArgument(0))
|
||||
|
||||
@@ -29,6 +29,10 @@ private int getTypeSizeWorkaround(Type type) {
|
||||
not arrayType.hasArraySize() and
|
||||
result = getPointerSize()
|
||||
)
|
||||
or
|
||||
// Scalable vectors are opaque and not of fixed size. Use 0 as a substitute.
|
||||
type instanceof ScalableVectorType and
|
||||
result = 0
|
||||
)
|
||||
)
|
||||
}
|
||||
@@ -136,6 +140,8 @@ private predicate isOpaqueType(Type type) {
|
||||
type instanceof PointerToMemberType // PTMs are missing size info
|
||||
or
|
||||
type instanceof ScalableVectorCount
|
||||
or
|
||||
type instanceof ScalableVectorType
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user