mirror of
https://github.com/github/codeql.git
synced 2026-07-20 18:58:36 +02:00
C++: Add back getLocation in File
This commit is contained in:
@@ -65,6 +65,12 @@ class Folder extends Container, Impl::Folder {
|
||||
class File extends Container, Impl::File {
|
||||
override string getAPrimaryQlClass() { result = "File" }
|
||||
|
||||
/** Gets the primary location of this file. */
|
||||
Location getLocation() {
|
||||
result.getContainer() = this and
|
||||
result.hasLocationInfo(_, 0, 0, 0, 0)
|
||||
}
|
||||
|
||||
/** Holds if this file was compiled as C (at any point). */
|
||||
predicate compiledAsC() { fileannotations(underlyingElement(this), 1, "compiled as c", "1") }
|
||||
|
||||
|
||||
Reference in New Issue
Block a user