C++: Follow-up changes

This commit is contained in:
Tom Hvitved
2020-06-30 17:04:38 +02:00
parent 1fa58bd82d
commit de3dc734ff
8 changed files with 16 additions and 32 deletions

View File

@@ -223,17 +223,13 @@ predicate clearsContent(Node n, Content c) {
none() // stub implementation
}
/**
* Gets a representative (boxed) type for `t` for the purpose of pruning
* possible flow. A single type is used for all numeric types to account for
* numeric conversions, and otherwise the erasure is used.
*/
Type getErasedRepr(Type t) {
suppressUnusedType(t) and
/** Gets the type of `n` used for type pruning. */
Type getNodeType(Node n) {
suppressUnusedNode(n) and
result instanceof VoidType // stub implementation
}
/** Gets a string representation of a type returned by `getErasedRepr`. */
/** Gets a string representation of a type returned by `getNodeType`. */
string ppReprType(Type t) { none() } // stub implementation
/**
@@ -245,7 +241,7 @@ predicate compatibleTypes(Type t1, Type t2) {
any() // stub implementation
}
private predicate suppressUnusedType(Type t) { any() }
private predicate suppressUnusedNode(Node n) { any() }
//////////////////////////////////////////////////////////////////////////////
// Java QL library compatibility wrappers

View File

@@ -233,17 +233,13 @@ predicate clearsContent(Node n, Content c) {
none() // stub implementation
}
/**
* Gets a representative (boxed) type for `t` for the purpose of pruning
* possible flow. A single type is used for all numeric types to account for
* numeric conversions, and otherwise the erasure is used.
*/
Type getErasedRepr(Type t) {
suppressUnusedType(t) and
/** Gets the type of `n` used for type pruning. */
Type getNodeType(Node n) {
suppressUnusedNode(n) and
result instanceof VoidType // stub implementation
}
/** Gets a string representation of a type returned by `getErasedRepr`. */
/** Gets a string representation of a type returned by `getNodeType`. */
string ppReprType(Type t) { none() } // stub implementation
/**
@@ -255,7 +251,7 @@ predicate compatibleTypes(Type t1, Type t2) {
any() // stub implementation
}
private predicate suppressUnusedType(Type t) { any() }
private predicate suppressUnusedNode(Node n) { any() }
//////////////////////////////////////////////////////////////////////////////
// Java QL library compatibility wrappers

View File

@@ -1,6 +1,5 @@
uniqueEnclosingCallable
uniqueTypeBound
uniqueTypeRepr
uniqueType
uniqueNodeLocation
missingLocation
uniqueNodeToString

View File

@@ -1,6 +1,5 @@
uniqueEnclosingCallable
uniqueTypeBound
uniqueTypeRepr
uniqueType
uniqueNodeLocation
| BarrierGuard.cpp:2:11:2:13 | p#0 | Node should have one location but has 6. |
| acrossLinkTargets.cpp:2:11:2:13 | p#0 | Node should have one location but has 6. |

View File

@@ -1,8 +1,7 @@
uniqueEnclosingCallable
| C.cpp:37:24:37:33 | 0 | Node should have one enclosing callable but has 0. |
| C.cpp:37:24:37:33 | new | Node should have one enclosing callable but has 0. |
uniqueTypeBound
uniqueTypeRepr
uniqueType
uniqueNodeLocation
missingLocation
uniqueNodeToString

View File

@@ -1,6 +1,5 @@
uniqueEnclosingCallable
uniqueTypeBound
uniqueTypeRepr
uniqueType
uniqueNodeLocation
| D.cpp:1:17:1:17 | o | Node should have one location but has 3. |
| by_reference.cpp:1:17:1:17 | o | Node should have one location but has 3. |

View File

@@ -8,10 +8,7 @@ uniqueEnclosingCallable
| misc.c:210:24:210:24 | 0 | Node should have one enclosing callable but has 0. |
| misc.c:210:24:210:28 | ... + ... | Node should have one enclosing callable but has 0. |
| misc.c:210:28:210:28 | 1 | Node should have one enclosing callable but has 0. |
uniqueTypeBound
| cpp17.cpp:15:5:15:45 | call to unknown function | Node should have one type bound but has 0. |
uniqueTypeRepr
| cpp17.cpp:15:5:15:45 | call to unknown function | Node should have one type representation but has 0. |
uniqueType
uniqueNodeLocation
| break_labels.c:2:11:2:11 | i | Node should have one location but has 4. |
| break_labels.c:2:11:2:11 | x | Node should have one location but has 4. |

View File

@@ -1,6 +1,5 @@
uniqueEnclosingCallable
uniqueTypeBound
uniqueTypeRepr
uniqueType
uniqueNodeLocation
| aggregateinitializer.c:1:6:1:6 | AliasedDefinition | Node should have one location but has 20. |
| aggregateinitializer.c:1:6:1:6 | AliasedUse | Node should have one location but has 20. |