mirror of
https://github.com/github/codeql.git
synced 2026-04-28 10:15:14 +02:00
C++: More PR feedback
This commit is contained in:
@@ -122,7 +122,7 @@ private class BuiltInDumpType extends DumpType, BuiltInType {
|
||||
|
||||
private class IntegralDumpType extends BuiltInDumpType, IntegralType {
|
||||
override string getTypeSpecifier() {
|
||||
result = getCanonical().toString()
|
||||
result = getCanonicalArithmeticType().toString()
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -470,7 +470,7 @@ class IntegralType extends ArithmeticType, IntegralOrEnumType {
|
||||
* For an explicitly signed type, this gives the plain version of that type (e.g. `signed short` -> `short`), except
|
||||
* that `signed char` -> `signed char`.
|
||||
*/
|
||||
IntegralType getCanonical() {
|
||||
IntegralType getCanonicalArithmeticType() {
|
||||
exists(int canonicalKind |
|
||||
integralTypeMapping(kind, canonicalKind, _, _) and
|
||||
builtintypes(unresolveElement(result), _, canonicalKind, _, _, _)
|
||||
@@ -853,21 +853,10 @@ class Decltype extends Type, @decltype {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* A C/C++ pointer or reference type.
|
||||
*/
|
||||
class PointerIshType extends DerivedType {
|
||||
PointerIshType() {
|
||||
derivedtypes(underlyingElement(this), _, 1, _) or
|
||||
derivedtypes(underlyingElement(this), _, 2, _) or
|
||||
derivedtypes(underlyingElement(this), _, 8, _)
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* A C/C++ pointer type. See 4.9.1.
|
||||
*/
|
||||
class PointerType extends PointerIshType {
|
||||
class PointerType extends DerivedType {
|
||||
|
||||
PointerType() { derivedtypes(underlyingElement(this),_,1,_) }
|
||||
|
||||
@@ -890,7 +879,7 @@ class PointerType extends PointerIshType {
|
||||
* For C++11 code bases, this includes both lvalue references (&) and rvalue references (&&).
|
||||
* To distinguish between them, use the LValueReferenceType and RValueReferenceType classes.
|
||||
*/
|
||||
class ReferenceType extends PointerIshType {
|
||||
class ReferenceType extends DerivedType {
|
||||
|
||||
ReferenceType() { derivedtypes(underlyingElement(this),_,2,_) or derivedtypes(underlyingElement(this),_,8,_) }
|
||||
|
||||
|
||||
Reference in New Issue
Block a user