Skip to content

Commit d5638ac

Browse files
committed
wip
1 parent 55e3756 commit d5638ac

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

rust/ql/lib/codeql/rust/internal/PathResolution.qll

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -640,6 +640,12 @@ private predicate fileImportEdge(Module mod, string name, ItemNode item) {
640640
use.isPublic() and
641641
useImportEdge(use, name, item)
642642
)
643+
or
644+
// items made available through macro calls are available to nodes that contain the macro call
645+
exists(MacroCallItemNode call |
646+
sourceFileEdge(f, _, call) and
647+
item = call.getASuccessor(name)
648+
)
643649
)
644650
}
645651

@@ -912,6 +918,8 @@ private module Debug {
912918
private Locatable getRelevantLocatable() {
913919
exists(string filepath, int startline, int startcolumn, int endline, int endcolumn |
914920
result.getLocation().hasLocationInfo(filepath, startline, startcolumn, endline, endcolumn) and
921+
// filepath.matches("%/compile.rs") and
922+
// startline = 1986
915923
filepath.matches("%/build_steps/mod.rs") and
916924
startline = 17
917925
)

0 commit comments

Comments
 (0)