Exclude files with build constraints from the cfg test

This commit is contained in:
Sauyon Lee
2021-08-18 04:28:02 -07:00
parent 5fbed2b219
commit 630e46e1fd
2 changed files with 2 additions and 4 deletions

View File

@@ -508,10 +508,6 @@ edges
| hello.go:8:2:8:12 | selection of Println | hello.go:8:14:8:20 | message |
| hello.go:8:2:8:21 | call to Println | hello.go:9:1:9:1 | exit |
| hello.go:8:14:8:20 | message | hello.go:8:2:8:21 | call to Println |
| linux.go:0:0:0:0 | entry | linux.go:5:7:5:11 | skip |
| linux.go:5:7:5:11 | assignment to linux | linux.go:0:0:0:0 | exit |
| linux.go:5:7:5:11 | skip | linux.go:5:15:5:18 | true |
| linux.go:5:15:5:18 | true | linux.go:5:7:5:11 | assignment to linux |
| main.go:0:0:0:0 | entry | main.go:3:1:6:1 | skip |
| main.go:3:1:6:1 | skip | main.go:8:6:8:9 | skip |
| main.go:8:1:8:1 | entry | main.go:9:9:9:20 | selection of Float64 |

View File

@@ -3,6 +3,8 @@ import go
query predicate nodes(ControlFlow::Node nd) { none() }
query predicate edges(ControlFlow::Node pred, ControlFlow::Node succ) {
not succ.getFile().hasBuildConstraints() and
not pred.getFile().hasBuildConstraints() and
succ = pred.getASuccessor()
}