Skip to content

Commit 0219dbe

Browse files
C++: Fix override warning
1 parent 6303889 commit 0219dbe

File tree

1 file changed

+3
-9
lines changed

1 file changed

+3
-9
lines changed

cpp/ql/src/semmle/code/cpp/ir/internal/CppType.qll

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -191,7 +191,7 @@ private newtype TCppType =
191191
* of a `VariableAddress` where the variable is of reference type)
192192
*/
193193
class CppType extends TCppType {
194-
abstract string toString();
194+
string toString() { none() }
195195

196196
/** Gets a string used in IR dumps */
197197
string getDumpString() { result = toString() }
@@ -203,13 +203,13 @@ class CppType extends TCppType {
203203
* Gets the `IRType` that represents this `CppType`. Many different `CppType`s can map to a single
204204
* `IRType`.
205205
*/
206-
abstract IRType getIRType();
206+
IRType getIRType() { none() }
207207

208208
/**
209209
* Holds if the `CppType` represents a prvalue of type `Type` (if `isGLValue` is `false`), or if
210210
* it represents a glvalue of type `Type` (if `isGLValue` is `true`).
211211
*/
212-
abstract predicate hasType(Type type, boolean isGLValue);
212+
predicate hasType(Type type, boolean isGLValue) { none() }
213213

214214
final predicate hasUnspecifiedType(Type type, boolean isGLValue) {
215215
exists(Type specifiedType |
@@ -229,12 +229,6 @@ private class CppWrappedType extends CppType {
229229
this = TPRValueType(ctype) or
230230
this = TGLValueAddressType(ctype)
231231
}
232-
233-
abstract string toString();
234-
235-
abstract override IRType getIRType();
236-
237-
abstract override predicate hasType(Type type, boolean isGLValue);
238232
}
239233

240234
/**

0 commit comments

Comments
 (0)