clang_parseTranslationUnit2 from memory buffer

Is it possible to parse a file with libclang (clang_parseTranslationUnit2) from a memory buffer instead of having to keep the file on disk?

That would hugely increase speed (I have some buffers with cpp files into them and I’d like to avoid writing them to disk before parsing)