Skip to content

Commit 083a4b2

Browse files
author
Robert Marsh
committed
C++: handle non-casts in hasExplicitConversion
1 parent 4be138d commit 083a4b2

File tree

1 file changed

+2
-2
lines changed
  • cpp/ql/src/semmle/code/cpp/exprs

1 file changed

+2
-2
lines changed

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -402,7 +402,7 @@ class Expr extends StmtParent, @expr {
402402
*/
403403
predicate hasImplicitConversion() {
404404
exists(Expr e |
405-
exprconv(underlyingElement(this), unresolveElement(e)) and e.(Cast).isImplicit()
405+
exprconv(underlyingElement(this), unresolveElement(e)) and e.(Conversion).isImplicit()
406406
)
407407
}
408408

@@ -414,7 +414,7 @@ class Expr extends StmtParent, @expr {
414414
*/
415415
predicate hasExplicitConversion() {
416416
exists(Expr e |
417-
exprconv(underlyingElement(this), unresolveElement(e)) and not e.(Cast).isImplicit()
417+
exprconv(underlyingElement(this), unresolveElement(e)) and not e.(Conversion).isImplicit()
418418
)
419419
}
420420

0 commit comments

Comments
 (0)