Empty function declaration when parsing Linux kernel code

Hi All,

When i ParseAST Linux’s mmap.c (for instance) i get that several of the functions don’t have a body even though they are defined inside that file. For instance when i try to dump() the vma_adjust function:

void vma_adjust(struct vm_area_struct *vma, unsigned long start,unsigned long end, pgoff_t pgoff, struct vm_area_struct *insert)

i get this weird thing:

int vma_adjust()

And getBody() return null.

It seems the entire FunctionDecl got lost or something. I haven’t quite figured out what’s in common for all these lost functions nor why does this happen.

Any ideas?

Much obliged.

Are you sure that you're not seeing a forward definition for that function?

For example, you should see both decls in:
int foo();
int foo(int x) {}


No no, the function is entirely in that code file and there is no forward declaration.