API graphs: Remove restriction on top-level constants

This commit is contained in:
Tom Hvitved
2021-08-09 12:59:36 +02:00
parent 0eaeb3b5a6
commit ae837d9f7a
2 changed files with 2 additions and 3 deletions

View File

@@ -270,8 +270,7 @@ module API {
or
name = read.getName() and
not exists(resolveScopeExpr(read)) and
not exists(read.getScopeExpr()) and
not exists(read.getValue())
not exists(read.getScopeExpr())
)
or
exists(DataFlow::LocalSourceNode src, DataFlow::LocalSourceNode pred |

View File

@@ -13,7 +13,7 @@ Unknown.new.run #$ use=getMember("Unknown").instance.getReturn("run")
Foo::Bar::Baz #$ use=getMember("Foo").getMember("Bar").getMember("Baz")
Const = [1, 2, 3]
Const.each do |c|
Const.each do |c| #$ use=getMember("Const").getReturn("each")
puts c
end