-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #15887 from michaelnebel/csharp/qualifiedname
C#: Fully qualified name.
- Loading branch information
Showing
23 changed files
with
107 additions
and
155 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,7 @@ | ||
import csharp | ||
import semmle.code.csharp.commons.QualifiedName | ||
|
||
from Attributable element, Attribute attribute, string qualifier, string name | ||
from Attributable element, Attribute attribute | ||
where | ||
attribute = element.getAnAttribute() and | ||
(attribute.fromSource() or element.(Assembly).getName() in ["attributes", "Assembly1"]) and | ||
attribute.getType().hasFullyQualifiedName(qualifier, name) | ||
select element, attribute, getQualifiedName(qualifier, name) | ||
(attribute.fromSource() or element.(Assembly).getName() in ["attributes", "Assembly1"]) | ||
select element, attribute, attribute.getType().getFullyQualifiedNameDebug() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,10 @@ | ||
import csharp | ||
import semmle.code.csharp.commons.QualifiedName | ||
|
||
from LocalVariable v1, LocalVariable v2, Type t, string qualifier, string name | ||
from LocalVariable v1, LocalVariable v2, Type t | ||
where | ||
v1.getFile().getStem() = "NativeInt" and | ||
v2.getFile().getStem() = "NativeInt" and | ||
t = v1.getType() and | ||
t = v2.getType() and | ||
t.hasFullyQualifiedName(qualifier, name) and | ||
v1 != v2 | ||
select v1, v2, getQualifiedName(qualifier, name) | ||
select v1, v2, t.getFullyQualifiedNameDebug() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,8 @@ | ||
import csharp | ||
import semmle.code.csharp.commons.QualifiedName | ||
|
||
from | ||
Method m, Method overrider, string mnamespace, string mtype, string mname, string onamespace, | ||
string otype, string oname | ||
from Method m, Method overrider | ||
where | ||
m.getAnOverrider() = overrider and | ||
m.getFile().getStem() = "CovariantReturn" and | ||
m.hasFullyQualifiedName(mnamespace, mtype, mname) and | ||
overrider.hasFullyQualifiedName(onamespace, otype, oname) | ||
select getQualifiedName(mnamespace, mtype, mname), m.getReturnType().toString(), | ||
getQualifiedName(onamespace, otype, oname), overrider.getReturnType().toString() | ||
m.getFile().getStem() = "CovariantReturn" | ||
select m.getFullyQualifiedNameDebug(), m.getReturnType().toString(), | ||
overrider.getFullyQualifiedNameDebug(), overrider.getReturnType().toString() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.