Skip to content

Commit 67ba2ad

Browse files
committed
Do not dump cursor definitions
This can lead to infinite loops with forward declarations and blow the stack.
1 parent 42b721d commit 67ba2ad

File tree

1 file changed

+0
-7
lines changed

1 file changed

+0
-7
lines changed

src/clang.rs

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1316,13 +1316,6 @@ pub fn ast_dump(c: &Cursor, depth: isize) -> CXChildVisitResult {
13161316
print_indent(depth, format!(" {}typedef-type = {}", prefix, type_to_str(ty.kind())));
13171317
}
13181318

1319-
if let Some(def) = c.definition() {
1320-
if def != *c {
1321-
println!();
1322-
print_cursor(depth, String::from(prefix) + "definition.", &def);
1323-
}
1324-
}
1325-
13261319
if let Some(refd) = c.referenced() {
13271320
if refd != *c {
13281321
println!();

0 commit comments

Comments
 (0)