<div dir="ltr"><div>Is ther</div><div><br></div><div>TranslationUnitDecl 0x8d7090 << invalid sloc >> <invalid sloc><br>| -TypedefDecl 0x8d7360 << invalid sloc >> <invalid sloc> implicit __builtin_va_list 'char *'<br>| -EnumDecl 0x8d7390 < a.h:1 : 9, line : 6 : 1 > line:1 : 9<br>| | -EnumConstantDecl 0x8d7420 < line : 2 : 3, col : 22 > col : 3 None 'int'<br>| | `-IntegerLiteral 0x8d7400 < col:22 > 'int' 0<br>| | -EnumConstantDecl 0x8d7480 < line:3 : 3, col : 53 > col:3 referenced TIP 'int'<br>| | `-IntegerLiteral 0x8d7458 < col:53 > 'int' 1<br>| | -EnumConstantDecl 0x8d74e0 < line:4 : 3, col : 52 > col:3 referenced TIE 'int'<br>| | `-IntegerLiteral 0x8d74b8 < col:52 > 'int' 2<br>| `-EnumConstantDecl 0x8d7560 < line:5 : 3, col : 98 > col:3 TAA 'int'<br>| `-BinaryOperator 0x8d7548 < col:48, col : 98 > 'int' '|'<br>| | -DeclRefExpr 0x8d7518 < col:48 > 'int' EnumConstant 0x8d7480 'TIP' 'int'<br>| `-DeclRefExpr 0x8d7530 < col:98 > 'int' EnumConstant 0x8d74e0 'TIP' 'int'<br>`-TypedefDecl 0x8d75d0 < line:1 : 1, line : 6 : 3 > col:3 N 'enum None' : 'NFlags'<br>;</div><div><br></div><div>In this AST ... I discover EnumDecl first, then I see TypeDecl ... is there a way to visit a sibling, given a cursor? I have the EnumDecl cursor, and I want to find its sibling, but visitchildren gives me its children.</div><div><br></div><div>I have a not-so-good solution that keeps track of the cursors, but I was hoping if there is another way of doing it.<br></div></div>