[libclang] Avoid crashing when getting layout info of an undeduced type.
When the type is not deducible, return an error instead of crashing.
This fixes https://bugs.llvm.org/show_bug.cgi?id=40813.
Differential Revision: https://reviews.llvm.org/D58569
llvm-svn: 354885
diff --git a/clang/include/clang-c/Index.h b/clang/include/clang-c/Index.h
index e6555fa..a5ef2d2 100644
--- a/clang/include/clang-c/Index.h
+++ b/clang/include/clang-c/Index.h
@@ -32,7 +32,7 @@
* compatible, thus CINDEX_VERSION_MAJOR is expected to remain stable.
*/
#define CINDEX_VERSION_MAJOR 0
-#define CINDEX_VERSION_MINOR 52
+#define CINDEX_VERSION_MINOR 53
#define CINDEX_VERSION_ENCODE(major, minor) ( \
((major) * 10000) \
@@ -3841,7 +3841,11 @@
/**
* The Field name is not valid for this record.
*/
- CXTypeLayoutError_InvalidFieldName = -5
+ CXTypeLayoutError_InvalidFieldName = -5,
+ /**
+ * The type is undeduced.
+ */
+ CXTypeLayoutError_Undeduced = -6
};
/**