Skip to content

Commit 2fb9c2d

Browse files
committed
C#: Remove deprecated qualifiedName predicates.
1 parent aa24c29 commit 2fb9c2d

File tree

3 files changed

+0
-77
lines changed

3 files changed

+0
-77
lines changed

csharp/ql/lib/semmle/code/csharp/Element.qll

Lines changed: 0 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -101,25 +101,6 @@ class NamedElement extends Element, @named_element {
101101
/** Holds if this element has name 'name'. */
102102
final predicate hasName(string name) { name = this.getName() }
103103

104-
/**
105-
* Gets the fully qualified name of this element, for example the
106-
* fully qualified name of `M` on line 3 is `N.C.M` in
107-
*
108-
* ```csharp
109-
* namespace N {
110-
* class C {
111-
* void M(int i, string s) { }
112-
* }
113-
* }
114-
* ```
115-
*/
116-
cached
117-
deprecated final string getQualifiedName() {
118-
exists(string qualifier, string name | this.hasQualifiedName(qualifier, name) |
119-
if qualifier = "" then result = name else result = qualifier + "." + name
120-
)
121-
}
122-
123104
/**
124105
* Gets the fully qualified name of this element, for example the
125106
* fully qualified name of `M` on line 3 is `N.C.M` in
@@ -142,16 +123,6 @@ class NamedElement extends Element, @named_element {
142123
)
143124
}
144125

145-
/**
146-
* DEPRECATED: Use `hasFullyQualifiedName` instead.
147-
*
148-
* Holds if this element has the qualified name `qualifier`.`name`.
149-
*/
150-
cached
151-
deprecated predicate hasQualifiedName(string qualifier, string name) {
152-
qualifier = "" and name = this.getName()
153-
}
154-
155126
/** Holds if this element has the fully qualified name `qualifier`.`name`. */
156127
cached
157128
predicate hasFullyQualifiedName(string qualifier, string name) {

csharp/ql/lib/semmle/code/csharp/Member.qll

Lines changed: 0 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -71,37 +71,10 @@ class Declaration extends NamedElement, @declaration {
7171

7272
override string toString() { result = this.getName() }
7373

74-
deprecated override predicate hasQualifiedName(string qualifier, string name) {
75-
QualifiedName<QualifiedNameInput>::hasQualifiedName(this, qualifier, name)
76-
}
77-
7874
override predicate hasFullyQualifiedName(string qualifier, string name) {
7975
QualifiedName<FullyQualifiedNameInput>::hasQualifiedName(this, qualifier, name)
8076
}
8177

82-
/**
83-
* DEPRECATED: Use `getFullyQualifiedNameWithTypes` instead.
84-
*
85-
* Gets the fully qualified name of this declaration, including types, for example
86-
* the fully qualified name with types of `M` on line 3 is `N.C.M(int, string)` in
87-
*
88-
* ```csharp
89-
* namespace N {
90-
* class C {
91-
* void M(int i, string s) { }
92-
* }
93-
* }
94-
* ```
95-
*/
96-
deprecated string getQualifiedNameWithTypes() {
97-
exists(string qual |
98-
qual = this.getDeclaringType().getQualifiedName() and
99-
if this instanceof NestedType
100-
then result = qual + "+" + this.toStringWithTypes()
101-
else result = qual + "." + this.toStringWithTypes()
102-
)
103-
}
104-
10578
/**
10679
* Gets the fully qualified name of this declaration, including types, for example
10780
* the fully qualified name with types of `M` on line 3 is `N.C.M(int, string)` in
@@ -263,17 +236,6 @@ class Member extends Modifiable, @member {
263236
/** Gets an access to this member. */
264237
MemberAccess getAnAccess() { result.getTarget() = this }
265238

266-
/**
267-
* DEPRECATED: Use `hasFullyQualifiedName` instead.
268-
*
269-
* Holds if this member has name `name` and is defined in type `type`
270-
* with namespace `namespace`.
271-
*/
272-
cached
273-
deprecated final predicate hasQualifiedName(string namespace, string type, string name) {
274-
QualifiedName<QualifiedNameInput>::hasQualifiedName(this, namespace, type, name)
275-
}
276-
277239
/**
278240
* Holds if this member has name `name` and is defined in type `type`
279241
* with namespace `namespace`.

csharp/ql/lib/semmle/code/csharp/Namespace.qll

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -38,16 +38,6 @@ class Namespace extends TypeContainer, Declaration, @namespace {
3838
parent_namespace(result, this)
3939
}
4040

41-
/**
42-
* Holds if this namespace has the qualified name `qualifier`.`name`.
43-
*
44-
* For example if the qualified name is `System.Collections.Generic`, then
45-
* `qualifier`=`System.Collections` and `name`=`Generic`.
46-
*/
47-
deprecated override predicate hasQualifiedName(string qualifier, string name) {
48-
namespaceHasQualifiedName(this, qualifier, name)
49-
}
50-
5141
/**
5242
* Holds if this namespace has the qualified name `qualifier`.`name`.
5343
*

0 commit comments

Comments
 (0)