llvm-project/clang/tools/c-index-test
Dmitri Gribenko ea4d1c32fb libclang: report error code for bad PCH files
This commit improves libclang to report the error condition when
CXTranslationUnit can not be created because of a stale PCH file.  This allows
the caller, for example, to rebuild the PCH file and retry the request.

There two are APIs in libclang that return a CXTranslationUnit and don't
support reporting detailed errors (the only error condition is a NULL result).
For these APIs, a second, superior, version is introduced --
clang_createTranslationUnit2 and clang_parseTranslationUnit2.  These functions
return a CXTranslationUnit indirectly and also return an error code.  Old
functions are still supported and are nothing more than convenience wrappers
that ignore extended error codes.

As a cleanup, this commit also categorizes some libclang errors in the
functions I had to modify anyway.

llvm-svn: 201249
2014-02-12 19:12:37 +00:00
..
CMakeLists.txt Use -std=gnu89 in tools/c-index-test/CMakeLists.txt 2014-01-08 11:44:42 +00:00
Makefile {c-index-test|c-arcmt-test}/Makefile: Update USEDLIBS along corresponding to clangIndex. 2013-08-18 03:48:57 +00:00
c-index-test.c libclang: report error code for bad PCH files 2014-02-12 19:12:37 +00:00