summaryrefslogtreecommitdiffstats
path: root/clang/include/clang-c
diff options
context:
space:
mode:
authorIvan Donchevskii <yv.ivan@gmail.com>2019-04-29 13:44:07 +0000
committerIvan Donchevskii <yv.ivan@gmail.com>2019-04-29 13:44:07 +0000
commit50be573ed207baa477e209cf9e8b247ddd402bc5 (patch)
tree779ac3518b92a420bbe4a1c9cb3f015cef7ab6ba /clang/include/clang-c
parent5a33047022ca4b7863be05b4be75678d5c0a44ee (diff)
downloadbcm5719-llvm-50be573ed207baa477e209cf9e8b247ddd402bc5.tar.gz
bcm5719-llvm-50be573ed207baa477e209cf9e8b247ddd402bc5.zip
[libclang] Restore old clang_Cursor_isAnonymous behaviour
D54996 Changed the behaviour of clang_Cursor_isAnonymous, but there is no alternative available to get the old behaviour in some cases, which is essential for determining if a record is syntactically accessible, e.g. struct { int x; int y; } foo; struct { struct { int x; int y; }; } bar; void fun(struct { int x; int y; } *param); The only 'anonymous' struct here is the one nested in bar, since there is no way to reference the struct itself, only the fields within. Though the anonymity applies to the instance itself, not the type. To avoid confusion, I have added a new function called clang_Cursor_isAnonymousRecordDecl which has the old behaviour of clang_Cursor_isAnonymous (and updated the doc for the latter as well, which was seemingly forgotten). Patch by Jorn Vernee. Differential Revision: https://reviews.llvm.org/D61232 llvm-svn: 359448
Diffstat (limited to 'clang/include/clang-c')
-rw-r--r--clang/include/clang-c/Index.h10
1 files changed, 8 insertions, 2 deletions
diff --git a/clang/include/clang-c/Index.h b/clang/include/clang-c/Index.h
index 4f2f521f92f..24b865cbaf3 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 55
+#define CINDEX_VERSION_MINOR 56
#define CINDEX_VERSION_ENCODE(major, minor) ( \
((major) * 10000) \
@@ -3921,10 +3921,16 @@ CINDEX_LINKAGE CXType clang_Type_getModifiedType(CXType T);
CINDEX_LINKAGE long long clang_Cursor_getOffsetOfField(CXCursor C);
/**
+ * Determine whether the given cursor represents an anonymous
+ * tag or namespace
+ */
+CINDEX_LINKAGE unsigned clang_Cursor_isAnonymous(CXCursor C);
+
+/**
* Determine whether the given cursor represents an anonymous record
* declaration.
*/
-CINDEX_LINKAGE unsigned clang_Cursor_isAnonymous(CXCursor C);
+CINDEX_LINKAGE unsigned clang_Cursor_isAnonymousRecordDecl(CXCursor C);
enum CXRefQualifierKind {
/** No ref-qualifier was provided. */
OpenPOWER on IntegriCloud