creating a clang AST

Hi all. i have just joined this list and I have a question about clang / LLVM and ASTs.
Can I create an AST for a particular source file in memory as opposed to using clang —dump-ast foo.cpp?

Cheers
FamilyHistorian

Yep: http://clang.llvm.org/docs/LibTooling.html