Skip to content

Commit 581939d

Browse files
committed
Swift: replace non-genereated Base suffixes
This is the effect of running ``` find swift/ql/lib/codeql/swift/elements -type f | xargs sed -ri 's/\b([A-Z]\w+)Base\b/Generated::\1/g' ``` followed by reformatting.
1 parent 307c885 commit 581939d

File tree

126 files changed

+129
-128
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

126 files changed

+129
-128
lines changed

swift/ql/lib/codeql/swift/elements/AstNode.qll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ private module Cached {
2323
}
2424
}
2525

26-
class AstNode extends AstNodeBase {
26+
class AstNode extends Generated::AstNode {
2727
final AbstractFunctionDecl getEnclosingFunction() { result = Cached::getEnclosingFunction(this) }
2828

2929
final Decl getEnclosingDecl() { result = Cached::getEnclosingDecl(this) }
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
private import codeql.swift.generated.Callable
22
private import codeql.swift.elements.AstNode
33

4-
class Callable extends CallableBase, AstNode { }
4+
class Callable extends Generated::Callable, AstNode { }

swift/ql/lib/codeql/swift/elements/Comment.qll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
private import codeql.swift.generated.Comment
22

3-
class Comment extends CommentBase {
3+
class Comment extends Generated::Comment {
44
/** toString */
55
override string toString() { result = this.getText() }
66
}

swift/ql/lib/codeql/swift/elements/Element.qll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
private import codeql.swift.generated.Element
22

3-
class Element extends ElementBase {
3+
class Element extends Generated::Element {
44
private predicate resolvesFrom(Element e) { e.getResolveStep() = this }
55

66
override string toString() { result = this.getPrimaryQlClasses() }

swift/ql/lib/codeql/swift/elements/File.qll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
private import codeql.swift.generated.File
22

3-
class File extends FileBase {
3+
class File extends Generated::File {
44
/** toString */
55
override string toString() { result = this.getAbsolutePath() }
66

swift/ql/lib/codeql/swift/elements/Locatable.qll

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,13 @@ private import codeql.swift.generated.Locatable
22
private import codeql.swift.elements.File
33
private import codeql.swift.elements.UnknownLocation
44

5-
class Locatable extends LocatableBase {
5+
class Locatable extends Generated::Locatable {
66
pragma[nomagic]
77
override Location getImmediateLocation() {
8-
result = LocatableBase.super.getImmediateLocation()
8+
result = Generated::Locatable.super.getImmediateLocation()
99
or
10-
not exists(LocatableBase.super.getImmediateLocation()) and result instanceof UnknownLocation
10+
not exists(Generated::Locatable.super.getImmediateLocation()) and
11+
result instanceof UnknownLocation
1112
}
1213

1314
/**

swift/ql/lib/codeql/swift/elements/Location.qll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ private import codeql.swift.generated.Location
33
/**
44
* A location of a program element.
55
*/
6-
class Location extends LocationBase {
6+
class Location extends Generated::Location {
77
/**
88
* Holds if this location is described by `path`, `startLine`, `startColumn`, `endLine` and `endColumn`.
99
*/
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
private import codeql.swift.generated.UnknownFile
22

3-
class UnknownFile extends UnknownFileBase {
3+
class UnknownFile extends Generated::UnknownFile {
44
override string getName() { result = "" }
55
}

swift/ql/lib/codeql/swift/elements/UnknownLocation.qll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ private import codeql.swift.elements.File
55
/**
66
* A `Location` that is given to something that is not associated with any position in the source code.
77
*/
8-
class UnknownLocation extends UnknownLocationBase {
8+
class UnknownLocation extends Generated::UnknownLocation {
99
override File getImmediateFile() { result instanceof UnknownFile }
1010

1111
override int getStartLine() { result = 0 }
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
private import codeql.swift.generated.decl.AbstractFunctionDecl
22

3-
class AbstractFunctionDecl extends AbstractFunctionDeclBase {
3+
class AbstractFunctionDecl extends Generated::AbstractFunctionDecl {
44
override string toString() { result = this.getName() }
55
}

0 commit comments

Comments
 (0)