mirror of
https://github.com/github/codeql.git
synced 2025-12-16 16:53:25 +01:00
Swift: Avoid calling Element.toString recursively
This commit is contained in:
@@ -5,7 +5,7 @@ private import codeql.swift.elements.decl.Initializer
|
||||
final private class InitializerLookupExprImpl extends Impl::MethodLookupExpr {
|
||||
InitializerLookupExprImpl() { super.getMethod() instanceof Initializer }
|
||||
|
||||
override string toStringImpl() { result = this.getMember().toString() }
|
||||
override string toStringImpl() { result = this.getMember().toStringImpl() }
|
||||
}
|
||||
|
||||
final class InitializerLookupExpr extends MethodLookupExpr, InitializerLookupExprImpl {
|
||||
|
||||
@@ -48,7 +48,7 @@ module Impl {
|
||||
|
||||
override Expr getQualifier() { result = expr.getQualifier() }
|
||||
|
||||
override string toStringImpl() { result = "call to " + expr }
|
||||
override string toStringImpl() { result = "call to " + expr.toStringImpl() }
|
||||
}
|
||||
|
||||
private class FullDotSyntaxBaseIgnoredApplyExpr extends ApplyExpr {
|
||||
|
||||
@@ -4,6 +4,6 @@ module Impl {
|
||||
class ExplicitCastExpr extends Generated::ExplicitCastExpr {
|
||||
override predicate convertsFrom(Expr e) { e = this.getImmediateSubExpr() }
|
||||
|
||||
override string toStringImpl() { result = "(" + this.getType() + ") ..." }
|
||||
override string toStringImpl() { result = "(" + this.getType().toStringImpl() + ") ..." }
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user