mirror of
https://github.com/github/codeql.git
synced 2026-04-29 02:35:15 +02:00
C++: respond to PR comments
This commit is contained in:
@@ -25,7 +25,7 @@ class InvalidFloatCastExpr extends Expr {
|
||||
InvalidFloatCastExpr() {
|
||||
exists(Type src, Type dst |
|
||||
src = this.getUnspecifiedType() and
|
||||
dst = this.getActualType().getUnspecifiedType() and
|
||||
dst = this.getFullyConverted().getUnspecifiedType() and
|
||||
src.(GeneralPointerType).getBaseType() instanceof FloatingPointType and
|
||||
src.(GeneralPointerType).getBaseType() != dst.(GeneralPointerType).getBaseType()
|
||||
)
|
||||
|
||||
@@ -20,7 +20,7 @@ class NullPointer extends Expr {
|
||||
|
||||
from Expr e, Type t1, Type t2
|
||||
where t1 = e.getUnspecifiedType() and
|
||||
t2 = e.getActualType().getUnspecifiedType() and
|
||||
t2 = e.getFullyConverted().getUnspecifiedType() and
|
||||
t1 != t2 and
|
||||
(t1 instanceof PointerType or t2 instanceof PointerType) and
|
||||
not (t2 instanceof VoidPointerType and t1 instanceof PointerType) and
|
||||
|
||||
@@ -271,7 +271,7 @@ abstract class DeclarationEntry extends Locatable {
|
||||
abstract Type getType();
|
||||
|
||||
/**
|
||||
* Gets the type associated with this declaration entrry after specifiers
|
||||
* Gets the type associated with this declaration entry after specifiers
|
||||
* have been deeply stripped and typedefs have been resolved.
|
||||
*
|
||||
* For variable declarations, get the type of the variable.
|
||||
|
||||
@@ -71,10 +71,6 @@ class Expr extends StmtParent, @expr {
|
||||
/**
|
||||
* Gets the type of this expression after specifiers have been deeply
|
||||
* stripped and typedefs have been resolved.
|
||||
*
|
||||
* In most cases, this predicate will be the same as getType(). It will
|
||||
* only differ when the result of getType() is a TypedefType, in which
|
||||
* case this predicate will (possibly recursively) resolve the typedef.
|
||||
*/
|
||||
Type getUnspecifiedType() { result = this.getType().getUnspecifiedType() }
|
||||
|
||||
@@ -225,7 +221,7 @@ class Expr extends StmtParent, @expr {
|
||||
exists ( Expr e2 |
|
||||
e.(TypeidOperator).getExpr() = e2 and
|
||||
(
|
||||
not e2.getActualType().getUnspecifiedType().(Class).isPolymorphic() or
|
||||
not e2.getFullyConverted().getUnspecifiedType().(Class).isPolymorphic() or
|
||||
not e2.isGLValueCategory()
|
||||
)
|
||||
) or
|
||||
|
||||
Reference in New Issue
Block a user