We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents f5509da + 66f5e4a commit 7568868Copy full SHA for 7568868
1 file changed
csharp/ql/lib/semmle/code/cil/Stubs.qll
@@ -32,12 +32,12 @@ private module Cached {
32
exists(Assembly asm |
33
asm = mi.getLocation() and
34
(assemblyIsStubImpl(asm) implies asm.getFile().extractedQlTest()) and
35
- not exists(MethodImplementation better | mi.getMethod() = better.getMethod() |
36
- mi.getNumberOfInstructions() < better.getNumberOfInstructions()
37
- or
38
- mi.getNumberOfInstructions() = better.getNumberOfInstructions() and
39
- asm.getFile().toString() > better.getLocation().getFile().toString()
40
- ) and
+ mi =
+ max(MethodImplementation impl |
+ mi.getMethod() = impl.getMethod()
+ |
+ impl order by impl.getNumberOfInstructions(), impl.getLocation().getFile().toString() desc
+ ) and
41
exists(mi.getAnInstruction())
42
)
43
}
0 commit comments