*/
CINDEX_LINKAGE CXString clang_getClangVersion();
+
+/**
+ * \brief Enable/disable crash recovery.
+ *
+ * \param Flag to indicate if crash recovery is enabled. A non-zero value
+ * enables crash recovery, while 0 disables it.
+ */
+CINDEX_LINKAGE void clang_toggleCrashRecovery(unsigned isEnabled);
+
/**
* \brief Visitor invoked for each file in a translation unit
* (used with clang_getInclusions()).
delete static_cast<CIndexer *>(CIdx);
}
+void clang_toggleCrashRecovery(unsigned isEnabled) {
+ if (isEnabled)
+ llvm::CrashRecoveryContext::Enable();
+ else
+ llvm::CrashRecoveryContext::Disable();
+}
+
CXTranslationUnit clang_createTranslationUnit(CXIndex CIdx,
const char *ast_filename) {
if (!CIdx)
_clang_getTypeDeclaration
_clang_getTypeKindSpelling
_clang_hashCursor
-_clang_isCursorDefinition
_clang_isConstQualifiedType
+_clang_isCursorDefinition
_clang_isDeclaration
_clang_isExpression
_clang_isInvalid
_clang_reparseTranslationUnit
_clang_saveTranslationUnit
_clang_sortCodeCompletionResults
+_clang_toggleCrashRecovery
_clang_tokenize
_clang_visitChildren
_clang_visitChildrenWithBlock
clang_reparseTranslationUnit
clang_saveTranslationUnit
clang_sortCodeCompletionResults
+clang_toggleCrashRecovery
clang_tokenize
clang_visitChildren
clang_visitChildrenWithBlock