Skip to content

Commit b500bbb

Browse files
authored
Merge pull request github#13460 from erik-krogh/rest-of-cpp
CPP: delete the deprecated Container::getURL predicates
2 parents 9c774ac + 2104507 commit b500bbb

File tree

2 files changed

+4
-20
lines changed

2 files changed

+4
-20
lines changed
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
---
2+
category: minorAnalysis
3+
---
4+
* Deleted the deprecated `getURL` predicate from the `Container`, `Folder`, and `File` classes. Use the `getLocation` predicate instead.

cpp/ql/lib/semmle/code/cpp/File.qll

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -34,14 +34,6 @@ class Container extends Locatable, @container {
3434
*/
3535
string getAbsolutePath() { none() } // overridden by subclasses
3636

37-
/**
38-
* DEPRECATED: Use `getLocation` instead.
39-
* Gets a URL representing the location of this container.
40-
*
41-
* For more information see [Providing URLs](https://codeql.github.com/docs/writing-codeql-queries/providing-locations-in-codeql-queries/#providing-urls).
42-
*/
43-
deprecated string getURL() { none() } // overridden by subclasses
44-
4537
/**
4638
* Gets the relative path of this file or folder from the root folder of the
4739
* analyzed source location. The relative path of the root folder itself is
@@ -183,12 +175,6 @@ class Folder extends Container, @folder {
183175
}
184176

185177
override string getAPrimaryQlClass() { result = "Folder" }
186-
187-
/**
188-
* DEPRECATED: Use `getLocation` instead.
189-
* Gets the URL of this folder.
190-
*/
191-
deprecated override string getURL() { result = "file://" + this.getAbsolutePath() + ":0:0:0:0" }
192178
}
193179

194180
/**
@@ -213,12 +199,6 @@ class File extends Container, @file {
213199
result.hasLocationInfo(_, 0, 0, 0, 0)
214200
}
215201

216-
/**
217-
* DEPRECATED: Use `getLocation` instead.
218-
* Gets the URL of this file.
219-
*/
220-
deprecated override string getURL() { result = "file://" + this.getAbsolutePath() + ":0:0:0:0" }
221-
222202
/** Holds if this file was compiled as C (at any point). */
223203
predicate compiledAsC() { fileannotations(underlyingElement(this), 1, "compiled as c", "1") }
224204

0 commit comments

Comments
 (0)