JS: replace .stripParens query uses w. .getUnderlyingReference

This commit is contained in:
Esben Sparre Andreasen
2018-10-15 09:56:38 +02:00
parent f04293f73c
commit e6a190c06e
4 changed files with 5 additions and 5 deletions

View File

@@ -19,7 +19,7 @@ private import Declarations.Declarations
* `x` has kind `"V"`.
*/
string refKind(RefExpr r) {
if exists(InvokeExpr invk | r = invk.getCallee().stripParens()) then
if exists(InvokeExpr invk | r = invk.getCallee().getUnderlyingReference()) then
result = "M"
else
result = "V"
@@ -143,7 +143,7 @@ predicate typedInvokeLookup(ASTNode ref, ASTNode decl, string kind) {
not variableDefLookup(ref, decl, _) and
not propertyLookup(ref, decl, _) and
exists (InvokeExpr invoke, Expr callee |
callee = invoke.getCallee().stripParens() and
callee = invoke.getCallee().getUnderlyingReference() and
(ref = callee.(Identifier) or ref = callee.(DotExpr).getPropertyNameExpr()) and
decl = invoke.getResolvedCallee() and
kind = "M")