Parse a file without main function

Hi all,

I have just started using clang. And i was wondering is it possible to parse a file (to construct AST,CFG) without a main function. I am having this doubt because, the parseAST function
has a statment p.EnterMainSourceFile() and this will parse the file which has a main function. I need to parse any C file with just function and not main.

Thanks & Regards
Manavender

The main source file is the "top level" file being compiled, i.e. the file that includes all the other files in the translation unit. It has nothing to do with whether the file contains a declaration of a function called 'main'.

John.