Skip to content

Commit 9bbcb55

Browse files
mantogninitstellar
authored andcommitted
Address ABI issues introduced with CXCursor_CXXAddrspaceCastExpr
Revert values in CXCursorKind as they were before CXCursor_CXXAddrspaceCastExpr was introduced in a6a237f ([OpenCL] Added addrspace_cast operator in C++ mode., 2020-05-18). Insert CXCursor_CXXAddrspaceCastExpr after the last expression in CXCursorKind using the next available value. Reviewed By: akyrtzi, svenvh Differential Revision: https://reviews.llvm.org/D90385 (cherry picked from commit bbdbd02)
1 parent b6164d9 commit 9bbcb55

File tree

1 file changed

+29
-29
lines changed

1 file changed

+29
-29
lines changed

clang/include/clang-c/Index.h

+29-29
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
* compatible, thus CINDEX_VERSION_MAJOR is expected to remain stable.
3434
*/
3535
#define CINDEX_VERSION_MAJOR 0
36-
#define CINDEX_VERSION_MINOR 60
36+
#define CINDEX_VERSION_MINOR 61
3737

3838
#define CINDEX_VERSION_ENCODE(major, minor) (((major)*10000) + ((minor)*1))
3939

@@ -2052,62 +2052,58 @@ enum CXCursorKind {
20522052
*/
20532053
CXCursor_CXXFunctionalCastExpr = 128,
20542054

2055-
/** OpenCL's addrspace_cast<> expression.
2056-
*/
2057-
CXCursor_CXXAddrspaceCastExpr = 129,
2058-
20592055
/** A C++ typeid expression (C++ [expr.typeid]).
20602056
*/
2061-
CXCursor_CXXTypeidExpr = 130,
2057+
CXCursor_CXXTypeidExpr = 129,
20622058

20632059
/** [C++ 2.13.5] C++ Boolean Literal.
20642060
*/
2065-
CXCursor_CXXBoolLiteralExpr = 131,
2061+
CXCursor_CXXBoolLiteralExpr = 130,
20662062

20672063
/** [C++0x 2.14.7] C++ Pointer Literal.
20682064
*/
2069-
CXCursor_CXXNullPtrLiteralExpr = 132,
2065+
CXCursor_CXXNullPtrLiteralExpr = 131,
20702066

20712067
/** Represents the "this" expression in C++
20722068
*/
2073-
CXCursor_CXXThisExpr = 133,
2069+
CXCursor_CXXThisExpr = 132,
20742070

20752071
/** [C++ 15] C++ Throw Expression.
20762072
*
20772073
* This handles 'throw' and 'throw' assignment-expression. When
20782074
* assignment-expression isn't present, Op will be null.
20792075
*/
2080-
CXCursor_CXXThrowExpr = 134,
2076+
CXCursor_CXXThrowExpr = 133,
20812077

20822078
/** A new expression for memory allocation and constructor calls, e.g:
20832079
* "new CXXNewExpr(foo)".
20842080
*/
2085-
CXCursor_CXXNewExpr = 135,
2081+
CXCursor_CXXNewExpr = 134,
20862082

20872083
/** A delete expression for memory deallocation and destructor calls,
20882084
* e.g. "delete[] pArray".
20892085
*/
2090-
CXCursor_CXXDeleteExpr = 136,
2086+
CXCursor_CXXDeleteExpr = 135,
20912087

20922088
/** A unary expression. (noexcept, sizeof, or other traits)
20932089
*/
2094-
CXCursor_UnaryExpr = 137,
2090+
CXCursor_UnaryExpr = 136,
20952091

20962092
/** An Objective-C string literal i.e. @"foo".
20972093
*/
2098-
CXCursor_ObjCStringLiteral = 138,
2094+
CXCursor_ObjCStringLiteral = 137,
20992095

21002096
/** An Objective-C \@encode expression.
21012097
*/
2102-
CXCursor_ObjCEncodeExpr = 139,
2098+
CXCursor_ObjCEncodeExpr = 138,
21032099

21042100
/** An Objective-C \@selector expression.
21052101
*/
2106-
CXCursor_ObjCSelectorExpr = 140,
2102+
CXCursor_ObjCSelectorExpr = 139,
21072103

21082104
/** An Objective-C \@protocol expression.
21092105
*/
2110-
CXCursor_ObjCProtocolExpr = 141,
2106+
CXCursor_ObjCProtocolExpr = 140,
21112107

21122108
/** An Objective-C "bridged" cast expression, which casts between
21132109
* Objective-C pointers and C pointers, transferring ownership in the process.
@@ -2116,7 +2112,7 @@ enum CXCursorKind {
21162112
* NSString *str = (__bridge_transfer NSString *)CFCreateString();
21172113
* \endcode
21182114
*/
2119-
CXCursor_ObjCBridgedCastExpr = 142,
2115+
CXCursor_ObjCBridgedCastExpr = 141,
21202116

21212117
/** Represents a C++0x pack expansion that produces a sequence of
21222118
* expressions.
@@ -2131,7 +2127,7 @@ enum CXCursorKind {
21312127
* }
21322128
* \endcode
21332129
*/
2134-
CXCursor_PackExpansionExpr = 143,
2130+
CXCursor_PackExpansionExpr = 142,
21352131

21362132
/** Represents an expression that computes the length of a parameter
21372133
* pack.
@@ -2143,7 +2139,7 @@ enum CXCursorKind {
21432139
* };
21442140
* \endcode
21452141
*/
2146-
CXCursor_SizeOfPackExpr = 144,
2142+
CXCursor_SizeOfPackExpr = 143,
21472143

21482144
/* Represents a C++ lambda expression that produces a local function
21492145
* object.
@@ -2157,39 +2153,43 @@ enum CXCursorKind {
21572153
* }
21582154
* \endcode
21592155
*/
2160-
CXCursor_LambdaExpr = 145,
2156+
CXCursor_LambdaExpr = 144,
21612157

21622158
/** Objective-c Boolean Literal.
21632159
*/
2164-
CXCursor_ObjCBoolLiteralExpr = 146,
2160+
CXCursor_ObjCBoolLiteralExpr = 145,
21652161

21662162
/** Represents the "self" expression in an Objective-C method.
21672163
*/
2168-
CXCursor_ObjCSelfExpr = 147,
2164+
CXCursor_ObjCSelfExpr = 146,
21692165

21702166
/** OpenMP 5.0 [2.1.5, Array Section].
21712167
*/
2172-
CXCursor_OMPArraySectionExpr = 148,
2168+
CXCursor_OMPArraySectionExpr = 147,
21732169

21742170
/** Represents an @available(...) check.
21752171
*/
2176-
CXCursor_ObjCAvailabilityCheckExpr = 149,
2172+
CXCursor_ObjCAvailabilityCheckExpr = 148,
21772173

21782174
/**
21792175
* Fixed point literal
21802176
*/
2181-
CXCursor_FixedPointLiteral = 150,
2177+
CXCursor_FixedPointLiteral = 149,
21822178

21832179
/** OpenMP 5.0 [2.1.4, Array Shaping].
21842180
*/
2185-
CXCursor_OMPArrayShapingExpr = 151,
2181+
CXCursor_OMPArrayShapingExpr = 150,
21862182

21872183
/**
21882184
* OpenMP 5.0 [2.1.6 Iterators]
21892185
*/
2190-
CXCursor_OMPIteratorExpr = 152,
2186+
CXCursor_OMPIteratorExpr = 151,
2187+
2188+
/** OpenCL's addrspace_cast<> expression.
2189+
*/
2190+
CXCursor_CXXAddrspaceCastExpr = 152,
21912191

2192-
CXCursor_LastExpr = CXCursor_OMPIteratorExpr,
2192+
CXCursor_LastExpr = CXCursor_CXXAddrspaceCastExpr,
21932193

21942194
/* Statements */
21952195
CXCursor_FirstStmt = 200,

0 commit comments

Comments
 (0)