Skip to content

Commit d0eb167

Browse files
committed
Swift: Merge FloatingPointType.qll into NumericOrCharType.qll, because it is a numeric type and other stuff like CharacterType is there.
1 parent 7f5344e commit d0eb167

File tree

3 files changed

+11
-13
lines changed

3 files changed

+11
-13
lines changed

swift/ql/lib/codeql/swift/elements/type/FloatingPointType.qll

Lines changed: 0 additions & 12 deletions
This file was deleted.

swift/ql/lib/codeql/swift/elements/type/NumericOrCharType.qll

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,16 @@
11
private import swift
22

3+
/**
4+
* A floating-point type. This includes the `Float` type, the `Double`, and
5+
* builtin floating-point types.
6+
*/
7+
class FloatingPointType extends Type {
8+
FloatingPointType() {
9+
this.getName() = ["Float", "Double"] or
10+
this instanceof BuiltinFloatType
11+
}
12+
}
13+
314
/** The `Character` type. */
415
class CharacterType extends StructType {
516
CharacterType() { this.getName() = "Character" }

swift/ql/lib/swift.qll

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,5 @@ import codeql.swift.elements.expr.InitializerCallExpr
1010
import codeql.swift.elements.expr.SelfRefExpr
1111
import codeql.swift.elements.decl.MethodDecl
1212
import codeql.swift.elements.decl.ClassOrStructDecl
13-
import codeql.swift.elements.type.FloatingPointType
1413
import codeql.swift.elements.type.NumericOrCharType
1514
import codeql.swift.Unit

0 commit comments

Comments
 (0)