diff options
29 files changed, 2768 insertions, 1864 deletions
diff --git a/bindings/python/clang/cindex.py b/bindings/python/clang/cindex.py index 5b8f814c05..35c423d7d8 100644 --- a/bindings/python/clang/cindex.py +++ b/bindings/python/clang/cindex.py @@ -451,6 +451,19 @@ CursorKind.USING_DIRECTIVE = CursorKind(34) # A C++ using declaration CursorKind.USING_DECLARATION = CursorKind(35) +# A Type alias decl. +CursorKind.TYPE_ALIAS_DECL = CursorKind(36) + +# A Objective-C synthesize decl +CursorKind.OBJC_SYNTHESIZE_DECL = CursorKind(37) + +# A Objective-C dynamic decl +CursorKind.OBJC_DYNAMIC_DECL = CursorKind(38) + +# A C++ access specifier decl. +CursorKind.CXX_ACCESS_SPEC_DECL = CursorKind(39) + + ### # Reference Kinds @@ -524,6 +537,154 @@ CursorKind.OBJC_MESSAGE_EXPR = CursorKind(104) # An expression that represents a block literal. CursorKind.BLOCK_EXPR = CursorKind(105) +# An integer literal. +CursorKind.INTEGER_LITERAL = CursorKind(106) + +# A floating point number literal. +CursorKind.FLOATING_LITERAL = CursorKind(107) + +# An imaginary number literal. +CursorKind.IMAGINARY_LITERAL = CursorKind(108) + +# A string literal. +CursorKind.STRING_LITERAL = CursorKind(109) + +# A character literal. +CursorKind.CHARACTER_LITERAL = CursorKind(110) + +# A parenthesized expression, e.g. "(1)". +# +# This AST node is only formed if full location information is requested. +CursorKind.PAREN_EXPR = CursorKind(111) + +# This represents the unary-expression's (except sizeof and +# alignof). +CursorKind.UNARY_OPERATOR = CursorKind(112) + +# [C99 6.5.2.1] Array Subscripting. +CursorKind.ARRAY_SUBSCRIPT_EXPR = CursorKind(113) + +# A builtin binary operation expression such as "x + y" or +# "x <= y". +CursorKind.BINARY_OPERATOR = CursorKind(114) + +# Compound assignment such as "+=". +CursorKind.COMPOUND_ASSIGNMENT_OPERATOR = CursorKind(115) + +# The ?: ternary operator. +CursorKind.CONDITONAL_OPERATOR = CursorKind(116) + +# An explicit cast in C (C99 6.5.4) or a C-style cast in C++ +# (C++ [expr.cast]), which uses the syntax (Type)expr. +# +# For example: (int)f. +CursorKind.CSTYLE_CAST_EXPR = CursorKind(117) + +# [C99 6.5.2.5] +CursorKind.COMPOUND_LITERAL_EXPR = CursorKind(118) + +# Describes an C or C++ initializer list. +CursorKind.INIT_LIST_EXPR = CursorKind(119) + +# The GNU address of label extension, representing &&label. +CursorKind.ADDR_LABEL_EXPR = CursorKind(120) + +# This is the GNU Statement Expression extension: ({int X=4; X;}) +CursorKind.StmtExpr = CursorKind(121) + +# Represents a C1X generic selection. +CursorKind.GENERIC_SELECTION_EXPR = CursorKind(122) + +# Implements the GNU __null extension, which is a name for a null +# pointer constant that has integral type (e.g., int or long) and is the same +# size and alignment as a pointer. +# +# The __null extension is typically only used by system headers, which define +# NULL as __null in C++ rather than using 0 (which is an integer that may not +# match the size of a pointer). +CursorKind.GNU_NULL_EXPR = CursorKind(123) + +# C++'s static_cast<> expression. +CursorKind.CXX_STATIC_CAST_EXPR = CursorKind(124) + +# C++'s dynamic_cast<> expression. +CursorKind.CXX_DYNAMIC_CAST_EXPR = CursorKind(125) + +# C++'s reinterpret_cast<> expression. +CursorKind.CXX_REINTERPRET_CAST_EXPR = CursorKind(126) + +# C++'s const_cast<> expression. +CursorKind.CXX_CONST_CAST_EXPR = CursorKind(127) + +# Represents an explicit C++ type conversion that uses "functional" +# notion (C++ [expr.type.conv]). +# +# Example: +# \code +# x = int(0.5); +# \endcode +CursorKind.CXX_FUNCTIONAL_CAST_EXPR = CursorKind(128) + +# A C++ typeid expression (C++ [expr.typeid]). +CursorKind.CXX_TYPEID_EXPR = CursorKind(129) + +# [C++ 2.13.5] C++ Boolean Literal. +CursorKind.CXX_BOOL_LITERAL_EXPR = CursorKind(130) + +# [C++0x 2.14.7] C++ Pointer Literal. +CursorKind.CXX_NULL_PTR_LITERAL_EXPR = CursorKind(131) + +# Represents the "this" expression in C++ +CursorKind.CXX_THIS_EXPR = CursorKind(132) + +# [C++ 15] C++ Throw Expression. +# +# This handles 'throw' and 'throw' assignment-expression. When +# assignment-expression isn't present, Op will be null. +CursorKind.CXX_THROW_EXPR = CursorKind(133) + +# A new expression for memory allocation and constructor calls, e.g: +# "new CXXNewExpr(foo)". +CursorKind.CXX_NEW_EXPR = CursorKind(134) + +# A delete expression for memory deallocation and destructor calls, +# e.g. "delete[] pArray". +CursorKind.CXX_DELETE_EXPR = CursorKind(135) + +# Represents a unary expression. +CursorKind.CXX_UNARY_EXPR = CursorKind(136) + +# ObjCStringLiteral, used for Objective-C string literals i.e. "foo". +CursorKind.OBJC_STRING_LITERAL = CursorKind(137) + +# ObjCEncodeExpr, used for in Objective-C. +CursorKind.OBJC_ENCODE_EXPR = CursorKind(138) + +# ObjCSelectorExpr used for in Objective-C. +CursorKind.OBJC_SELECTOR_EXPR = CursorKind(139) + +# Objective-C's protocol expression. +CursorKind.OBJC_PROTOCOL_EXPR = CursorKind(140) + +# An Objective-C "bridged" cast expression, which casts between +# Objective-C pointers and C pointers, transferring ownership in the process. +# +# \code +# NSString *str = (__bridge_transfer NSString *)CFCreateString(); +# \endcode +CursorKind.OBJC_BRIDGE_CAST_EXPR = CursorKind(141) + +# Represents a C++0x pack expansion that produces a sequence of +# expressions. +# +# A pack expansion expression contains a pattern (which itself is an +# expression) followed by an ellipsis. For example: +CursorKind.PACK_EXPANSION_EXPR = CursorKind(142) + +# Represents an expression that computes the length of a parameter +# pack. +CursorKind.SIZE_OF_PACK_EXPR = CursorKind(143) + # A statement whose specific kind is not exposed via this interface. # # Unexposed statements have the same operations as any other kind of statement; @@ -534,6 +695,92 @@ CursorKind.UNEXPOSED_STMT = CursorKind(200) # A labelled statement in a function. CursorKind.LABEL_STMT = CursorKind(201) +# A compound statement +CursorKind.COMPOUND_STMT = CursorKind(202) + +# A case statement. +CursorKind.CASE_STMT = CursorKind(203) + +# A default statement. +CursorKind.DEFAULT_STMT = CursorKind(204) + +# An if statement. +CursorKind.IF_STMT = CursorKind(205) + +# A switch statement. +CursorKind.SWITCH_STMT = CursorKind(206) + +# A while statement. +CursorKind.WHILE_STMT = CursorKind(207) + +# A do statement. +CursorKind.DO_STMT = CursorKind(208) + +# A for statement. +CursorKind.FOR_STMT = CursorKind(209) + +# A goto statement. +CursorKind.GOTO_STMT = CursorKind(210) + +# An indirect goto statement. +CursorKind.INDIRECT_GOTO_STMT = CursorKind(211) + +# A continue statement. +CursorKind.CONTINUE_STMT = CursorKind(212) + +# A break statement. +CursorKind.BREAK_STMT = CursorKind(213) + +# A return statement. +CursorKind.RETURN_STMT = CursorKind(214) + +# A GNU-style inline assembler statement. +CursorKind.ASM_STMT = CursorKind(215) + +# Objective-C's overall @try-@catch-@finally statement. +CursorKind.OBJC_AT_TRY_STMT = CursorKind(216) + +# Objective-C's @catch statement. +CursorKind.OBJC_AT_CATCH_STMT = CursorKind(217) + +# Objective-C's @finally statement. +CursorKind.OBJC_AT_FINALLY_STMT = CursorKind(218) + +# Objective-C's @throw statement. +CursorKind.OBJC_AT_THROW_STMT = CursorKind(219) + +# Objective-C's @synchronized statement. +CursorKind.OBJC_AT_SYNCHRONIZED_STMT = CursorKind(220) + +# Objective-C's autorealease pool statement. +CursorKind.OBJC_AUTORELEASE_POOL_STMT = CursorKind(221) + +# Objective-C's for collection statement. +CursorKind.OBJC_FOR_COLLECTION_STMT = CursorKind(222) + +# C++'s catch statement. +CursorKind.CXX_CATCH_STMT = CursorKind(223) + +# C++'s try statement. +CursorKind.CXX_TRY_STMT = CursorKind(224) + +# C++'s for (* : *) statement. +CursorKind.CXX_FOR_RANGE_STMT = CursorKind(225) + +# Windows Structured Exception Handling's try statement. +CursorKind.SEH_TRY_STMT = CursorKind(226) + +# Windows Structured Exception Handling's except statement. +CursorKind.SEH_EXCEPT_STMT = CursorKind(227) + +# Windows Structured Exception Handling's finally statement. +CursorKind.SEH_FINALLY_STMT = CursorKind(228) + +# The null statement. +CursorKind.NULL_STMT = CursorKind(230) + +# Adaptor class for mixing declarations with statements and expressions. +CursorKind.DECL_STMT = CursorKind(231) ### # Other Kinds @@ -616,7 +863,9 @@ class Cursor(Structure): # FIXME: clang_getCursorSpelling should be fixed to not assert on # this, for consistency with clang_getCursorUSR. return None - return Cursor_spelling(self) + if not hasattr(self, '_spelling'): + self._spelling = Cursor_spelling(self) + return self._spelling @property def displayname(self): @@ -627,7 +876,9 @@ class Cursor(Structure): such as the parameters of a function or template or the arguments of a class template specialization. """ - return Cursor_displayname(self) + if not hasattr(self, '_displayname'): + self._displayname = Cursor_displayname(self) + return self._displayname @property def location(self): @@ -635,7 +886,9 @@ class Cursor(Structure): Return the source location (the starting character) of the entity pointed at by the cursor. """ - return Cursor_loc(self) + if not hasattr(self, '_loc'): + self._loc = Cursor_loc(self) + return self._loc @property def extent(self): @@ -643,7 +896,9 @@ class Cursor(Structure): Return the source range (the range of text) occupied by the entity pointed at by the cursor. """ - return Cursor_extent(self) + if not hasattr(self, '_extent'): + self._extent = Cursor_extent(self) + return self._extent @property def type(self): @@ -651,7 +906,9 @@ class Cursor(Structure): Retrieve the type (if any) of of the entity pointed at by the cursor. """ - return Cursor_type(self) + if not hasattr(self, '_type'): + self._type = Cursor_type(self) + return self._type def get_children(self): """Return an iterator for accessing the children of this cursor.""" diff --git a/include/clang-c/Index.h b/include/clang-c/Index.h index 72c829acbb..65d05e5094 100644 --- a/include/clang-c/Index.h +++ b/include/clang-c/Index.h @@ -1311,6 +1311,7 @@ enum CXCursorKind { CXCursor_ObjCDynamicDecl = 38, /** \brief An access specifier. */ CXCursor_CXXAccessSpecifier = 39, + CXCursor_FirstDecl = CXCursor_UnexposedDecl, CXCursor_LastDecl = CXCursor_CXXAccessSpecifier, @@ -1451,7 +1452,207 @@ enum CXCursorKind { /** \brief An expression that represents a block literal. */ CXCursor_BlockExpr = 105, - CXCursor_LastExpr = 105, + /** \brief An integer literal. + */ + CXCursor_IntegerLiteral = 106, + + /** \brief A floating point number literal. + */ + CXCursor_FloatingLiteral = 107, + + /** \brief An imaginary number literal. + */ + CXCursor_ImaginaryLiteral = 108, + + /** \brief A string literal. + */ + CXCursor_StringLiteral = 109, + + /** \brief A character literal. + */ + CXCursor_CharacterLiteral = 110, + + /** \brief A parenthesized expression, e.g. "(1)". + * + * This AST node is only formed if full location information is requested. + */ + CXCursor_ParenExpr = 111, + + /** \brief This represents the unary-expression's (except sizeof and + * alignof). + */ + CXCursor_UnaryOperator = 112, + + /** \brief [C99 6.5.2.1] Array Subscripting. + */ + CXCursor_ArraySubscriptExpr = 113, + + /** \brief A builtin binary operation expression such as "x + y" or + * "x <= y". + */ + CXCursor_BinaryOperator = 114, + + /** \brief Compound assignment such as "+=". + */ + CXCursor_CompoundAssignOperator = 115, + + /** \brief The ?: ternary operator. + */ + CXCursor_ConditionalOperator = 116, + + /** \brief An explicit cast in C (C99 6.5.4) or a C-style cast in C++ + * (C++ [expr.cast]), which uses the syntax (Type)expr. + * + * For example: (int)f. + */ + CXCursor_CStyleCastExpr = 117, + + /** \brief [C99 6.5.2.5] + */ + CXCursor_CompoundLiteralExpr = 118, + + /** \brief Describes an C or C++ initializer list. + */ + CXCursor_InitListExpr = 119, + + /** \brief The GNU address of label extension, representing &&label. + */ + CXCursor_AddrLabelExpr = 120, + + /** \brief This is the GNU Statement Expression extension: ({int X=4; X;}) + */ + CXCursor_StmtExpr = 121, + + /** \brief Represents a C1X generic selection. + */ + CXCursor_GenericSelectionExpr = 122, + + /** \brief Implements the GNU __null extension, which is a name for a null + * pointer constant that has integral type (e.g., int or long) and is the same + * size and alignment as a pointer. + * + * The __null extension is typically only used by system headers, which define + * NULL as __null in C++ rather than using 0 (which is an integer that may not + * match the size of a pointer). + */ + CXCursor_GNUNullExpr = 123, + + /** \brief C++'s static_cast<> expression. + */ + CXCursor_CXXStaticCastExpr = 124, + + /** \brief C++'s dynamic_cast<> expression. + */ + CXCursor_CXXDynamicCastExpr = 125, + + /** \brief C++'s reinterpret_cast<> expression. + */ + CXCursor_CXXReinterpretCastExpr = 126, + + /** \brief C++'s const_cast<> expression. + */ + CXCursor_CXXConstCastExpr = 127, + + /** \brief Represents an explicit C++ type conversion that uses "functional" + * notion (C++ [expr.type.conv]). + * + * Example: + * \code + * x = int(0.5); + * \endcode + */ + CXCursor_CXXFunctionalCastExpr = 128, + + /** \brief A C++ typeid expression (C++ [expr.typeid]). + */ + CXCursor_CXXTypeidExpr = 129, + + /** \brief [C++ 2.13.5] C++ Boolean Literal. + */ + CXCursor_CXXBoolLiteralExpr = 130, + + /** \brief [C++0x 2.14.7] C++ Pointer Literal. + */ + CXCursor_CXXNullPtrLiteralExpr = 131, + + /** \brief Represents the "this" expression in C++ + */ + CXCursor_CXXThisExpr = 132, + + /** \brief [C++ 15] C++ Throw Expression. + * + * This handles 'throw' and 'throw' assignment-expression. When + * assignment-expression isn't present, Op will be null. + */ + CXCursor_CXXThrowExpr = 133, + + /** \brief A new expression for memory allocation and constructor calls, e.g: + * "new CXXNewExpr(foo)". + */ + CXCursor_CXXNewExpr = 134, + + /** \brief A delete expression for memory deallocation and destructor calls, + * e.g. "delete[] pArray". + */ + CXCursor_CXXDeleteExpr = 135, + + /** \brief A unary expression. + */ + CXCursor_UnaryExpr = 136, + + /** \brief ObjCStringLiteral, used for Objective-C string literals i.e. "foo". + */ + CXCursor_ObjCStringLiteral = 137, + + /** \brief ObjCEncodeExpr, used for in Objective-C. + */ + CXCursor_ObjCEncodeExpr = 138, + + /** \brief ObjCSelectorExpr used for in Objective-C. + */ + CXCursor_ObjCSelectorExpr = 139, + + /** \brief Objective-C's protocol expression. + */ + CXCursor_ObjCProtocolExpr = 140, + + /** \brief An Objective-C "bridged" cast expression, which casts between + * Objective-C pointers and C pointers, transferring ownership in the process. + * + * \code + * NSString *str = (__bridge_transfer NSString *)CFCreateString(); + * \endcode + */ + CXCursor_ObjCBridgedCastExpr = 141, + + /** \brief Represents a C++0x pack expansion that produces a sequence of + * expressions. + * + * A pack expansion expression contains a pattern (which itself is an + * expression) followed by an ellipsis. For example: + * + * \code + * template<typename F, typename ...Types> + * void forward(F f, Types &&...args) { + * f(static_cast<Types&&>(args)...); + * } + * \endcode + */ + CXCursor_PackExpansionExpr = 142, + + /** \brief Represents an expression that computes the length of a parameter + * pack. + * + * \code + * template<typename ...Types> + * struct count { + * static const unsigned value = sizeof...(Types); + * }; + * \endcode + */ + CXCursor_SizeOfPackExpr = 143, + + CXCursor_LastExpr = CXCursor_SizeOfPackExpr, /* Statements */ CXCursor_FirstStmt = 200, @@ -1478,8 +1679,130 @@ enum CXCursorKind { * */ CXCursor_LabelStmt = 201, - - CXCursor_LastStmt = CXCursor_LabelStmt, + + /** \brief A group of statements like { stmt stmt }. + * + * This cursor kind is used to describe compound statements, e.g. function + * bodies. + */ + CXCursor_CompoundStmt = 202, + + /** \brief A case statment. + */ + CXCursor_CaseStmt = 203, + + /** \brief A default statement. + */ + CXCursor_DefaultStmt = 204, + + /** \brief An if statement + */ + CXCursor_IfStmt = 205, + + /** \brief A switch statement. + */ + CXCursor_SwitchStmt = 206, + + /** \brief A while statement. + */ + CXCursor_WhileStmt = 207, + + /** \brief A do statement. + */ + CXCursor_DoStmt = 208, + + /** \brief A for statement. + */ + CXCursor_ForStmt = 209, + + /** \brief A goto statement. + */ + CXCursor_GotoStmt = 210, + + /** \brief An indirect goto statement. + */ + CXCursor_IndirectGotoStmt = 211, + + /** \brief A continue statement. + */ + CXCursor_ContinueStmt = 212, + + /** \brief A break statement. + */ + CXCursor_BreakStmt = 213, + + /** \brief A return statement. + */ + CXCursor_ReturnStmt = 214, + + /** \brief A GNU inline assembly statement extension. + */ + CXCursor_AsmStmt = 215, + + /** \brief Objective-C's overall @try-@catc-@finall statement. + */ + CXCursor_ObjCAtTryStmt = 216, + + /** \brief Objective-C's @catch statement. + */ + CXCursor_ObjCAtCatchStmt = 217, + + /** \brief Objective-C's @finally statement. + */ + CXCursor_ObjCAtFinallyStmt = 218, + + /** \brief Objective-C's @throw statement. + */ + CXCursor_ObjCAtThrowStmt = 219, + + /** \brief Objective-C's @synchronized statement. + */ + CXCursor_ObjCAtSynchronizedStmt = 220, + + /** \brief Objective-C's autorelease pool statement. + */ + CXCursor_ObjCAutoreleasePoolStmt = 221, + + /** \brief Objective-C's collection statement. + */ + CXCursor_ObjCForCollectionStmt = 222, + + /** \brief C++'s catch statement. + */ + CXCursor_CXXCatchStmt = 223, + + /** \brief C++'s try statement. + */ + CXCursor_CXXTryStmt = 224, + + /** \brief C++'s for (* : *) statement. + */ + CXCursor_CXXForRangeStmt = 225, + + /** \brief Windows Structured Exception Handling's try statement. + */ + CXCursor_SEHTryStmt = 226, + + /** \brief Windows Structured Exception Handling's except statement. + */ + CXCursor_SEHExceptStmt = 227, + + /** \brief Windows Structured Exception Handling's finally statement. + */ + CXCursor_SEHFinallyStmt = 228, + + /** \brief The null satement ";": C99 6.8.3p3. + * + * This cursor kind is used to describe the null statement. + */ + CXCursor_NullStmt = 230, + + /** \brief Adaptor class for mixing declarations with statements and + * expressions. + */ + CXCursor_DeclStmt = 231, + + CXCursor_LastStmt = CXCursor_DeclStmt, /** * \brief Cursor that represents the translation unit itself. diff --git a/test/Index/TestClassDecl.m b/test/Index/TestClassDecl.m index 2e11191dca..e94a5c12fa 100644 --- a/test/Index/TestClassDecl.m +++ b/test/Index/TestClassDecl.m @@ -25,7 +25,7 @@ void function(Foo * arg) // CHECK-scan: [13:15 - 13:18] ObjCClassRef=Foo:10:12 // CHECK-scan: [13:18 - 13:24] ParmDecl=arg:13:21 (Definition) // CHECK-scan: [13:24 - 14:1] FunctionDecl=function:13:6 (Definition) -// CHECK-scan: [14:1 - 16:2] UnexposedStmt= +// CHECK-scan: [14:1 - 16:2] CompoundStmt= // CHECK-load: TestClassDecl.m:10:12: ObjCInterfaceDecl=Foo:10:12 Extent=[10:1 - 11:5] // CHECK-load: TestClassDecl.m:13:6: FunctionDecl=function:13:6 (Definition) Extent=[13:1 - 16:2] diff --git a/test/Index/TestClassForwardDecl.m b/test/Index/TestClassForwardDecl.m index 867113c496..d3d720c2ba 100644 --- a/test/Index/TestClassForwardDecl.m +++ b/test/Index/TestClassForwardDecl.m @@ -20,7 +20,7 @@ void function(Foo * arg) // CHECK-scan: [10:15 - 10:18] ObjCClassRef=Foo:8:8 // CHECK-scan: [10:18 - 10:24] ParmDecl=arg:10:21 (Definition) // CHECK-scan: [10:24 - 11:1] FunctionDecl=function:10:6 (Definition) -// CHECK-scan: [11:1 - 13:2] UnexposedStmt= +// CHECK: [11:1 - 13:2] CompundStmt= diff --git a/test/Index/annotate-nested-name-specifier.cpp b/test/Index/annotate-nested-name-specifier.cpp index 3189f19c9d..c4f60e3992 100644 --- a/test/Index/annotate-nested-name-specifier.cpp +++ b/test/Index/annotate-nested-name-specifier.cpp @@ -200,7 +200,7 @@ struct X9 : X8 { // CHECK: Punctuation: "::" [35:30 - 35:32] VarDecl=max_size:35:32 (Definition) // CHECK: Identifier: "max_size" [35:32 - 35:40] VarDecl=max_size:35:32 (Definition) // CHECK: Punctuation: "=" [35:41 - 35:42] VarDecl=max_size:35:32 (Definition) -// CHECK: Literal: "17" [35:43 - 35:45] UnexposedExpr= +// CHECK: Literal: "17" [35:43 - 35:45] IntegerLiteral= // CHECK: Punctuation: ";" [35:45 - 35:46] // CHECK: Keyword: "using" [40:3 - 40:8] UsingDeclaration=iterator:40:46 @@ -250,56 +250,56 @@ struct X9 : X8 { // Pseudo-destructor // CHECK: Identifier: "t" [57:5 - 57:6] DeclRefExpr=t:56:13 -// CHECK: Punctuation: "->" [57:6 - 57:8] UnexposedExpr= -// CHECK: Punctuation: "::" [57:8 - 57:10] UnexposedExpr= +// CHECK: Punctuation: "->" [57:6 - 57:8] MemberRefExpr= +// CHECK: Punctuation: "::" [57:8 - 57:10] MemberRefExpr= // CHECK: Identifier: "outer_alias" [57:10 - 57:21] NamespaceRef=outer_alias:10:11 -// CHECK: Punctuation: "::" [57:21 - 57:23] UnexposedExpr= +// CHECK: Punctuation: "::" [57:21 - 57:23] MemberRefExpr= // CHECK: Identifier: "inner" [57:23 - 57:28] NamespaceRef=inner:45:13 -// CHECK: Punctuation: "::" [57:28 - 57:30] UnexposedExpr= -// CHECK: Keyword: "template" [57:30 - 57:38] UnexposedExpr= +// CHECK: Punctuation: "::" [57:28 - 57:30] MemberRefExpr= +// CHECK: Keyword: "template" [57:30 - 57:38] MemberRefExpr= // CHECK: Identifier: "vector" [57:39 - 57:45] TemplateRef=vector:4:12 -// CHECK: Punctuation: "<" [57:45 - 57:46] UnexposedExpr= +// CHECK: Punctuation: "<" [57:45 - 57:46] MemberRefExpr= // CHECK: Identifier: "T" [57:46 - 57:47] TypeRef=T:54:19 -// CHECK: Punctuation: ">" [57:47 - 57:48] UnexposedExpr= -// CHECK: Punctuation: "::" [57:48 - 57:50] UnexposedExpr= -// CHECK: Punctuation: "~" [57:50 - 57:51] UnexposedExpr= +// CHECK: Punctuation: ">" [57:47 - 57:48] MemberRefExpr= +// CHECK: Punctuation: "::" [57:48 - 57:50] MemberRefExpr= +// CHECK: Punctuation: "~" [57:50 - 57:51] MemberRefExpr= // CHECK: Identifier: "vector" [57:51 - 57:57] TemplateRef=vector:4:12 -// CHECK: Punctuation: "<" [57:57 - 57:58] UnexposedExpr= +// CHECK: Punctuation: "<" [57:57 - 57:58] MemberRefExpr= // CHECK: Identifier: "T" [57:58 - 57:59] TypeRef=T:54:19 // CHECK: Punctuation: ">" [57:59 - 57:60] CallExpr= // CHECK: Punctuation: "(" [57:60 - 57:61] CallExpr= // CHECK: Punctuation: ")" [57:61 - 57:62] CallExpr= // Unresolved member and non-member references -// CHECK: Punctuation: "::" [75:5 - 75:7] UnexposedExpr=[63:10, 64:10] +// CHECK: Punctuation: "::" [75:5 - 75:7] DeclRefExpr=[63:10, 64:10] // CHECK: Identifier: "outer_alias" [75:7 - 75:18] NamespaceRef=outer_alias:10:11 -// CHECK: Punctuation: "::" [75:18 - 75:20] UnexposedExpr=[63:10, 64:10] +// CHECK: Punctuation: "::" [75:18 - 75:20] DeclRefExpr=[63:10, 64:10] // CHECK: Identifier: "inner" [75:20 - 75:25] NamespaceRef=inner:62:13 -// CHECK: Punctuation: "::" [75:25 - 75:27] UnexposedExpr=[63:10, 64:10] +// CHECK: Punctuation: "::" [75:25 - 75:27] DeclRefExpr=[63:10, 64:10] // CHECK: Identifier: "f" [75:27 - 75:28] OverloadedDeclRef=f[63:10, 64:10] // CHECK: Punctuation: "(" [75:28 - 75:29] CallExpr= // CHECK: Identifier: "t" [75:29 - 75:30] DeclRefExpr=t:74:12 // CHECK: Punctuation: ")" [75:30 - 75:31] CallExpr= -// CHECK: Punctuation: "::" [76:5 - 76:7] UnexposedExpr=[71:8, 72:8] +// CHECK: Punctuation: "::" [76:5 - 76:7] MemberRefExpr=[71:8, 72:8] // CHECK: Identifier: "X4" [76:7 - 76:9] TemplateRef=X4:69:8 -// CHECK: Punctuation: "<" [76:9 - 76:10] UnexposedExpr=[71:8, 72:8] +// CHECK: Punctuation: "<" [76:9 - 76:10] MemberRefExpr=[71:8, 72:8] // CHECK: Identifier: "type" [76:10 - 76:14] TypeRef=type:70:13 -// CHECK: Punctuation: ">" [76:14 - 76:15] UnexposedExpr=[71:8, 72:8] -// CHECK: Punctuation: "::" [76:15 - 76:17] UnexposedExpr=[71:8, 72:8] +// CHECK: Punctuation: ">" [76:14 - 76:15] MemberRefExpr=[71:8, 72:8] +// CHECK: Punctuation: "::" [76:15 - 76:17] MemberRefExpr=[71:8, 72:8] // CHECK: Identifier: "g" [76:17 - 76:18] OverloadedDeclRef=g[71:8, 72:8] // CHECK: Punctuation: "(" [76:18 - 76:19] CallExpr= // CHECK: Identifier: "t" [76:19 - 76:20] DeclRefExpr=t:74:12 // CHECK: Punctuation: ")" [76:20 - 76:21] CallExpr= -// CHECK: Punctuation: ";" [76:21 - 76:22] UnexposedStmt= -// CHECK: Keyword: "this" [77:5 - 77:9] UnexposedExpr= -// CHECK: Punctuation: "->" [77:9 - 77:11] UnexposedExpr= -// CHECK: Punctuation: "::" [77:11 - 77:13] UnexposedExpr= +// CHECK: Punctuation: ";" [76:21 - 76:22] CompoundStmt= +// CHECK: Keyword: "this" [77:5 - 77:9] CXXThisExpr= +// CHECK: Punctuation: "->" [77:9 - 77:11] MemberRefExpr= +// CHECK: Punctuation: "::" [77:11 - 77:13] MemberRefExpr= // CHECK: Identifier: "X4" [77:13 - 77:15] TemplateRef=X4:69:8 -// CHECK: Punctuation: "<" [77:15 - 77:16] UnexposedExpr= +// CHECK: Punctuation: "<" [77:15 - 77:16] MemberRefExpr= // CHECK: Identifier: "type" [77:16 - 77:20] TypeRef=type:70:13 -// CHECK: Punctuation: ">" [77:20 - 77:21] UnexposedExpr= -// CHECK: Punctuation: "::" [77:21 - 77:23] UnexposedExpr= -// CHECK: Identifier: "g" [77:23 - 77:24] UnexposedExpr= +// CHECK: Punctuation: ">" [77:20 - 77:21] MemberRefExpr= +// CHECK: Punctuation: "::" [77:21 - 77:23] MemberRefExpr= +// CHECK: Identifier: "g" [77:23 - 77:24] MemberRefExpr= // CHECK: Punctuation: "(" [77:24 - 77:25] CallExpr= // CHECK: Identifier: "t" [77:25 - 77:26] DeclRefExpr=t:74:12 // CHECK: Punctuation: ")" [77:26 - 77:27] CallExpr= @@ -314,7 +314,7 @@ struct X9 : X8 { // CHECK: Punctuation: "(" [90:28 - 90:29] CallExpr=f:63:10 // CHECK: Identifier: "t" [90:29 - 90:30] DeclRefExpr=t:89:15 // CHECK: Punctuation: ")" [90:30 - 90:31] CallExpr=f:63:10 -// CHECK: Punctuation: ";" [90:31 - 90:32] UnexposedStmt= +// CHECK: Punctuation: ";" [90:31 - 90:32] CompoundStmt= // CHECK: Punctuation: "::" [91:5 - 91:7] MemberRefExpr=g:86:8 // CHECK: Identifier: "X4" [91:7 - 91:9] TemplateRef=X4:69:8 // CHECK: Punctuation: "<" [91:9 - 91:10] MemberRefExpr=g:86:8 @@ -325,8 +325,8 @@ struc |