Merge pull request #1451 from hvitved/csharp/element-preds

C#: Move two predicates from `csharp/Element.qll` to `dotnet/Element.qll`
This commit is contained in:
Calum Grant
2019-06-14 16:21:28 +01:00
committed by GitHub
2 changed files with 2 additions and 6 deletions

View File

@@ -27,10 +27,6 @@ class Element extends DotNet::Element, @element {
/** Gets a location of this element, including sources and assemblies. */
override Location getALocation() { none() }
override File getFile() { result = getLocation().getFile() }
override predicate fromSource() { this.getFile().fromSource() }
/** Holds if this element is from an assembly. */
predicate fromLibrary() { this.getFile().fromLibrary() }

View File

@@ -22,10 +22,10 @@ class Element extends @dotnet_element {
Location getALocation() { none() }
/** Gets the file containing this element. */
File getFile() { result = getLocation().getFile() }
final File getFile() { result = this.getLocation().getFile() }
/** Holds if this element is from source code. */
predicate fromSource() { none() }
predicate fromSource() { this.getFile().fromSource() }
/**
* Gets the "language" of this program element, as defined by the extension of the filename.