Skip to content

Commit ca1b91a

Browse files
authored
Merge pull request #2414 from dbartol/dbartol/FixWarnings
C++/C#: Fix QL compilation warnings/errors
2 parents a5e6b83 + fb67d3e commit ca1b91a

7 files changed

Lines changed: 10 additions & 8 deletions

File tree

cpp/ql/src/semmle/code/cpp/ir/implementation/unaliased_ssa/internal/SimpleSSA.qll

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import AliasAnalysis
22
private import SimpleSSAImports
3+
import SimpleSSAPublicImports
34

45
private class IntValue = Ints::IntValue;
56

cpp/ql/src/semmle/code/cpp/ir/implementation/unaliased_ssa/internal/SimpleSSAImports.qll

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,3 @@ import semmle.code.cpp.ir.implementation.raw.IR
22
import semmle.code.cpp.ir.internal.IntegerConstant as Ints
33
import semmle.code.cpp.ir.implementation.internal.OperandTag
44
import semmle.code.cpp.ir.internal.IRCppLanguage as Language
5-
import semmle.code.cpp.ir.internal.Overlap
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
import semmle.code.cpp.ir.internal.Overlap

cpp/ql/src/semmle/uml/MagicDraw.qll

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ class UMLType extends UMLElement {
112112
else result = this.getUMLName()
113113
}
114114

115-
string toString() { result = this.getUMLName() }
115+
override string toString() { result = this.getUMLName() }
116116
}
117117

118118
/**
@@ -163,7 +163,7 @@ class UMLProperty extends UMLElement {
163163
result.getDeclaringType() = this.getUMLType().getCType()
164164
}
165165

166-
string toString() {
166+
override string toString() {
167167
if this.isEnumConstant()
168168
then result = "- <<enum constant>> " + this.getUMLName()
169169
else result = "- " + this.getUMLName()
@@ -196,7 +196,7 @@ class UMLOperation extends UMLElement {
196196
result.getDeclaringType() = this.getUMLType().getCType()
197197
}
198198

199-
string toString() { result = "+ " + this.getUMLName() }
199+
override string toString() { result = "+ " + this.getUMLName() }
200200
}
201201

202202
/**
@@ -221,7 +221,7 @@ class UMLAssociation extends UMLProperty {
221221
/**
222222
* Gets the C field corresponding to this property, if any.
223223
*/
224-
Field getCField() {
224+
override Field getCField() {
225225
result.hasName(this.getLabel()) and
226226
result.getDeclaringType() = this.getSource().getCType()
227227
}
@@ -271,7 +271,7 @@ class UMLInheritance extends UMLElement {
271271
)
272272
}
273273

274-
string toString() {
274+
override string toString() {
275275
result = this.getUMLClient().getUMLName() + " implements " + this.getUMLSupplier().getUMLName()
276276
}
277277
}
@@ -303,5 +303,5 @@ class UMLPackage extends UMLElement {
303303
else result = this.getUMLName()
304304
}
305305

306-
string toString() { result = this.getUMLQualifiedName() }
306+
override string toString() { result = this.getUMLQualifiedName() }
307307
}

csharp/ql/src/semmle/code/csharp/ir/implementation/unaliased_ssa/internal/SimpleSSA.qll

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import AliasAnalysis
22
private import SimpleSSAImports
3+
import SimpleSSAPublicImports
34

45
private class IntValue = Ints::IntValue;
56

csharp/ql/src/semmle/code/csharp/ir/implementation/unaliased_ssa/internal/SimpleSSAImports.qll

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,3 @@ import semmle.code.csharp.ir.implementation.raw.IR
22
import semmle.code.csharp.ir.internal.IntegerConstant as Ints
33
import semmle.code.csharp.ir.implementation.internal.OperandTag
44
import semmle.code.csharp.ir.internal.IRCSharpLanguage as Language
5-
import semmle.code.csharp.ir.internal.Overlap
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
import semmle.code.csharp.ir.internal.Overlap

0 commit comments

Comments
 (0)