I try to transform some objective-c-code to Java. For this,
i subclassed the RecursiveASTVisitor, visit the decls/
statements and transform them.
To see the structure of the code as clang it sees, i first
print every declaration and statement with their
corresponding sourcerange. Thus, i can see that a "normal"
function-declaration (FunctionDecl), that is located somewhere
between the objective-c code, will be not visited until all
the other objective-c-method-declarations (ObjCMethodDecl)
have been visited - effectively it seems as clang jumps back
inside the sourcecode.
Is this the wanted behavior and when yes, why?