mirror of
https://github.com/github/codeql.git
synced 2026-04-30 11:15:13 +02:00
C#: Add a few pragma[nomagic]
This commit is contained in:
@@ -567,6 +567,7 @@ module AssignableDefinitions {
|
||||
* entry point of `p`'s callable to basic block `bb` without passing through
|
||||
* any assignments to `p`.
|
||||
*/
|
||||
pragma[nomagic]
|
||||
private predicate parameterReachesWithoutDef(Parameter p, ControlFlow::BasicBlock bb) {
|
||||
forall(AssignableDefinition def | basicBlockRefParamDef(bb, p, def) |
|
||||
isUncertainRefCall(def.getTargetAccess())
|
||||
|
||||
@@ -65,6 +65,7 @@ predicate implements(Virtualizable m1, Virtualizable m2, ValueOrRefType t) {
|
||||
* `I.M()` is compatible with `A.M()` for types `A` and `B`, but not
|
||||
* for type `C`, because `C.M()` conflicts.
|
||||
*/
|
||||
pragma[nomagic]
|
||||
private Virtualizable getAnImplementedInterfaceMemberForSubType(Virtualizable m, ValueOrRefType t) {
|
||||
result = getACompatibleInterfaceMember(m) and
|
||||
t = m.getDeclaringType()
|
||||
@@ -86,6 +87,7 @@ private predicate hasMemberCompatibleWithInterfaceMember(ValueOrRefType t, Virtu
|
||||
* signature, and where `m` can potentially be accessed when
|
||||
* the interface member is accessed.
|
||||
*/
|
||||
pragma[nomagic]
|
||||
private Virtualizable getACompatibleInterfaceMember(Virtualizable m) {
|
||||
result = getACompatibleInterfaceMemberAux(m) and
|
||||
(
|
||||
@@ -97,12 +99,14 @@ private Virtualizable getACompatibleInterfaceMember(Virtualizable m) {
|
||||
)
|
||||
}
|
||||
|
||||
pragma[nomagic]
|
||||
private Virtualizable getACompatibleExplicitInterfaceMember(Virtualizable m, ValueOrRefType declType) {
|
||||
result = getACompatibleInterfaceMemberAux(m) and
|
||||
declType = m.getDeclaringType() and
|
||||
m.implementsExplicitInterface()
|
||||
}
|
||||
|
||||
pragma[nomagic]
|
||||
private Virtualizable getACompatibleInterfaceMemberAux(Virtualizable m) {
|
||||
result = getACompatibleInterfaceAccessor(m) or
|
||||
result = getACompatibleInterfaceIndexer(m) or
|
||||
|
||||
Reference in New Issue
Block a user