Skip to content

Commit 668e518

Browse files
committed
Address compilation issue with FunctionType.
1 parent 61ae04f commit 668e518

File tree

3 files changed

+1
-19
lines changed

3 files changed

+1
-19
lines changed

cpp/common/src/codingstandards/cpp/Call.qll

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import cpp
22
import codingstandards.cpp.types.Type
3+
import codingstandards.cpp.types.FunctionType
34

45
/**
56
* Gets the `FunctionType` of an expression call.

cpp/common/src/codingstandards/cpp/types/Compatible.qll

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -527,7 +527,6 @@ module FunctionDeclarationTypeEquivalence<
527527
private class LeafType extends Type {
528528
LeafType() {
529529
not this instanceof DerivedType and
530-
not this instanceof FunctionType and
531530
not this instanceof FunctionType
532531
}
533532
}

cpp/common/src/codingstandards/cpp/types/Type.qll

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -124,21 +124,3 @@ int sizeOfInt() {
124124
size
125125
)
126126
}
127-
128-
/**
129-
* Convenience class to reduce the awkwardness of how `RoutineType` and `FunctionPointerIshType`
130-
* don't have a common ancestor.
131-
*/
132-
class FunctionType extends Type {
133-
FunctionType() { this instanceof RoutineType or this instanceof FunctionPointerIshType }
134-
135-
Type getReturnType() {
136-
result = this.(RoutineType).getReturnType() or
137-
result = this.(FunctionPointerIshType).getReturnType()
138-
}
139-
140-
Type getParameterType(int i) {
141-
result = this.(RoutineType).getParameterType(i) or
142-
result = this.(FunctionPointerIshType).getParameterType(i)
143-
}
144-
}

0 commit comments

Comments
 (0)