Rework global statement extraction without DB scheme change

This commit is contained in:
Tamas Vajk
2021-02-12 12:37:15 +01:00
parent a14db7a04f
commit 4967664d09
8 changed files with 17 additions and 32 deletions

View File

@@ -1,4 +1,5 @@
import csharp
private import semmle.code.csharp.commons.Util
query predicate global_stmt(Stmt stmt) { stmt.isGlobal() }
@@ -11,5 +12,5 @@ query predicate globalBlock(BlockStmt block, Method m, Parameter p, Type t) {
query predicate methods(Method m, string entry) {
m.getFile().getStem() = "GlobalStmt" and
if m.isEntry() then entry = "entry" else entry = "non-entry"
if m instanceof MainMethod then entry = "entry" else entry = "non-entry"
}