This seems like a more natural order for these actions to me. Can you add a test? (Install a preprocessing callback and check that its EndOfMainFile action is called before the FrontendAction's EndSourceFileAction) http://reviews.llvm.org/D4773