C++: Fix QL-on-QL Redundant Cast warning

This commit is contained in:
Nora Dimitrijević
2022-09-29 23:19:49 +02:00
parent 2a046352ce
commit 68b473377a

View File

@@ -28,10 +28,10 @@ predicate isCompilerGenerated(ThisExpr te) {
/** Gets the sub-expression of 'e' with the earliest-starting Location */
Expr normalizeExpr(Expr e) {
if forex(Expr q | q = e.(Call).getQualifier() | not isCompilerGenerated(q.(ThisExpr)))
if forex(Expr q | q = e.(Call).getQualifier() | not isCompilerGenerated(q))
then result = normalizeExpr(e.(Call).getQualifier())
else
if forex(Expr q | q = e.(FieldAccess).getQualifier() | not isCompilerGenerated(q.(ThisExpr)))
if forex(Expr q | q = e.(FieldAccess).getQualifier() | not isCompilerGenerated(q))
then result = normalizeExpr(e.(FieldAccess).getQualifier())
else
if e.hasExplicitConversion()