Skip to content

Commit

Permalink
Merge branch 'main' into OutOfBounds
Browse files Browse the repository at this point in the history
  • Loading branch information
rvermeulen authored Apr 7, 2023
2 parents 03c17ae + d25e575 commit ea9b0f4
Showing 1 changed file with 9 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,17 @@ class WideCharPointerType extends PointerType {
override string getAPrimaryQlClass() { result = "WideCharPointerType" }
}

class GenericCharPointerType extends PointerType {
class GenericCharPointerType extends Type {
GenericCharPointerType() {
/* This type resolves to wchar_t* (which is in turn a typedef depending on its implementation) */
this.resolveTypedefs*() instanceof WideCharPointerType
// A wide char pointer type
this instanceof WideCharPointerType
or
/* This type eventually resolves to char* */
this.resolveTypedefs*() instanceof CharPointerType
// A char pointer type
this.getUnspecifiedType() instanceof CharPointerType
or
// A typedef to any such type.
// Note: wchar_t is usually a typedef, so we cannot just use getUnspecifiedType() here.
this.(TypedefType).getBaseType() instanceof GenericCharPointerType
}
}

Expand Down

0 comments on commit ea9b0f4

Please sign in to comment.