Skip to content

Commit d20efe4

Browse files
author
Robert Marsh
committed
C++: respond to PR comments
1 parent 2dd1c06 commit d20efe4

File tree

4 files changed

+4
-8
lines changed

4 files changed

+4
-8
lines changed

cpp/ql/src/jsf/4.17 Types/AV Rule 147.ql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ class InvalidFloatCastExpr extends Expr {
2525
InvalidFloatCastExpr() {
2626
exists(Type src, Type dst |
2727
src = this.getUnspecifiedType() and
28-
dst = this.getActualType().getUnspecifiedType() and
28+
dst = this.getFullyConverted().getUnspecifiedType() and
2929
src.(GeneralPointerType).getBaseType() instanceof FloatingPointType and
3030
src.(GeneralPointerType).getBaseType() != dst.(GeneralPointerType).getBaseType()
3131
)

cpp/ql/src/jsf/4.23 Type Conversions/AV Rule 182.ql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ class NullPointer extends Expr {
2020

2121
from Expr e, Type t1, Type t2
2222
where t1 = e.getUnspecifiedType() and
23-
t2 = e.getActualType().getUnspecifiedType() and
23+
t2 = e.getFullyConverted().getUnspecifiedType() and
2424
t1 != t2 and
2525
(t1 instanceof PointerType or t2 instanceof PointerType) and
2626
not (t2 instanceof VoidPointerType and t1 instanceof PointerType) and

cpp/ql/src/semmle/code/cpp/Declaration.qll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -271,7 +271,7 @@ abstract class DeclarationEntry extends Locatable {
271271
abstract Type getType();
272272

273273
/**
274-
* Gets the type associated with this declaration entrry after specifiers
274+
* Gets the type associated with this declaration entry after specifiers
275275
* have been deeply stripped and typedefs have been resolved.
276276
*
277277
* For variable declarations, get the type of the variable.

cpp/ql/src/semmle/code/cpp/exprs/Expr.qll

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -71,10 +71,6 @@ class Expr extends StmtParent, @expr {
7171
/**
7272
* Gets the type of this expression after specifiers have been deeply
7373
* stripped and typedefs have been resolved.
74-
*
75-
* In most cases, this predicate will be the same as getType(). It will
76-
* only differ when the result of getType() is a TypedefType, in which
77-
* case this predicate will (possibly recursively) resolve the typedef.
7874
*/
7975
Type getUnspecifiedType() { result = this.getType().getUnspecifiedType() }
8076

@@ -225,7 +221,7 @@ class Expr extends StmtParent, @expr {
225221
exists ( Expr e2 |
226222
e.(TypeidOperator).getExpr() = e2 and
227223
(
228-
not e2.getActualType().getUnspecifiedType().(Class).isPolymorphic() or
224+
not e2.getFullyConverted().getUnspecifiedType().(Class).isPolymorphic() or
229225
not e2.isGLValueCategory()
230226
)
231227
) or

0 commit comments

Comments
 (0)