Could you also add a test case ? See tests that invoke ‘c-index-test -write-pch …’, this calls clang_saveTranslationUnit. Other than that LGTM, thank you! http://reviews.llvm.org/D4239