Does this patch help?  And produce the correct results?

diff --git a/dxr/query.py b/dxr/query.py
index 3f1fcd5..fb00953 100644
--- a/dxr/query.py
+++ b/dxr/query.py
@@ -838,26 +838,21 @@ filters = [
       ExistsLikeFilter(
           param         = "callers",
           filter_sql    = """SELECT 1
-                              FROM functions as caller, functions as
target, callers
+                              FROM functions as caller, functions as
target, callers, targets
                              WHERE %s
-                               AND  EXISTS ( SELECT 1 FROM targets
-                                              WHERE targets.funcid =
target.id
-                                                AND targets.targetid =
callers.targetid
-                                           )
+                               AND targets.funcid = target.id
+                               AND targets.targetid = callers.targetid
                                AND callers.callerid = caller.id
                                AND caller.file_id = files.id
                           """,
           ext_sql       = """SELECT functions.extent_start,
functions.extent_end
                               FROM functions
                              WHERE functions.file_id = ?
-                               AND EXISTS (SELECT 1 FROM functions as
target, callers
+                               AND EXISTS (SELECT 1 FROM functions as
target, callers, targets
                                             WHERE %s
-                                              AND EXISTS (
-                                         SELECT 1 FROM targets
-                                          WHERE targets.funcid = target.id
-                                            AND targets.targetid =
callers.targetid
-                                            AND callers.callerid =
target.id
-                                                  )
+                                              AND targets.funcid =
target.id
+                                              AND targets.targetid =
callers.targetid
+                                              AND callers.callerid =
target.id
                                               AND callers.callerid =
functions.id
                                           )
                              ORDER BY functions.extent_start




-- 
James
_______________________________________________
dev-static-analysis mailing list
[email protected]
https://lists.mozilla.org/listinfo/dev-static-analysis

Reply via email to