diff --git a/powershell/ql/test/library-tests/controlflow/graph/Cfg.expected b/powershell/ql/test/library-tests/controlflow/graph/Cfg.expected index 13bec0de80d..ed8fdc6ade6 100644 --- a/powershell/ql/test/library-tests/controlflow/graph/Cfg.expected +++ b/powershell/ql/test/library-tests/controlflow/graph/Cfg.expected @@ -19,6 +19,11 @@ conditionals.ps1: # 1| enter {...} #-----| -> {...} +# 1| exit {...} + +# 1| exit {...} (normal) +#-----| -> exit {...} + # 1| {...} #-----| -> param(...) @@ -38,6 +43,25 @@ conditionals.ps1: #-----| -> myBool # 5| {...} +#-----| -> return ... + +# 6| return ... +#-----| -> 10 + +# 6| 10 +#-----| -> return ... + +# 6| 10 +#-----| -> 10 + +# 8| return ... +#-----| -> 11 + +# 8| 11 +#-----| -> exit {...} (normal) + +# 8| 11 +#-----| -> 11 # 11| test-if-else #-----| -> test-if-conj @@ -45,6 +69,11 @@ conditionals.ps1: # 11| enter {...} #-----| -> {...} +# 11| exit {...} + +# 11| exit {...} (normal) +#-----| -> exit {...} + # 11| {...} #-----| -> param(...) @@ -65,8 +94,28 @@ conditionals.ps1: #-----| -> myBool # 15| {...} +#-----| -> return ... + +# 16| return ... +#-----| -> 10 + +# 16| 10 +#-----| -> exit {...} (normal) + +# 16| 10 +#-----| -> 10 # 19| {...} +#-----| -> return ... + +# 20| return ... +#-----| -> 11 + +# 20| 11 +#-----| -> exit {...} (normal) + +# 20| 11 +#-----| -> 11 # 24| test-if-conj #-----| -> test-if-else-conj @@ -74,6 +123,11 @@ conditionals.ps1: # 24| enter {...} #-----| -> {...} +# 24| exit {...} + +# 24| exit {...} (normal) +#-----| -> exit {...} + # 24| {...} #-----| -> param(...) @@ -99,6 +153,25 @@ conditionals.ps1: #-----| false, true -> ... -and ... # 28| {...} +#-----| -> return ... + +# 29| return ... +#-----| -> 10 + +# 29| 10 +#-----| -> return ... + +# 29| 10 +#-----| -> 10 + +# 31| return ... +#-----| -> 11 + +# 31| 11 +#-----| -> exit {...} (normal) + +# 31| 11 +#-----| -> 11 # 34| test-if-else-conj #-----| -> test-if-disj @@ -106,6 +179,11 @@ conditionals.ps1: # 34| enter {...} #-----| -> {...} +# 34| exit {...} + +# 34| exit {...} (normal) +#-----| -> exit {...} + # 34| {...} #-----| -> param(...) @@ -132,8 +210,28 @@ conditionals.ps1: #-----| false, true -> ... -and ... # 38| {...} +#-----| -> return ... + +# 39| return ... +#-----| -> 10 + +# 39| 10 +#-----| -> exit {...} (normal) + +# 39| 10 +#-----| -> 10 # 42| {...} +#-----| -> return ... + +# 43| return ... +#-----| -> 11 + +# 43| 11 +#-----| -> exit {...} (normal) + +# 43| 11 +#-----| -> 11 # 47| test-if-disj #-----| -> test-if-else-disj @@ -141,6 +239,11 @@ conditionals.ps1: # 47| enter {...} #-----| -> {...} +# 47| exit {...} + +# 47| exit {...} (normal) +#-----| -> exit {...} + # 47| {...} #-----| -> param(...) @@ -166,6 +269,25 @@ conditionals.ps1: #-----| false, true -> ... -or ... # 51| {...} +#-----| -> return ... + +# 52| return ... +#-----| -> 10 + +# 52| 10 +#-----| -> return ... + +# 52| 10 +#-----| -> 10 + +# 54| return ... +#-----| -> 11 + +# 54| 11 +#-----| -> exit {...} (normal) + +# 54| 11 +#-----| -> 11 # 57| test-if-else-disj #-----| -> test-else-if @@ -173,6 +295,11 @@ conditionals.ps1: # 57| enter {...} #-----| -> {...} +# 57| exit {...} + +# 57| exit {...} (normal) +#-----| -> exit {...} + # 57| {...} #-----| -> param(...) @@ -199,8 +326,28 @@ conditionals.ps1: #-----| false, true -> ... -or ... # 61| {...} +#-----| -> return ... + +# 62| return ... +#-----| -> 10 + +# 62| 10 +#-----| -> exit {...} (normal) + +# 62| 10 +#-----| -> 10 # 65| {...} +#-----| -> return ... + +# 66| return ... +#-----| -> 11 + +# 66| 11 +#-----| -> exit {...} (normal) + +# 66| 11 +#-----| -> 11 # 70| test-else-if #-----| -> test-else-if-else @@ -208,6 +355,11 @@ conditionals.ps1: # 70| enter {...} #-----| -> {...} +# 70| exit {...} + +# 70| exit {...} (normal) +#-----| -> exit {...} + # 70| {...} #-----| -> param(...) @@ -227,6 +379,25 @@ conditionals.ps1: #-----| -> myBool1 # 74| {...} +#-----| -> return ... + +# 75| return ... +#-----| -> 10 + +# 75| 10 +#-----| -> return ... + +# 75| 10 +#-----| -> 10 + +# 81| return ... +#-----| -> 12 + +# 81| 12 +#-----| -> exit {...} (normal) + +# 81| 12 +#-----| -> 12 # 84| test-else-if-else #-----| -> test-switch @@ -234,6 +405,11 @@ conditionals.ps1: # 84| enter {...} #-----| -> {...} +# 84| exit {...} + +# 84| exit {...} (normal) +#-----| -> exit {...} + # 84| {...} #-----| -> param(...) @@ -254,8 +430,28 @@ conditionals.ps1: #-----| -> myBool1 # 88| {...} +#-----| -> return ... + +# 89| return ... +#-----| -> 10 + +# 89| 10 +#-----| -> exit {...} (normal) + +# 89| 10 +#-----| -> 10 # 96| {...} +#-----| -> return ... + +# 97| return ... +#-----| -> 12 + +# 97| 12 +#-----| -> exit {...} (normal) + +# 97| 12 +#-----| -> 12 # 101| test-switch #-----| -> test-switch-default @@ -263,6 +459,11 @@ conditionals.ps1: # 101| enter {...} #-----| -> {...} +# 101| exit {...} + +# 101| exit {...} (normal) +#-----| -> exit {...} + # 101| {...} #-----| -> {...} @@ -273,16 +474,70 @@ conditionals.ps1: #-----| -> switch(...) {...} # 102| n +#-----| -> 0: # 102| n #-----| -> n +# 104| 0: +#-----| true -> {...} +#-----| false -> 1: + +# 104| {...} +#-----| -> return ... + +# 104| return ... +#-----| -> 0 + +# 104| 0 +#-----| -> exit {...} (normal) + +# 104| 0 +#-----| -> 0 + +# 105| 1: +#-----| true -> {...} +#-----| false -> 2: + +# 105| {...} +#-----| -> return ... + +# 105| return ... +#-----| -> 1 + +# 105| 1 +#-----| -> exit {...} (normal) + +# 105| 1 +#-----| -> 1 + +# 106| 2: +#-----| false -> exit {...} (normal) +#-----| true -> {...} + +# 106| {...} +#-----| -> return ... + +# 106| return ... +#-----| -> 2 + +# 106| 2 +#-----| -> exit {...} (normal) + +# 106| 2 +#-----| -> 2 + # 110| test-switch-default #-----| -> test-switch-assign # 110| enter {...} #-----| -> {...} +# 110| exit {...} + +# 110| exit {...} (normal) +#-----| -> exit {...} + # 110| {...} #-----| -> {...} @@ -293,16 +548,95 @@ conditionals.ps1: #-----| -> switch(...) {...} # 111| n +#-----| -> 0: # 111| n #-----| -> n +# 113| 0: +#-----| true -> {...} +#-----| false -> 1: + +# 113| {...} +#-----| -> return ... + +# 113| return ... +#-----| -> 0 + +# 113| 0 +#-----| -> exit {...} (normal) + +# 113| 0 +#-----| -> 0 + +# 114| 1: +#-----| true -> {...} +#-----| false -> 2: + +# 114| {...} +#-----| -> return ... + +# 114| return ... +#-----| -> 1 + +# 114| 1 +#-----| -> exit {...} (normal) + +# 114| 1 +#-----| -> 1 + +# 115| 2: +#-----| true -> {...} +#-----| false -> default: + +# 115| {...} +#-----| -> return ... + +# 115| return ... +#-----| -> 2 + +# 115| 2 +#-----| -> exit {...} (normal) + +# 115| 2 +#-----| -> 2 + +# 116| default: +#-----| false -> exit {...} (normal) +#-----| true -> {...} + +# 116| {...} +#-----| -> Write-Output + +# 117| Write-Output +#-----| -> Error! + +# 117| Write-Output +#-----| -> return ... + +# 117| Error! +#-----| -> Write-Output + +# 118| return ... +#-----| -> 3 + +# 118| 3 +#-----| -> exit {...} (normal) + +# 118| 3 +#-----| -> 3 + # 123| test-switch-assign #-----| -> exit conditionals.ps1 (normal) # 123| enter {...} #-----| -> {...} +# 123| exit {...} + +# 123| exit {...} (normal) +#-----| -> exit {...} + # 123| {...} #-----| -> {...} @@ -319,10 +653,50 @@ conditionals.ps1: #-----| -> n # 124| n +#-----| -> 0: # 124| n #-----| -> n +# 125| 0: +#-----| true -> {...} +#-----| false -> 1: + +# 125| {...} +#-----| -> 0 + +# 125| 0 +#-----| -> exit {...} (normal) + +# 125| 0 +#-----| -> 0 + +# 126| 1: +#-----| true -> {...} +#-----| false -> 2: + +# 126| {...} +#-----| -> 1 + +# 126| 1 +#-----| -> exit {...} (normal) + +# 126| 1 +#-----| -> 1 + +# 127| 2: +#-----| false -> exit {...} (normal) +#-----| true -> {...} + +# 127| {...} +#-----| -> 2 + +# 127| 2 +#-----| -> exit {...} (normal) + +# 127| 2 +#-----| -> 2 + functions.ps1: # 1| Add-Numbers-Arguments #-----| -> foo @@ -1020,6 +1394,7 @@ loops.ps1: #-----| -> 1 # 45| ...+... +#-----| -> ... -le ... #-----| -> ...=... # 45| ...+... @@ -1034,6 +1409,11 @@ loops.ps1: # 49| enter {...} #-----| -> {...} +# 49| exit {...} + +# 49| exit {...} (normal) +#-----| -> exit {...} + # 49| {...} #-----| -> {...} @@ -1046,7 +1426,69 @@ loops.ps1: # 50| {...} #-----| -> ...=... +# 50| a +#-----| -> b + # 50| ...,... +#-----| -> ...=... + +# 50| ...,... +#-----| -> a + +# 50| b +#-----| -> c + +# 50| c +#-----| -> d + +# 50| d +#-----| -> ...,... + +# 51| a +#-----| -> 0 + +# 51| ...=... +#-----| -> a + +# 51| 0 +#-----| -> letterArray + +# 51| 0 +#-----| -> 0 + +# 52| forach(... in ...) +#-----| -> exit {...} (normal) +#-----| -> letter + +# 52| letter +#-----| -> {...} + +# 52| letterArray +#-----| -> forach(... in ...) + +# 52| letterArray +#-----| -> letterArray + +# 53| {...} +#-----| -> ...=... + +# 54| a +#-----| -> ...+... + +# 54| ...=... +#-----| -> a + +# 54| a +#-----| -> 1 + +# 54| ...+... +#-----| -> forach(... in ...) + +# 54| ...+... +#-----| -> a + +# 54| 1 +#-----| -> ...+... # 58| Test-For-Ever #-----| -> exit loops.ps1 (normal) @@ -1095,6 +1537,11 @@ try.ps1: # 1| enter {...} #-----| -> {...} +# 1| exit {...} + +# 1| exit {...} (normal) +#-----| -> exit {...} + # 1| {...} #-----| -> {...} @@ -1105,6 +1552,25 @@ try.ps1: #-----| -> try {...} # 2| {...} +#-----| -> Write-Output + +# 3| Write-Output +#-----| -> Hello! + +# 3| Write-Output +#-----| -> return ... + +# 3| Hello! +#-----| -> Write-Output + +# 7| return ... +#-----| -> 1 + +# 7| 1 +#-----| -> exit {...} (normal) + +# 7| 1 +#-----| -> 1 # 10| test-try-with-throw-catch #-----| -> test-try-with-throw-catch-with-throw @@ -1112,6 +1578,11 @@ try.ps1: # 10| enter {...} #-----| -> {...} +# 10| exit {...} + +# 10| exit {...} (normal) +#-----| -> exit {...} + # 10| {...} #-----| -> {...} @@ -1140,16 +1611,31 @@ try.ps1: #-----| -> 42 # 13| 42 +#-----| -> return ... # 13| 42 #-----| -> 42 +# 18| return ... +#-----| -> 1 + +# 18| 1 +#-----| -> exit {...} (normal) + +# 18| 1 +#-----| -> 1 + # 21| test-try-with-throw-catch-with-throw #-----| -> test-try-with-throw-catch-with-rethrow # 21| enter {...} #-----| -> {...} +# 21| exit {...} + +# 21| exit {...} (normal) +#-----| -> exit {...} + # 21| {...} #-----| -> {...} @@ -1178,16 +1664,31 @@ try.ps1: #-----| -> 42 # 24| 42 +#-----| -> return ... # 24| 42 #-----| -> 42 +# 29| return ... +#-----| -> 1 + +# 29| 1 +#-----| -> exit {...} (normal) + +# 29| 1 +#-----| -> 1 + # 32| test-try-with-throw-catch-with-rethrow #-----| -> test-try-catch-specific-1 # 32| enter {...} #-----| -> {...} +# 32| exit {...} + +# 32| exit {...} (normal) +#-----| -> exit {...} + # 32| {...} #-----| -> {...} @@ -1216,16 +1717,31 @@ try.ps1: #-----| -> 42 # 35| 42 +#-----| -> return ... # 35| 42 #-----| -> 42 +# 40| return ... +#-----| -> 1 + +# 40| 1 +#-----| -> exit {...} (normal) + +# 40| 1 +#-----| -> 1 + # 43| test-try-catch-specific-1 #-----| -> test-try-catch-specific-1 # 43| enter {...} #-----| -> {...} +# 43| exit {...} + +# 43| exit {...} (normal) +#-----| -> exit {...} + # 43| {...} #-----| -> {...} @@ -1236,6 +1752,25 @@ try.ps1: #-----| -> try {...} # 44| {...} +#-----| -> Write-Output + +# 45| Write-Output +#-----| -> Hello! + +# 45| Write-Output +#-----| -> return ... + +# 45| Hello! +#-----| -> Write-Output + +# 49| return ... +#-----| -> 1 + +# 49| 1 +#-----| -> exit {...} (normal) + +# 49| 1 +#-----| -> 1 # 52| test-try-catch-specific-1 #-----| -> test-try-two-catch-specific-1 @@ -1243,6 +1778,11 @@ try.ps1: # 52| enter {...} #-----| -> {...} +# 52| exit {...} + +# 52| exit {...} (normal) +#-----| -> exit {...} + # 52| {...} #-----| -> {...} @@ -1253,6 +1793,25 @@ try.ps1: #-----| -> try {...} # 53| {...} +#-----| -> Write-Output + +# 54| Write-Output +#-----| -> Hello! + +# 54| Write-Output +#-----| -> return ... + +# 54| Hello! +#-----| -> Write-Output + +# 58| return ... +#-----| -> 1 + +# 58| 1 +#-----| -> exit {...} (normal) + +# 58| 1 +#-----| -> 1 # 61| test-try-two-catch-specific-1 #-----| -> test-try-catch-specific-2 @@ -1260,6 +1819,11 @@ try.ps1: # 61| enter {...} #-----| -> {...} +# 61| exit {...} + +# 61| exit {...} (normal) +#-----| -> exit {...} + # 61| {...} #-----| -> {...} @@ -1270,6 +1834,25 @@ try.ps1: #-----| -> try {...} # 62| {...} +#-----| -> Write-Output + +# 63| Write-Output +#-----| -> Hello! + +# 63| Write-Output +#-----| -> return ... + +# 63| Hello! +#-----| -> Write-Output + +# 69| return ... +#-----| -> 2 + +# 69| 2 +#-----| -> exit {...} (normal) + +# 69| 2 +#-----| -> 2 # 72| test-try-catch-specific-2 #-----| -> test-try-two-catch-specific-2 @@ -1277,6 +1860,11 @@ try.ps1: # 72| enter {...} #-----| -> {...} +# 72| exit {...} + +# 72| exit {...} (normal) +#-----| -> exit {...} + # 72| {...} #-----| -> {...} @@ -1287,6 +1875,25 @@ try.ps1: #-----| -> try {...} # 73| {...} +#-----| -> Write-Output + +# 74| Write-Output +#-----| -> Hello! + +# 74| Write-Output +#-----| -> return ... + +# 74| Hello! +#-----| -> Write-Output + +# 78| return ... +#-----| -> 1 + +# 78| 1 +#-----| -> exit {...} (normal) + +# 78| 1 +#-----| -> 1 # 81| test-try-two-catch-specific-2 #-----| -> test-try-three-catch-specific-2 @@ -1294,6 +1901,11 @@ try.ps1: # 81| enter {...} #-----| -> {...} +# 81| exit {...} + +# 81| exit {...} (normal) +#-----| -> exit {...} + # 81| {...} #-----| -> {...} @@ -1304,6 +1916,25 @@ try.ps1: #-----| -> try {...} # 82| {...} +#-----| -> Write-Output + +# 83| Write-Output +#-----| -> Hello! + +# 83| Write-Output +#-----| -> return ... + +# 83| Hello! +#-----| -> Write-Output + +# 89| return ... +#-----| -> 2 + +# 89| 2 +#-----| -> exit {...} (normal) + +# 89| 2 +#-----| -> 2 # 92| test-try-three-catch-specific-2 #-----| -> test-try-catch-finally @@ -1311,6 +1942,11 @@ try.ps1: # 92| enter {...} #-----| -> {...} +# 92| exit {...} + +# 92| exit {...} (normal) +#-----| -> exit {...} + # 92| {...} #-----| -> {...} @@ -1321,6 +1957,25 @@ try.ps1: #-----| -> try {...} # 93| {...} +#-----| -> Write-Output + +# 94| Write-Output +#-----| -> Hello! + +# 94| Write-Output +#-----| -> return ... + +# 94| Hello! +#-----| -> Write-Output + +# 102| return ... +#-----| -> 3 + +# 102| 3 +#-----| -> exit {...} (normal) + +# 102| 3 +#-----| -> 3 # 105| test-try-catch-finally #-----| -> test-try-finally @@ -1328,6 +1983,11 @@ try.ps1: # 105| enter {...} #-----| -> {...} +# 105| exit {...} + +# 105| exit {...} (normal) +#-----| -> exit {...} + # 105| {...} #-----| -> {...} @@ -1338,6 +1998,37 @@ try.ps1: #-----| -> try {...} # 106| {...} +#-----| -> Write-Output + +# 107| Write-Output +#-----| -> Hello! + +# 107| Write-Output +#-----| -> {...} + +# 107| Hello! +#-----| -> Write-Output + +# 110| {...} +#-----| -> Write-Output + +# 111| Write-Output +#-----| -> Finally! + +# 111| Write-Output +#-----| -> return ... + +# 111| Finally! +#-----| -> Write-Output + +# 113| return ... +#-----| -> 1 + +# 113| 1 +#-----| -> exit {...} (normal) + +# 113| 1 +#-----| -> 1 # 116| test-try-finally #-----| -> test-try-finally-catch-specific-1 @@ -1345,6 +2036,11 @@ try.ps1: # 116| enter {...} #-----| -> {...} +# 116| exit {...} + +# 116| exit {...} (normal) +#-----| -> exit {...} + # 116| {...} #-----| -> {...} @@ -1355,6 +2051,37 @@ try.ps1: #-----| -> try {...} # 117| {...} +#-----| -> Write-Output + +# 118| Write-Output +#-----| -> Hello! + +# 118| Write-Output +#-----| -> {...} + +# 118| Hello! +#-----| -> Write-Output + +# 119| {...} +#-----| -> Write-Output + +# 120| Write-Output +#-----| -> Finally! + +# 120| Write-Output +#-----| -> return ... + +# 120| Finally! +#-----| -> Write-Output + +# 122| return ... +#-----| -> 1 + +# 122| 1 +#-----| -> exit {...} (normal) + +# 122| 1 +#-----| -> 1 # 125| test-try-finally-catch-specific-1 #-----| -> test-nested-try-inner-finally @@ -1362,6 +2089,11 @@ try.ps1: # 125| enter {...} #-----| -> {...} +# 125| exit {...} + +# 125| exit {...} (normal) +#-----| -> exit {...} + # 125| {...} #-----| -> {...} @@ -1372,6 +2104,37 @@ try.ps1: #-----| -> try {...} # 126| {...} +#-----| -> Write-Output + +# 127| Write-Output +#-----| -> Hello! + +# 127| Write-Output +#-----| -> {...} + +# 127| Hello! +#-----| -> Write-Output + +# 130| {...} +#-----| -> Write-Output + +# 131| Write-Output +#-----| -> Finally! + +# 131| Write-Output +#-----| -> return ... + +# 131| Finally! +#-----| -> Write-Output + +# 133| return ... +#-----| -> 1 + +# 133| 1 +#-----| -> exit {...} (normal) + +# 133| 1 +#-----| -> 1 # 136| test-nested-try-inner-finally #-----| -> test-nested-try-inner-finally @@ -1379,6 +2142,11 @@ try.ps1: # 136| enter {...} #-----| -> {...} +# 136| exit {...} + +# 136| exit {...} (normal) +#-----| -> exit {...} + # 136| {...} #-----| -> {...} @@ -1395,6 +2163,25 @@ try.ps1: #-----| -> {...} # 138| {...} +#-----| -> Write-Output + +# 139| Write-Output +#-----| -> Hello! + +# 139| Write-Output +#-----| -> return ... + +# 139| Hello! +#-----| -> Write-Output + +# 146| return ... +#-----| -> 1 + +# 146| 1 +#-----| -> exit {...} (normal) + +# 146| 1 +#-----| -> 1 # 149| test-nested-try-inner-finally #-----| -> test-nested-try-outer-finally @@ -1402,6 +2189,11 @@ try.ps1: # 149| enter {...} #-----| -> {...} +# 149| exit {...} + +# 149| exit {...} (normal) +#-----| -> exit {...} + # 149| {...} #-----| -> {...} @@ -1418,6 +2210,37 @@ try.ps1: #-----| -> {...} # 151| {...} +#-----| -> Write-Output + +# 152| Write-Output +#-----| -> Hello! + +# 152| Write-Output +#-----| -> {...} + +# 152| Hello! +#-----| -> Write-Output + +# 155| {...} +#-----| -> Write-Output + +# 156| Write-Output +#-----| -> Finally! + +# 156| Write-Output +#-----| -> return ... + +# 156| Finally! +#-----| -> Write-Output + +# 161| return ... +#-----| -> 1 + +# 161| 1 +#-----| -> exit {...} (normal) + +# 161| 1 +#-----| -> 1 # 164| test-nested-try-outer-finally #-----| -> test-nested-try-inner-outer-finally @@ -1425,6 +2248,11 @@ try.ps1: # 164| enter {...} #-----| -> {...} +# 164| exit {...} + +# 164| exit {...} (normal) +#-----| -> exit {...} + # 164| {...} #-----| -> {...} @@ -1441,6 +2269,37 @@ try.ps1: #-----| -> {...} # 166| {...} +#-----| -> Write-Output + +# 167| Write-Output +#-----| -> Hello! + +# 167| Write-Output +#-----| -> {...} + +# 167| Hello! +#-----| -> Write-Output + +# 173| {...} +#-----| -> Write-Output + +# 174| Write-Output +#-----| -> Finally! + +# 174| Write-Output +#-----| -> return ... + +# 174| Finally! +#-----| -> Write-Output + +# 176| return ... +#-----| -> 1 + +# 176| 1 +#-----| -> exit {...} (normal) + +# 176| 1 +#-----| -> 1 # 179| test-nested-try-inner-outer-finally #-----| -> exit try.ps1 (normal) @@ -1448,6 +2307,11 @@ try.ps1: # 179| enter {...} #-----| -> {...} +# 179| exit {...} + +# 179| exit {...} (normal) +#-----| -> exit {...} + # 179| {...} #-----| -> {...} @@ -1464,3 +2328,46 @@ try.ps1: #-----| -> {...} # 181| {...} +#-----| -> Write-Output + +# 182| Write-Output +#-----| -> Hello! + +# 182| Write-Output +#-----| -> {...} + +# 182| Hello! +#-----| -> Write-Output + +# 185| {...} +#-----| -> Write-Output + +# 186| Write-Output +#-----| -> Finally! + +# 186| Write-Output +#-----| -> {...} + +# 186| Finally! +#-----| -> Write-Output + +# 190| {...} +#-----| -> Write-Output + +# 191| Write-Output +#-----| -> Finally! + +# 191| Write-Output +#-----| -> return ... + +# 191| Finally! +#-----| -> Write-Output + +# 193| return ... +#-----| -> 1 + +# 193| 1 +#-----| -> exit {...} (normal) + +# 193| 1 +#-----| -> 1 diff --git a/powershell/ql/test/library-tests/dataflow/fields/test.expected b/powershell/ql/test/library-tests/dataflow/fields/test.expected index 4e4a41dfc62..a8284136deb 100644 --- a/powershell/ql/test/library-tests/dataflow/fields/test.expected +++ b/powershell/ql/test/library-tests/dataflow/fields/test.expected @@ -1,6 +1,14 @@ models edges +| test.ps1:1:1:1:3 | [post] a [f] | test.ps1:2:6:2:8 | a [f] | provenance | | +| test.ps1:1:8:1:18 | Source | test.ps1:1:1:1:3 | [post] a [f] | provenance | | +| test.ps1:2:6:2:8 | a [f] | test.ps1:2:6:2:10 | f | provenance | | nodes +| test.ps1:1:1:1:3 | [post] a [f] | semmle.label | [post] a [f] | +| test.ps1:1:8:1:18 | Source | semmle.label | Source | +| test.ps1:2:6:2:8 | a [f] | semmle.label | a [f] | +| test.ps1:2:6:2:10 | f | semmle.label | f | subpaths testFailures #select +| test.ps1:2:6:2:10 | f | test.ps1:1:8:1:18 | Source | test.ps1:2:6:2:10 | f | $@ | test.ps1:1:8:1:18 | Source | Source | diff --git a/powershell/ql/test/library-tests/dataflow/fields/test.ps1 b/powershell/ql/test/library-tests/dataflow/fields/test.ps1 index 9b8ae54dec8..a1e6277d3de 100644 --- a/powershell/ql/test/library-tests/dataflow/fields/test.ps1 +++ b/powershell/ql/test/library-tests/dataflow/fields/test.ps1 @@ -1,5 +1,5 @@ $a.f = Source "1" -Sink $a.f # $ MISSING: hasValueFlow=1 +Sink $a.f # $ hasValueFlow=1 $a.f = Source "2" $a.f = 0 diff --git a/powershell/ql/test/library-tests/dataflow/local/test.expected b/powershell/ql/test/library-tests/dataflow/local/test.expected index e69de29bb2d..0c2aa44c49b 100644 --- a/powershell/ql/test/library-tests/dataflow/local/test.expected +++ b/powershell/ql/test/library-tests/dataflow/local/test.expected @@ -0,0 +1,9 @@ +| test.ps1:1:1:1:4 | a1 | test.ps1:2:6:2:9 | a1 | +| test.ps1:1:7:1:13 | Source | test.ps1:1:1:1:4 | a1 | +| test.ps1:1:7:1:13 | Source | test.ps1:1:1:1:13 | ...=... | +| test.ps1:4:1:4:3 | b | test.ps1:5:4:5:6 | b | +| test.ps1:4:6:4:13 | GetBool | test.ps1:4:1:4:3 | b | +| test.ps1:4:6:4:13 | GetBool | test.ps1:4:1:4:13 | ...=... | +| test.ps1:6:5:6:8 | a2 | test.ps1:8:6:8:9 | a2 | +| test.ps1:6:11:6:17 | Source | test.ps1:6:5:6:8 | a2 | +| test.ps1:6:11:6:17 | Source | test.ps1:6:5:6:17 | ...=... | diff --git a/powershell/ql/test/library-tests/dataflow/params/test.expected b/powershell/ql/test/library-tests/dataflow/params/test.expected index 4e4a41dfc62..aa6496a147f 100644 --- a/powershell/ql/test/library-tests/dataflow/params/test.expected +++ b/powershell/ql/test/library-tests/dataflow/params/test.expected @@ -1,6 +1,227 @@ models edges +| test.ps1:1:14:1:16 | a | test.ps1:2:10:2:12 | a | provenance | | +| test.ps1:5:6:5:16 | Source | test.ps1:6:5:6:7 | x | provenance | | +| test.ps1:6:5:6:7 | x | test.ps1:1:14:1:16 | a | provenance | | +| test.ps1:8:20:8:22 | x | test.ps1:9:10:9:12 | x | provenance | | +| test.ps1:8:24:8:26 | y | test.ps1:10:10:10:12 | y | provenance | | +| test.ps1:8:28:8:30 | z | test.ps1:11:10:11:12 | z | provenance | | +| test.ps1:14:10:14:20 | Source | test.ps1:18:11:18:17 | first | provenance | | +| test.ps1:14:10:14:20 | Source | test.ps1:19:22:19:28 | first | provenance | | +| test.ps1:14:10:14:20 | Source | test.ps1:20:14:20:20 | first | provenance | | +| test.ps1:14:10:14:20 | Source | test.ps1:21:11:21:17 | first | provenance | | +| test.ps1:14:10:14:20 | Source | test.ps1:22:22:22:28 | first | provenance | | +| test.ps1:14:10:14:20 | Source | test.ps1:23:22:23:28 | first | provenance | | +| test.ps1:14:10:14:20 | Source | test.ps1:24:14:24:20 | first | provenance | | +| test.ps1:14:10:14:20 | Source | test.ps1:25:11:25:17 | first | provenance | | +| test.ps1:14:10:14:20 | Source | test.ps1:26:22:26:28 | first | provenance | | +| test.ps1:14:10:14:20 | Source | test.ps1:27:22:27:28 | first | provenance | | +| test.ps1:14:10:14:20 | Source | test.ps1:28:14:28:20 | first | provenance | | +| test.ps1:14:10:14:20 | Source | test.ps1:29:11:29:17 | first | provenance | | +| test.ps1:14:10:14:20 | Source | test.ps1:30:32:30:38 | first | provenance | | +| test.ps1:14:10:14:20 | Source | test.ps1:31:32:31:38 | first | provenance | | +| test.ps1:14:10:14:20 | Source | test.ps1:32:14:32:20 | first | provenance | | +| test.ps1:14:10:14:20 | Source | test.ps1:33:11:33:17 | first | provenance | | +| test.ps1:14:10:14:20 | Source | test.ps1:34:32:34:38 | first | provenance | | +| test.ps1:14:10:14:20 | Source | test.ps1:35:32:35:38 | first | provenance | | +| test.ps1:14:10:14:20 | Source | test.ps1:36:32:36:38 | first | provenance | | +| test.ps1:14:10:14:20 | Source | test.ps1:37:24:37:30 | first | provenance | | +| test.ps1:14:10:14:20 | Source | test.ps1:38:21:38:27 | first | provenance | | +| test.ps1:14:10:14:20 | Source | test.ps1:39:32:39:38 | first | provenance | | +| test.ps1:15:11:15:21 | Source | test.ps1:18:18:18:25 | second | provenance | | +| test.ps1:15:11:15:21 | Source | test.ps1:19:11:19:18 | second | provenance | | +| test.ps1:15:11:15:21 | Source | test.ps1:20:21:20:28 | second | provenance | | +| test.ps1:15:11:15:21 | Source | test.ps1:21:21:21:28 | second | provenance | | +| test.ps1:15:11:15:21 | Source | test.ps1:22:14:22:21 | second | provenance | | +| test.ps1:15:11:15:21 | Source | test.ps1:23:11:23:18 | second | provenance | | +| test.ps1:15:11:15:21 | Source | test.ps1:24:21:24:28 | second | provenance | | +| test.ps1:15:11:15:21 | Source | test.ps1:25:21:25:28 | second | provenance | | +| test.ps1:15:11:15:21 | Source | test.ps1:26:14:26:21 | second | provenance | | +| test.ps1:15:11:15:21 | Source | test.ps1:27:11:27:18 | second | provenance | | +| test.ps1:15:11:15:21 | Source | test.ps1:28:31:28:38 | second | provenance | | +| test.ps1:15:11:15:21 | Source | test.ps1:29:21:29:28 | second | provenance | | +| test.ps1:15:11:15:21 | Source | test.ps1:30:14:30:21 | second | provenance | | +| test.ps1:15:11:15:21 | Source | test.ps1:31:11:31:18 | second | provenance | | +| test.ps1:15:11:15:21 | Source | test.ps1:32:31:32:38 | second | provenance | | +| test.ps1:15:11:15:21 | Source | test.ps1:33:31:33:38 | second | provenance | | +| test.ps1:15:11:15:21 | Source | test.ps1:34:14:34:21 | second | provenance | | +| test.ps1:15:11:15:21 | Source | test.ps1:35:24:35:31 | second | provenance | | +| test.ps1:15:11:15:21 | Source | test.ps1:36:21:36:28 | second | provenance | | +| test.ps1:15:11:15:21 | Source | test.ps1:37:31:37:38 | second | provenance | | +| test.ps1:15:11:15:21 | Source | test.ps1:38:31:38:38 | second | provenance | | +| test.ps1:15:11:15:21 | Source | test.ps1:39:24:39:31 | second | provenance | | +| test.ps1:16:10:16:20 | Source | test.ps1:18:26:18:32 | third | provenance | | +| test.ps1:16:10:16:20 | Source | test.ps1:19:29:19:35 | third | provenance | | +| test.ps1:16:10:16:20 | Source | test.ps1:20:29:20:35 | third | provenance | | +| test.ps1:16:10:16:20 | Source | test.ps1:21:29:21:35 | third | provenance | | +| test.ps1:16:10:16:20 | Source | test.ps1:22:29:22:35 | third | provenance | | +| test.ps1:16:10:16:20 | Source | test.ps1:23:32:23:38 | third | provenance | | +| test.ps1:16:10:16:20 | Source | test.ps1:24:32:24:38 | third | provenance | | +| test.ps1:16:10:16:20 | Source | test.ps1:25:32:25:38 | third | provenance | | +| test.ps1:16:10:16:20 | Source | test.ps1:26:32:26:38 | third | provenance | | +| test.ps1:16:10:16:20 | Source | test.ps1:27:32:27:38 | third | provenance | | +| test.ps1:16:10:16:20 | Source | test.ps1:28:24:28:30 | third | provenance | | +| test.ps1:16:10:16:20 | Source | test.ps1:29:32:29:38 | third | provenance | | +| test.ps1:16:10:16:20 | Source | test.ps1:30:25:30:31 | third | provenance | | +| test.ps1:16:10:16:20 | Source | test.ps1:31:22:31:28 | third | provenance | | +| test.ps1:16:10:16:20 | Source | test.ps1:32:24:32:30 | third | provenance | | +| test.ps1:16:10:16:20 | Source | test.ps1:33:21:33:27 | third | provenance | | +| test.ps1:16:10:16:20 | Source | test.ps1:34:25:34:31 | third | provenance | | +| test.ps1:16:10:16:20 | Source | test.ps1:35:14:35:20 | third | provenance | | +| test.ps1:16:10:16:20 | Source | test.ps1:36:14:36:20 | third | provenance | | +| test.ps1:16:10:16:20 | Source | test.ps1:37:14:37:20 | third | provenance | | +| test.ps1:16:10:16:20 | Source | test.ps1:38:14:38:20 | third | provenance | | +| test.ps1:16:10:16:20 | Source | test.ps1:39:14:39:20 | third | provenance | | +| test.ps1:18:11:18:17 | first | test.ps1:8:20:8:22 | x | provenance | | +| test.ps1:18:18:18:25 | second | test.ps1:8:24:8:26 | y | provenance | | +| test.ps1:18:26:18:32 | third | test.ps1:8:28:8:30 | z | provenance | | +| test.ps1:19:11:19:18 | second | test.ps1:8:24:8:26 | y | provenance | | +| test.ps1:19:22:19:28 | first | test.ps1:8:20:8:22 | x | provenance | | +| test.ps1:19:29:19:35 | third | test.ps1:8:28:8:30 | z | provenance | | +| test.ps1:20:14:20:20 | first | test.ps1:8:20:8:22 | x | provenance | | +| test.ps1:20:21:20:28 | second | test.ps1:8:24:8:26 | y | provenance | | +| test.ps1:20:29:20:35 | third | test.ps1:8:28:8:30 | z | provenance | | +| test.ps1:21:11:21:17 | first | test.ps1:8:20:8:22 | x | provenance | | +| test.ps1:21:21:21:28 | second | test.ps1:8:24:8:26 | y | provenance | | +| test.ps1:21:29:21:35 | third | test.ps1:8:28:8:30 | z | provenance | | +| test.ps1:22:14:22:21 | second | test.ps1:8:24:8:26 | y | provenance | | +| test.ps1:22:22:22:28 | first | test.ps1:8:20:8:22 | x | provenance | | +| test.ps1:22:29:22:35 | third | test.ps1:8:28:8:30 | z | provenance | | +| test.ps1:23:11:23:18 | second | test.ps1:8:24:8:26 | y | provenance | | +| test.ps1:23:22:23:28 | first | test.ps1:8:20:8:22 | x | provenance | | +| test.ps1:23:32:23:38 | third | test.ps1:8:28:8:30 | z | provenance | | +| test.ps1:24:14:24:20 | first | test.ps1:8:20:8:22 | x | provenance | | +| test.ps1:24:21:24:28 | second | test.ps1:8:24:8:26 | y | provenance | | +| test.ps1:24:32:24:38 | third | test.ps1:8:28:8:30 | z | provenance | | +| test.ps1:25:11:25:17 | first | test.ps1:8:20:8:22 | x | provenance | | +| test.ps1:25:21:25:28 | second | test.ps1:8:24:8:26 | y | provenance | | +| test.ps1:25:32:25:38 | third | test.ps1:8:28:8:30 | z | provenance | | +| test.ps1:26:14:26:21 | second | test.ps1:8:24:8:26 | y | provenance | | +| test.ps1:26:22:26:28 | first | test.ps1:8:20:8:22 | x | provenance | | +| test.ps1:26:32:26:38 | third | test.ps1:8:28:8:30 | z | provenance | | +| test.ps1:27:11:27:18 | second | test.ps1:8:24:8:26 | y | provenance | | +| test.ps1:27:22:27:28 | first | test.ps1:8:20:8:22 | x | provenance | | +| test.ps1:27:32:27:38 | third | test.ps1:8:28:8:30 | z | provenance | | +| test.ps1:28:14:28:20 | first | test.ps1:8:20:8:22 | x | provenance | | +| test.ps1:28:24:28:30 | third | test.ps1:8:28:8:30 | z | provenance | | +| test.ps1:28:31:28:38 | second | test.ps1:8:24:8:26 | y | provenance | | +| test.ps1:29:11:29:17 | first | test.ps1:8:20:8:22 | x | provenance | | +| test.ps1:29:21:29:28 | second | test.ps1:8:24:8:26 | y | provenance | | +| test.ps1:29:32:29:38 | third | test.ps1:8:28:8:30 | z | provenance | | +| test.ps1:30:14:30:21 | second | test.ps1:8:24:8:26 | y | provenance | | +| test.ps1:30:25:30:31 | third | test.ps1:8:28:8:30 | z | provenance | | +| test.ps1:30:32:30:38 | first | test.ps1:8:20:8:22 | x | provenance | | +| test.ps1:31:11:31:18 | second | test.ps1:8:24:8:26 | y | provenance | | +| test.ps1:31:22:31:28 | third | test.ps1:8:28:8:30 | z | provenance | | +| test.ps1:31:32:31:38 | first | test.ps1:8:20:8:22 | x | provenance | | +| test.ps1:32:14:32:20 | first | test.ps1:8:20:8:22 | x | provenance | | +| test.ps1:32:24:32:30 | third | test.ps1:8:28:8:30 | z | provenance | | +| test.ps1:32:31:32:38 | second | test.ps1:8:24:8:26 | y | provenance | | +| test.ps1:33:11:33:17 | first | test.ps1:8:20:8:22 | x | provenance | | +| test.ps1:33:21:33:27 | third | test.ps1:8:28:8:30 | z | provenance | | +| test.ps1:33:31:33:38 | second | test.ps1:8:24:8:26 | y | provenance | | +| test.ps1:34:14:34:21 | second | test.ps1:8:24:8:26 | y | provenance | | +| test.ps1:34:25:34:31 | third | test.ps1:8:28:8:30 | z | provenance | | +| test.ps1:34:32:34:38 | first | test.ps1:8:20:8:22 | x | provenance | | +| test.ps1:35:14:35:20 | third | test.ps1:8:28:8:30 | z | provenance | | +| test.ps1:35:24:35:31 | second | test.ps1:8:24:8:26 | y | provenance | | +| test.ps1:35:32:35:38 | first | test.ps1:8:20:8:22 | x | provenance | | +| test.ps1:36:14:36:20 | third | test.ps1:8:28:8:30 | z | provenance | | +| test.ps1:36:21:36:28 | second | test.ps1:8:24:8:26 | y | provenance | | +| test.ps1:36:32:36:38 | first | test.ps1:8:20:8:22 | x | provenance | | +| test.ps1:37:14:37:20 | third | test.ps1:8:28:8:30 | z | provenance | | +| test.ps1:37:24:37:30 | first | test.ps1:8:20:8:22 | x | provenance | | +| test.ps1:37:31:37:38 | second | test.ps1:8:24:8:26 | y | provenance | | +| test.ps1:38:14:38:20 | third | test.ps1:8:28:8:30 | z | provenance | | +| test.ps1:38:21:38:27 | first | test.ps1:8:20:8:22 | x | provenance | | +| test.ps1:38:31:38:38 | second | test.ps1:8:24:8:26 | y | provenance | | +| test.ps1:39:14:39:20 | third | test.ps1:8:28:8:30 | z | provenance | | +| test.ps1:39:24:39:31 | second | test.ps1:8:24:8:26 | y | provenance | | +| test.ps1:39:32:39:38 | first | test.ps1:8:20:8:22 | x | provenance | | nodes +| test.ps1:1:14:1:16 | a | semmle.label | a | +| test.ps1:2:10:2:12 | a | semmle.label | a | +| test.ps1:5:6:5:16 | Source | semmle.label | Source | +| test.ps1:6:5:6:7 | x | semmle.label | x | +| test.ps1:8:20:8:22 | x | semmle.label | x | +| test.ps1:8:24:8:26 | y | semmle.label | y | +| test.ps1:8:28:8:30 | z | semmle.label | z | +| test.ps1:9:10:9:12 | x | semmle.label | x | +| test.ps1:10:10:10:12 | y | semmle.label | y | +| test.ps1:11:10:11:12 | z | semmle.label | z | +| test.ps1:14:10:14:20 | Source | semmle.label | Source | +| test.ps1:15:11:15:21 | Source | semmle.label | Source | +| test.ps1:16:10:16:20 | Source | semmle.label | Source | +| test.ps1:18:11:18:17 | first | semmle.label | first | +| test.ps1:18:18:18:25 | second | semmle.label | second | +| test.ps1:18:26:18:32 | third | semmle.label | third | +| test.ps1:19:11:19:18 | second | semmle.label | second | +| test.ps1:19:22:19:28 | first | semmle.label | first | +| test.ps1:19:29:19:35 | third | semmle.label | third | +| test.ps1:20:14:20:20 | first | semmle.label | first | +| test.ps1:20:21:20:28 | second | semmle.label | second | +| test.ps1:20:29:20:35 | third | semmle.label | third | +| test.ps1:21:11:21:17 | first | semmle.label | first | +| test.ps1:21:21:21:28 | second | semmle.label | second | +| test.ps1:21:29:21:35 | third | semmle.label | third | +| test.ps1:22:14:22:21 | second | semmle.label | second | +| test.ps1:22:22:22:28 | first | semmle.label | first | +| test.ps1:22:29:22:35 | third | semmle.label | third | +| test.ps1:23:11:23:18 | second | semmle.label | second | +| test.ps1:23:22:23:28 | first | semmle.label | first | +| test.ps1:23:32:23:38 | third | semmle.label | third | +| test.ps1:24:14:24:20 | first | semmle.label | first | +| test.ps1:24:21:24:28 | second | semmle.label | second | +| test.ps1:24:32:24:38 | third | semmle.label | third | +| test.ps1:25:11:25:17 | first | semmle.label | first | +| test.ps1:25:21:25:28 | second | semmle.label | second | +| test.ps1:25:32:25:38 | third | semmle.label | third | +| test.ps1:26:14:26:21 | second | semmle.label | second | +| test.ps1:26:22:26:28 | first | semmle.label | first | +| test.ps1:26:32:26:38 | third | semmle.label | third | +| test.ps1:27:11:27:18 | second | semmle.label | second | +| test.ps1:27:22:27:28 | first | semmle.label | first | +| test.ps1:27:32:27:38 | third | semmle.label | third | +| test.ps1:28:14:28:20 | first | semmle.label | first | +| test.ps1:28:24:28:30 | third | semmle.label | third | +| test.ps1:28:31:28:38 | second | semmle.label | second | +| test.ps1:29:11:29:17 | first | semmle.label | first | +| test.ps1:29:21:29:28 | second | semmle.label | second | +| test.ps1:29:32:29:38 | third | semmle.label | third | +| test.ps1:30:14:30:21 | second | semmle.label | second | +| test.ps1:30:25:30:31 | third | semmle.label | third | +| test.ps1:30:32:30:38 | first | semmle.label | first | +| test.ps1:31:11:31:18 | second | semmle.label | second | +| test.ps1:31:22:31:28 | third | semmle.label | third | +| test.ps1:31:32:31:38 | first | semmle.label | first | +| test.ps1:32:14:32:20 | first | semmle.label | first | +| test.ps1:32:24:32:30 | third | semmle.label | third | +| test.ps1:32:31:32:38 | second | semmle.label | second | +| test.ps1:33:11:33:17 | first | semmle.label | first | +| test.ps1:33:21:33:27 | third | semmle.label | third | +| test.ps1:33:31:33:38 | second | semmle.label | second | +| test.ps1:34:14:34:21 | second | semmle.label | second | +| test.ps1:34:25:34:31 | third | semmle.label | third | +| test.ps1:34:32:34:38 | first | semmle.label | first | +| test.ps1:35:14:35:20 | third | semmle.label | third | +| test.ps1:35:24:35:31 | second | semmle.label | second | +| test.ps1:35:32:35:38 | first | semmle.label | first | +| test.ps1:36:14:36:20 | third | semmle.label | third | +| test.ps1:36:21:36:28 | second | semmle.label | second | +| test.ps1:36:32:36:38 | first | semmle.label | first | +| test.ps1:37:14:37:20 | third | semmle.label | third | +| test.ps1:37:24:37:30 | first | semmle.label | first | +| test.ps1:37:31:37:38 | second | semmle.label | second | +| test.ps1:38:14:38:20 | third | semmle.label | third | +| test.ps1:38:21:38:27 | first | semmle.label | first | +| test.ps1:38:31:38:38 | second | semmle.label | second | +| test.ps1:39:14:39:20 | third | semmle.label | third | +| test.ps1:39:24:39:31 | second | semmle.label | second | +| test.ps1:39:32:39:38 | first | semmle.label | first | subpaths testFailures #select +| test.ps1:2:10:2:12 | a | test.ps1:5:6:5:16 | Source | test.ps1:2:10:2:12 | a | $@ | test.ps1:5:6:5:16 | Source | Source | +| test.ps1:9:10:9:12 | x | test.ps1:14:10:14:20 | Source | test.ps1:9:10:9:12 | x | $@ | test.ps1:14:10:14:20 | Source | Source | +| test.ps1:10:10:10:12 | y | test.ps1:15:11:15:21 | Source | test.ps1:10:10:10:12 | y | $@ | test.ps1:15:11:15:21 | Source | Source | +| test.ps1:11:10:11:12 | z | test.ps1:16:10:16:20 | Source | test.ps1:11:10:11:12 | z | $@ | test.ps1:16:10:16:20 | Source | Source | diff --git a/powershell/ql/test/library-tests/dataflow/params/test.ps1 b/powershell/ql/test/library-tests/dataflow/params/test.ps1 index c217580d723..767baec466e 100644 --- a/powershell/ql/test/library-tests/dataflow/params/test.ps1 +++ b/powershell/ql/test/library-tests/dataflow/params/test.ps1 @@ -1,14 +1,14 @@ function Foo($a) { - Sink $a # $ MISSING: hasValueFlow=1 + Sink $a # $ hasValueFlow=1 } $x = Source "1" Foo $x function ThreeArgs($x, $y, $z) { - Sink $x # $ MISSING: hasValueFlow=x - Sink $y # $ MISSING: hasValueFlow=y - Sink $z # $ MISSING: hasValueFlow=z + Sink $x # $ hasValueFlow=x + Sink $y # $ hasValueFlow=y + Sink $z # $ hasValueFlow=z } $first = Source "x" diff --git a/powershell/ql/test/library-tests/ssa/ssa.expected b/powershell/ql/test/library-tests/ssa/ssa.expected index 502bf79ccb5..3dc5c8e4c07 100644 --- a/powershell/ql/test/library-tests/ssa/ssa.expected +++ b/powershell/ql/test/library-tests/ssa/ssa.expected @@ -1,2 +1,7 @@ | explicit.ps1:1:1:8:2 | glob_a | explicit.ps1:2:11:2:18 | glob_a | | explicit.ps1:5:5:5:7 | a | explicit.ps1:5:5:5:7 | a | +| explicit.ps1:6:5:6:7 | b | explicit.ps1:6:5:6:7 | b | +| parameters.ps1:1:25:1:33 | n1 | parameters.ps1:1:25:1:33 | n1 | +| parameters.ps1:1:35:1:43 | n2 | parameters.ps1:1:35:1:43 | n2 | +| parameters.ps1:7:9:7:16 | a | parameters.ps1:7:9:7:16 | a | +| parameters.ps1:8:9:8:16 | b | parameters.ps1:8:9:8:16 | b |