Strategy for checking validity of PCH

Hello List,

I'm using libclang and passing `-include-pch <pch-file>' to
clang_parseTranslationUnit, however whenever changes have been made that
affect the PCH file the parsing fails.

How can one know the parsing failed because the PCH isn't valid anymore
and needs to be rebuilt?