Author: aaronballman Date: Fri May 24 10:39:55 2019 New Revision: 361652 URL: http://llvm.org/viewvc/llvm-project?rev=361652&view=rev Log: Add support for dumping Objective C AST declaration nodes to JSON.
Added: cfe/trunk/test/AST/ast-dump-decl-json.m Modified: cfe/trunk/include/clang/AST/JSONNodeDumper.h cfe/trunk/lib/AST/JSONNodeDumper.cpp Modified: cfe/trunk/include/clang/AST/JSONNodeDumper.h URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/AST/JSONNodeDumper.h?rev=361652&r1=361651&r2=361652&view=diff ============================================================================== --- cfe/trunk/include/clang/AST/JSONNodeDumper.h (original) +++ cfe/trunk/include/clang/AST/JSONNodeDumper.h Fri May 24 10:39:55 2019 @@ -218,6 +218,19 @@ public: void VisitAccessSpecDecl(const AccessSpecDecl *ASD); void VisitFriendDecl(const FriendDecl *FD); + void VisitObjCIvarDecl(const ObjCIvarDecl *D); + void VisitObjCMethodDecl(const ObjCMethodDecl *D); + void VisitObjCTypeParamDecl(const ObjCTypeParamDecl *D); + void VisitObjCCategoryDecl(const ObjCCategoryDecl *D); + void VisitObjCCategoryImplDecl(const ObjCCategoryImplDecl *D); + void VisitObjCProtocolDecl(const ObjCProtocolDecl *D); + void VisitObjCInterfaceDecl(const ObjCInterfaceDecl *D); + void VisitObjCImplementationDecl(const ObjCImplementationDecl *D); + void VisitObjCCompatibleAliasDecl(const ObjCCompatibleAliasDecl *D); + void VisitObjCPropertyDecl(const ObjCPropertyDecl *D); + void VisitObjCPropertyImplDecl(const ObjCPropertyImplDecl *D); + void VisitBlockDecl(const BlockDecl *D); + void VisitDeclRefExpr(const DeclRefExpr *DRE); void VisitPredefinedExpr(const PredefinedExpr *PE); void VisitUnaryOperator(const UnaryOperator *UO); Modified: cfe/trunk/lib/AST/JSONNodeDumper.cpp URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/AST/JSONNodeDumper.cpp?rev=361652&r1=361651&r2=361652&view=diff ============================================================================== --- cfe/trunk/lib/AST/JSONNodeDumper.cpp (original) +++ cfe/trunk/lib/AST/JSONNodeDumper.cpp Fri May 24 10:39:55 2019 @@ -150,7 +150,15 @@ void JSONNodeDumper::Visit(const CXXCtor } void JSONNodeDumper::Visit(const OMPClause *C) {} -void JSONNodeDumper::Visit(const BlockDecl::Capture &C) {} + +void JSONNodeDumper::Visit(const BlockDecl::Capture &C) { + JOS.attribute("kind", "Capture"); + attributeOnlyIfTrue("byref", C.isByRef()); + attributeOnlyIfTrue("nested", C.isNested()); + if (C.getVariable()) + JOS.attribute("var", createBareDeclRef(C.getVariable())); +} + void JSONNodeDumper::Visit(const GenericSelectionExpr::ConstAssociation &A) { JOS.attribute("associationKind", A.getTypeSourceInfo() ? "case" : "default"); attributeOnlyIfTrue("selected", A.isSelected()); @@ -215,9 +223,11 @@ llvm::json::Object JSONNodeDumper::creat } llvm::json::Object JSONNodeDumper::createBareDeclRef(const Decl *D) { - llvm::json::Object Ret{ - {"id", createPointerRepresentation(D)}, - {"kind", (llvm::Twine(D->getDeclKindName()) + "Decl").str()}}; + llvm::json::Object Ret{{"id", createPointerRepresentation(D)}}; + if (!D) + return Ret; + + Ret["kind"] = (llvm::Twine(D->getDeclKindName()) + "Decl").str(); if (const auto *ND = dyn_cast<NamedDecl>(D)) Ret["name"] = ND->getDeclName().getAsString(); if (const auto *VD = dyn_cast<ValueDecl>(D)) @@ -645,6 +655,147 @@ void JSONNodeDumper::VisitFriendDecl(con JOS.attribute("type", createQualType(T->getType())); } +void JSONNodeDumper::VisitObjCIvarDecl(const ObjCIvarDecl *D) { + VisitNamedDecl(D); + JOS.attribute("type", createQualType(D->getType())); + attributeOnlyIfTrue("synthesized", D->getSynthesize()); + switch (D->getAccessControl()) { + case ObjCIvarDecl::None: JOS.attribute("access", "none"); break; + case ObjCIvarDecl::Private: JOS.attribute("access", "private"); break; + case ObjCIvarDecl::Protected: JOS.attribute("access", "protected"); break; + case ObjCIvarDecl::Public: JOS.attribute("access", "public"); break; + case ObjCIvarDecl::Package: JOS.attribute("access", "package"); break; + } +} + +void JSONNodeDumper::VisitObjCMethodDecl(const ObjCMethodDecl *D) { + VisitNamedDecl(D); + JOS.attribute("returnType", createQualType(D->getReturnType())); + JOS.attribute("instance", D->isInstanceMethod()); + attributeOnlyIfTrue("variadic", D->isVariadic()); +} + +void JSONNodeDumper::VisitObjCTypeParamDecl(const ObjCTypeParamDecl *D) { + VisitNamedDecl(D); + JOS.attribute("type", createQualType(D->getUnderlyingType())); + attributeOnlyIfTrue("bounded", D->hasExplicitBound()); + switch (D->getVariance()) { + case ObjCTypeParamVariance::Invariant: + break; + case ObjCTypeParamVariance::Covariant: + JOS.attribute("variance", "covariant"); + break; + case ObjCTypeParamVariance::Contravariant: + JOS.attribute("variance", "contravariant"); + break; + } +} + +void JSONNodeDumper::VisitObjCCategoryDecl(const ObjCCategoryDecl *D) { + VisitNamedDecl(D); + JOS.attribute("interface", createBareDeclRef(D->getClassInterface())); + JOS.attribute("implementation", createBareDeclRef(D->getImplementation())); + + llvm::json::Array Protocols; + for (const auto* P : D->protocols()) + Protocols.push_back(createBareDeclRef(P)); + if (!Protocols.empty()) + JOS.attribute("protocols", std::move(Protocols)); +} + +void JSONNodeDumper::VisitObjCCategoryImplDecl(const ObjCCategoryImplDecl *D) { + VisitNamedDecl(D); + JOS.attribute("interface", createBareDeclRef(D->getClassInterface())); + JOS.attribute("categoryDecl", createBareDeclRef(D->getCategoryDecl())); +} + +void JSONNodeDumper::VisitObjCProtocolDecl(const ObjCProtocolDecl *D) { + VisitNamedDecl(D); + + llvm::json::Array Protocols; + for (const auto *P : D->protocols()) + Protocols.push_back(createBareDeclRef(P)); + if (!Protocols.empty()) + JOS.attribute("protocols", std::move(Protocols)); +} + +void JSONNodeDumper::VisitObjCInterfaceDecl(const ObjCInterfaceDecl *D) { + VisitNamedDecl(D); + JOS.attribute("super", createBareDeclRef(D->getSuperClass())); + JOS.attribute("implementation", createBareDeclRef(D->getImplementation())); + + llvm::json::Array Protocols; + for (const auto* P : D->protocols()) + Protocols.push_back(createBareDeclRef(P)); + if (!Protocols.empty()) + JOS.attribute("protocols", std::move(Protocols)); +} + +void JSONNodeDumper::VisitObjCImplementationDecl( + const ObjCImplementationDecl *D) { + VisitNamedDecl(D); + JOS.attribute("super", createBareDeclRef(D->getSuperClass())); + JOS.attribute("interface", createBareDeclRef(D->getClassInterface())); +} + +void JSONNodeDumper::VisitObjCCompatibleAliasDecl( + const ObjCCompatibleAliasDecl *D) { + VisitNamedDecl(D); + JOS.attribute("interface", createBareDeclRef(D->getClassInterface())); +} + +void JSONNodeDumper::VisitObjCPropertyDecl(const ObjCPropertyDecl *D) { + VisitNamedDecl(D); + JOS.attribute("type", createQualType(D->getType())); + + switch (D->getPropertyImplementation()) { + case ObjCPropertyDecl::None: break; + case ObjCPropertyDecl::Required: JOS.attribute("control", "required"); break; + case ObjCPropertyDecl::Optional: JOS.attribute("control", "optional"); break; + } + + ObjCPropertyDecl::PropertyAttributeKind Attrs = D->getPropertyAttributes(); + if (Attrs != ObjCPropertyDecl::OBJC_PR_noattr) { + if (Attrs & ObjCPropertyDecl::OBJC_PR_getter) + JOS.attribute("getter", createBareDeclRef(D->getGetterMethodDecl())); + if (Attrs & ObjCPropertyDecl::OBJC_PR_setter) + JOS.attribute("setter", createBareDeclRef(D->getSetterMethodDecl())); + attributeOnlyIfTrue("readonly", Attrs & ObjCPropertyDecl::OBJC_PR_readonly); + attributeOnlyIfTrue("assign", Attrs & ObjCPropertyDecl::OBJC_PR_assign); + attributeOnlyIfTrue("readwrite", + Attrs & ObjCPropertyDecl::OBJC_PR_readwrite); + attributeOnlyIfTrue("retain", Attrs & ObjCPropertyDecl::OBJC_PR_retain); + attributeOnlyIfTrue("copy", Attrs & ObjCPropertyDecl::OBJC_PR_copy); + attributeOnlyIfTrue("nonatomic", + Attrs & ObjCPropertyDecl::OBJC_PR_nonatomic); + attributeOnlyIfTrue("atomic", Attrs & ObjCPropertyDecl::OBJC_PR_atomic); + attributeOnlyIfTrue("weak", Attrs & ObjCPropertyDecl::OBJC_PR_weak); + attributeOnlyIfTrue("strong", Attrs & ObjCPropertyDecl::OBJC_PR_strong); + attributeOnlyIfTrue("unsafe_unretained", + Attrs & ObjCPropertyDecl::OBJC_PR_unsafe_unretained); + attributeOnlyIfTrue("class", Attrs & ObjCPropertyDecl::OBJC_PR_class); + attributeOnlyIfTrue("nullability", + Attrs & ObjCPropertyDecl::OBJC_PR_nullability); + attributeOnlyIfTrue("null_resettable", + Attrs & ObjCPropertyDecl::OBJC_PR_null_resettable); + } +} + +void JSONNodeDumper::VisitObjCPropertyImplDecl(const ObjCPropertyImplDecl *D) { + VisitNamedDecl(D->getPropertyDecl()); + JOS.attribute("implKind", D->getPropertyImplementation() == + ObjCPropertyImplDecl::Synthesize + ? "synthesize" + : "dynamic"); + JOS.attribute("propertyDecl", createBareDeclRef(D->getPropertyDecl())); + JOS.attribute("ivarDecl", createBareDeclRef(D->getPropertyIvarDecl())); +} + +void JSONNodeDumper::VisitBlockDecl(const BlockDecl *D) { + attributeOnlyIfTrue("variadic", D->isVariadic()); + attributeOnlyIfTrue("capturesThis", D->capturesCXXThis()); +} + void JSONNodeDumper::VisitDeclRefExpr(const DeclRefExpr *DRE) { JOS.attribute("referencedDecl", createBareDeclRef(DRE->getDecl())); if (DRE->getDecl() != DRE->getFoundDecl()) Added: cfe/trunk/test/AST/ast-dump-decl-json.m URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/AST/ast-dump-decl-json.m?rev=361652&view=auto ============================================================================== --- cfe/trunk/test/AST/ast-dump-decl-json.m (added) +++ cfe/trunk/test/AST/ast-dump-decl-json.m Fri May 24 10:39:55 2019 @@ -0,0 +1,1704 @@ +// RUN: %clang_cc1 -Wno-unused -fblocks -ast-dump=json -ast-dump-filter Test %s | FileCheck %s + +@protocol P +@end + +@interface A +@end + +@interface TestObjCIvarDecl : A +@end + +@implementation TestObjCIvarDecl { + int varDefault; + @private int varPrivate; + @protected int varProtected; + @public int varPublic; + @package int varPackage; +} +@end + +@interface testObjCMethodDecl : A { +} +- (int) TestObjCMethodDecl: (int)i, ...; +@end + +@implementation testObjCMethodDecl +- (int) TestObjCMethodDecl: (int)i, ... { + return 0; +} +@end + +@protocol TestObjCProtocolDecl +- (void) foo; +@end + +@interface TestObjCClass : A <P> +- (void) foo; +@end + +@implementation TestObjCClass : A { + int i; +} +- (void) foo { +} +@end + +@interface TestObjCClass (TestObjCCategoryDecl) <P> +- (void) bar; +@end + +@interface TestGenericInterface<T> : A<P> { +} +@end + +@implementation TestObjCClass (TestObjCCategoryDecl) +- (void) bar { +} +@end + +@compatibility_alias TestObjCCompatibleAliasDecl A; + +@interface TestObjCProperty: A +@property(getter=getterFoo, setter=setterFoo:) int foo; +@property int bar; +@end + +@implementation TestObjCProperty { + int i; +} +@synthesize foo=i; +@synthesize bar; +@end + +void TestBlockDecl(int x) { + ^(int y, ...){ x; }; +} + +@interface B ++ (int) foo; +@end + +void f() { + __typeof__(B.foo) Test; +} + +// CHECK: "kind": "ObjCInterfaceDecl", +// CHECK-NEXT: "loc": { +// CHECK-NEXT: "col": 12, +// CHECK-NEXT: "file": "{{.*}}", +// CHECK-NEXT: "line": 9 +// CHECK-NEXT: }, +// CHECK-NEXT: "range": { +// CHECK-NEXT: "begin": { +// CHECK-NEXT: "col": 1, +// CHECK-NEXT: "file": "{{.*}}", +// CHECK-NEXT: "line": 9 +// CHECK-NEXT: }, +// CHECK-NEXT: "end": { +// CHECK-NEXT: "col": 2, +// CHECK-NEXT: "file": "{{.*}}", +// CHECK-NEXT: "line": 10 +// CHECK-NEXT: } +// CHECK-NEXT: }, +// CHECK-NEXT: "name": "TestObjCIvarDecl", +// CHECK-NEXT: "super": { +// CHECK-NEXT: "id": "0x{{.*}}", +// CHECK-NEXT: "kind": "ObjCInterfaceDecl", +// CHECK-NEXT: "name": "A" +// CHECK-NEXT: }, +// CHECK-NEXT: "implementation": { +// CHECK-NEXT: "id": "0x{{.*}}", +// CHECK-NEXT: "kind": "ObjCImplementationDecl", +// CHECK-NEXT: "name": "TestObjCIvarDecl" +// CHECK-NEXT: } +// CHECK-NEXT: } + + +// CHECK: "kind": "ObjCImplementationDecl", +// CHECK-NEXT: "loc": { +// CHECK-NEXT: "col": 17, +// CHECK-NEXT: "file": "{{.*}}", +// CHECK-NEXT: "line": 12 +// CHECK-NEXT: }, +// CHECK-NEXT: "range": { +// CHECK-NEXT: "begin": { +// CHECK-NEXT: "col": 1, +// CHECK-NEXT: "file": "{{.*}}", +// CHECK-NEXT: "line": 12 +// CHECK-NEXT: }, +// CHECK-NEXT: "end": { +// CHECK-NEXT: "col": 1, +// CHECK-NEXT: "file": "{{.*}}", +// CHECK-NEXT: "line": 19 +// CHECK-NEXT: } +// CHECK-NEXT: }, +// CHECK-NEXT: "name": "TestObjCIvarDecl", +// CHECK-NEXT: "super": { +// CHECK-NEXT: "id": "0x{{.*}}" +// CHECK-NEXT: }, +// CHECK-NEXT: "interface": { +// CHECK-NEXT: "id": "0x{{.*}}", +// CHECK-NEXT: "kind": "ObjCInterfaceDecl", +// CHECK-NEXT: "name": "TestObjCIvarDecl" +// CHECK-NEXT: }, +// CHECK-NEXT: "inner": [ +// CHECK-NEXT: { +// CHECK-NEXT: "id": "0x{{.*}}", +// CHECK-NEXT: "kind": "ObjCIvarDecl", +// CHECK-NEXT: "loc": { +// CHECK-NEXT: "col": 7, +// CHECK-NEXT: "file": "{{.*}}", +// CHECK-NEXT: "line": 13 +// CHECK-NEXT: }, +// CHECK-NEXT: "range": { +// CHECK-NEXT: "begin": { +// CHECK-NEXT: "col": 3, +// CHECK-NEXT: "file": "{{.*}}", +// CHECK-NEXT: "line": 13 +// CHECK-NEXT: }, +// CHECK-NEXT: "end": { +// CHECK-NEXT: "col": 7, +// CHECK-NEXT: "file": "{{.*}}", +// CHECK-NEXT: "line": 13 +// CHECK-NEXT: } +// CHECK-NEXT: }, +// CHECK-NEXT: "name": "varDefault", +// CHECK-NEXT: "type": { +// CHECK-NEXT: "qualType": "int" +// CHECK-NEXT: }, +// CHECK-NEXT: "access": "private" +// CHECK-NEXT: }, +// CHECK-NEXT: { +// CHECK-NEXT: "id": "0x{{.*}}", +// CHECK-NEXT: "kind": "ObjCIvarDecl", +// CHECK-NEXT: "loc": { +// CHECK-NEXT: "col": 16, +// CHECK-NEXT: "file": "{{.*}}", +// CHECK-NEXT: "line": 14 +// CHECK-NEXT: }, +// CHECK-NEXT: "range": { +// CHECK-NEXT: "begin": { +// CHECK-NEXT: "col": 12, +// CHECK-NEXT: "file": "{{.*}}", +// CHECK-NEXT: "line": 14 +// CHECK-NEXT: }, +// CHECK-NEXT: "end": { +// CHECK-NEXT: "col": 16, +// CHECK-NEXT: "file": "{{.*}}", +// CHECK-NEXT: "line": 14 +// CHECK-NEXT: } +// CHECK-NEXT: }, +// CHECK-NEXT: "name": "varPrivate", +// CHECK-NEXT: "type": { +// CHECK-NEXT: "qualType": "int" +// CHECK-NEXT: }, +// CHECK-NEXT: "access": "private" +// CHECK-NEXT: }, +// CHECK-NEXT: { +// CHECK-NEXT: "id": "0x{{.*}}", +// CHECK-NEXT: "kind": "ObjCIvarDecl", +// CHECK-NEXT: "loc": { +// CHECK-NEXT: "col": 18, +// CHECK-NEXT: "file": "{{.*}}", +// CHECK-NEXT: "line": 15 +// CHECK-NEXT: }, +// CHECK-NEXT: "range": { +// CHECK-NEXT: "begin": { +// CHECK-NEXT: "col": 14, +// CHECK-NEXT: "file": "{{.*}}", +// CHECK-NEXT: "line": 15 +// CHECK-NEXT: }, +// CHECK-NEXT: "end": { +// CHECK-NEXT: "col": 18, +// CHECK-NEXT: "file": "{{.*}}", +// CHECK-NEXT: "line": 15 +// CHECK-NEXT: } +// CHECK-NEXT: }, +// CHECK-NEXT: "name": "varProtected", +// CHECK-NEXT: "type": { +// CHECK-NEXT: "qualType": "int" +// CHECK-NEXT: }, +// CHECK-NEXT: "access": "protected" +// CHECK-NEXT: }, +// CHECK-NEXT: { +// CHECK-NEXT: "id": "0x{{.*}}", +// CHECK-NEXT: "kind": "ObjCIvarDecl", +// CHECK-NEXT: "loc": { +// CHECK-NEXT: "col": 15, +// CHECK-NEXT: "file": "{{.*}}", +// CHECK-NEXT: "line": 16 +// CHECK-NEXT: }, +// CHECK-NEXT: "range": { +// CHECK-NEXT: "begin": { +// CHECK-NEXT: "col": 11, +// CHECK-NEXT: "file": "{{.*}}", +// CHECK-NEXT: "line": 16 +// CHECK-NEXT: }, +// CHECK-NEXT: "end": { +// CHECK-NEXT: "col": 15, +// CHECK-NEXT: "file": "{{.*}}", +// CHECK-NEXT: "line": 16 +// CHECK-NEXT: } +// CHECK-NEXT: }, +// CHECK-NEXT: "name": "varPublic", +// CHECK-NEXT: "type": { +// CHECK-NEXT: "qualType": "int" +// CHECK-NEXT: }, +// CHECK-NEXT: "access": "public" +// CHECK-NEXT: }, +// CHECK-NEXT: { +// CHECK-NEXT: "id": "0x{{.*}}", +// CHECK-NEXT: "kind": "ObjCIvarDecl", +// CHECK-NEXT: "loc": { +// CHECK-NEXT: "col": 16, +// CHECK-NEXT: "file": "{{.*}}", +// CHECK-NEXT: "line": 17 +// CHECK-NEXT: }, +// CHECK-NEXT: "range": { +// CHECK-NEXT: "begin": { +// CHECK-NEXT: "col": 12, +// CHECK-NEXT: "file": "{{.*}}", +// CHECK-NEXT: "line": 17 +// CHECK-NEXT: }, +// CHECK-NEXT: "end": { +// CHECK-NEXT: "col": 16, +// CHECK-NEXT: "file": "{{.*}}", +// CHECK-NEXT: "line": 17 +// CHECK-NEXT: } +// CHECK-NEXT: }, +// CHECK-NEXT: "name": "varPackage", +// CHECK-NEXT: "type": { +// CHECK-NEXT: "qualType": "int" +// CHECK-NEXT: }, +// CHECK-NEXT: "access": "package" +// CHECK-NEXT: } +// CHECK-NEXT: ] +// CHECK-NEXT: } + + +// CHECK: "kind": "ObjCMethodDecl", +// CHECK-NEXT: "loc": { +// CHECK-NEXT: "col": 1, +// CHECK-NEXT: "file": "{{.*}}", +// CHECK-NEXT: "line": 23 +// CHECK-NEXT: }, +// CHECK-NEXT: "range": { +// CHECK-NEXT: "begin": { +// CHECK-NEXT: "col": 1, +// CHECK-NEXT: "file": "{{.*}}", +// CHECK-NEXT: "line": 23 +// CHECK-NEXT: }, +// CHECK-NEXT: "end": { +// CHECK-NEXT: "col": 40, +// CHECK-NEXT: "file": "{{.*}}", +// CHECK-NEXT: "line": 23 +// CHECK-NEXT: } +// CHECK-NEXT: }, +// CHECK-NEXT: "name": "TestObjCMethodDecl:", +// CHECK-NEXT: "returnType": { +// CHECK-NEXT: "qualType": "int" +// CHECK-NEXT: }, +// CHECK-NEXT: "instance": true, +// CHECK-NEXT: "variadic": true, +// CHECK-NEXT: "inner": [ +// CHECK-NEXT: { +// CHECK-NEXT: "id": "0x{{.*}}", +// CHECK-NEXT: "kind": "ParmVarDecl", +// CHECK-NEXT: "loc": { +// CHECK-NEXT: "col": 34, +// CHECK-NEXT: "file": "{{.*}}", +// CHECK-NEXT: "line": 23 +// CHECK-NEXT: }, +// CHECK-NEXT: "range": { +// CHECK-NEXT: "begin": { +// CHECK-NEXT: "col": 30, +// CHECK-NEXT: "file": "{{.*}}", +// CHECK-NEXT: "line": 23 +// CHECK-NEXT: }, +// CHECK-NEXT: "end": { +// CHECK-NEXT: "col": 34, +// CHECK-NEXT: "file": "{{.*}}", +// CHECK-NEXT: "line": 23 +// CHECK-NEXT: } +// CHECK-NEXT: }, +// CHECK-NEXT: "name": "i", +// CHECK-NEXT: "type": { +// CHECK-NEXT: "qualType": "int" +// CHECK-NEXT: } +// CHECK-NEXT: } +// CHECK-NEXT: ] +// CHECK-NEXT: } + + +// CHECK: "kind": "ObjCMethodDecl", +// CHECK-NEXT: "loc": { +// CHECK-NEXT: "col": 1, +// CHECK-NEXT: "file": "{{.*}}", +// CHECK-NEXT: "line": 27 +// CHECK-NEXT: }, +// CHECK-NEXT: "range": { +// CHECK-NEXT: "begin": { +// CHECK-NEXT: "col": 1, +// CHECK-NEXT: "file": "{{.*}}", +// CHECK-NEXT: "line": 27 +// CHECK-NEXT: }, +// CHECK-NEXT: "end": { +// CHECK-NEXT: "col": 1, +// CHECK-NEXT: "file": "{{.*}}", +// CHECK-NEXT: "line": 29 +// CHECK-NEXT: } +// CHECK-NEXT: }, +// CHECK-NEXT: "name": "TestObjCMethodDecl:", +// CHECK-NEXT: "returnType": { +// CHECK-NEXT: "qualType": "int" +// CHECK-NEXT: }, +// CHECK-NEXT: "instance": true, +// CHECK-NEXT: "variadic": true, +// CHECK-NEXT: "inner": [ +// CHECK-NEXT: { +// CHECK-NEXT: "id": "0x{{.*}}", +// CHECK-NEXT: "kind": "ImplicitParamDecl", +// CHECK-NEXT: "loc": {}, +// CHECK-NEXT: "range": { +// CHECK-NEXT: "begin": {}, +// CHECK-NEXT: "end": {} +// CHECK-NEXT: }, +// CHECK-NEXT: "isImplicit": true, +// CHECK-NEXT: "name": "self", +// CHECK-NEXT: "type": { +// CHECK-NEXT: "qualType": "testObjCMethodDecl *" +// CHECK-NEXT: } +// CHECK-NEXT: }, +// CHECK-NEXT: { +// CHECK-NEXT: "id": "0x{{.*}}", +// CHECK-NEXT: "kind": "ImplicitParamDecl", +// CHECK-NEXT: "loc": {}, +// CHECK-NEXT: "range": { +// CHECK-NEXT: "begin": {}, +// CHECK-NEXT: "end": {} +// CHECK-NEXT: }, +// CHECK-NEXT: "isImplicit": true, +// CHECK-NEXT: "name": "_cmd", +// CHECK-NEXT: "type": { +// CHECK-NEXT: "desugaredQualType": "SEL *", +// CHECK-NEXT: "qualType": "SEL" +// CHECK-NEXT: } +// CHECK-NEXT: }, +// CHECK-NEXT: { +// CHECK-NEXT: "id": "0x{{.*}}", +// CHECK-NEXT: "kind": "ParmVarDecl", +// CHECK-NEXT: "loc": { +// CHECK-NEXT: "col": 34, +// CHECK-NEXT: "file": "{{.*}}", +// CHECK-NEXT: "line": 27 +// CHECK-NEXT: }, +// CHECK-NEXT: "range": { +// CHECK-NEXT: "begin": { +// CHECK-NEXT: "col": 30, +// CHECK-NEXT: "file": "{{.*}}", +// CHECK-NEXT: "line": 27 +// CHECK-NEXT: }, +// CHECK-NEXT: "end": { +// CHECK-NEXT: "col": 34, +// CHECK-NEXT: "file": "{{.*}}", +// CHECK-NEXT: "line": 27 +// CHECK-NEXT: } +// CHECK-NEXT: }, +// CHECK-NEXT: "name": "i", +// CHECK-NEXT: "type": { +// CHECK-NEXT: "qualType": "int" +// CHECK-NEXT: } +// CHECK-NEXT: }, +// CHECK-NEXT: { +// CHECK-NEXT: "id": "0x{{.*}}", +// CHECK-NEXT: "kind": "CompoundStmt", +// CHECK-NEXT: "range": { +// CHECK-NEXT: "begin": { +// CHECK-NEXT: "col": 41, +// CHECK-NEXT: "file": "{{.*}}", +// CHECK-NEXT: "line": 27 +// CHECK-NEXT: }, +// CHECK-NEXT: "end": { +// CHECK-NEXT: "col": 1, +// CHECK-NEXT: "file": "{{.*}}", +// CHECK-NEXT: "line": 29 +// CHECK-NEXT: } +// CHECK-NEXT: }, +// CHECK-NEXT: "inner": [ +// CHECK-NEXT: { +// CHECK-NEXT: "id": "0x{{.*}}", +// CHECK-NEXT: "kind": "ReturnStmt", +// CHECK-NEXT: "range": { +// CHECK-NEXT: "begin": { +// CHECK-NEXT: "col": 3, +// CHECK-NEXT: "file": "{{.*}}", +// CHECK-NEXT: "line": 28 +// CHECK-NEXT: }, +// CHECK-NEXT: "end": { +// CHECK-NEXT: "col": 10, +// CHECK-NEXT: "file": "{{.*}}", +// CHECK-NEXT: "line": 28 +// CHECK-NEXT: } +// CHECK-NEXT: }, +// CHECK-NEXT: "inner": [ +// CHECK-NEXT: { +// CHECK-NEXT: "id": "0x{{.*}}", +// CHECK-NEXT: "kind": "IntegerLiteral", +// CHECK-NEXT: "range": { +// CHECK-NEXT: "begin": { +// CHECK-NEXT: "col": 10, +// CHECK-NEXT: "file": "{{.*}}", +// CHECK-NEXT: "line": 28 +// CHECK-NEXT: }, +// CHECK-NEXT: "end": { +// CHECK-NEXT: "col": 10, +// CHECK-NEXT: "file": "{{.*}}", +// CHECK-NEXT: "line": 28 +// CHECK-NEXT: } +// CHECK-NEXT: }, +// CHECK-NEXT: "type": { +// CHECK-NEXT: "qualType": "int" +// CHECK-NEXT: }, +// CHECK-NEXT: "valueCategory": "rvalue", +// CHECK-NEXT: "value": "0" +// CHECK-NEXT: } +// CHECK-NEXT: ] +// CHECK-NEXT: } +// CHECK-NEXT: ] +// CHECK-NEXT: } +// CHECK-NEXT: ] +// CHECK-NEXT: } + + +// CHECK: "kind": "ObjCProtocolDecl", +// CHECK-NEXT: "loc": { +// CHECK-NEXT: "col": 11, +// CHECK-NEXT: "file": "{{.*}}", +// CHECK-NEXT: "line": 32 +// CHECK-NEXT: }, +// CHECK-NEXT: "range": { +// CHECK-NEXT: "begin": { +// CHECK-NEXT: "col": 1, +// CHECK-NEXT: "file": "{{.*}}", +// CHECK-NEXT: "line": 32 +// CHECK-NEXT: }, +// CHECK-NEXT: "end": { +// CHECK-NEXT: "col": 2, +// CHECK-NEXT: "file": "{{.*}}", +// CHECK-NEXT: "line": 34 +// CHECK-NEXT: } +// CHECK-NEXT: }, +// CHECK-NEXT: "name": "TestObjCProtocolDecl", +// CHECK-NEXT: "inner": [ +// CHECK-NEXT: { +// CHECK-NEXT: "id": "0x{{.*}}", +// CHECK-NEXT: "kind": "ObjCMethodDecl", +// CHECK-NEXT: "loc": { +// CHECK-NEXT: "col": 1, +// CHECK-NEXT: "file": "{{.*}}", +// CHECK-NEXT: "line": 33 +// CHECK-NEXT: }, +// CHECK-NEXT: "range": { +// CHECK-NEXT: "begin": { +// CHECK-NEXT: "col": 1, +// CHECK-NEXT: "file": "{{.*}}", +// CHECK-NEXT: "line": 33 +// CHECK-NEXT: }, +// CHECK-NEXT: "end": { +// CHECK-NEXT: "col": 13, +// CHECK-NEXT: "file": "{{.*}}", +// CHECK-NEXT: "line": 33 +// CHECK-NEXT: } +// CHECK-NEXT: }, +// CHECK-NEXT: "name": "foo", +// CHECK-NEXT: "returnType": { +// CHECK-NEXT: "qualType": "void" +// CHECK-NEXT: }, +// CHECK-NEXT: "instance": true +// CHECK-NEXT: } +// CHECK-NEXT: ] +// CHECK-NEXT: } + + +// CHECK: "kind": "ObjCInterfaceDecl", +// CHECK-NEXT: "loc": { +// CHECK-NEXT: "col": 12, +// CHECK-NEXT: "file": "{{.*}}", +// CHECK-NEXT: "line": 36 +// CHECK-NEXT: }, +// CHECK-NEXT: "range": { +// CHECK-NEXT: "begin": { +// CHECK-NEXT: "col": 1, +// CHECK-NEXT: "file": "{{.*}}", +// CHECK-NEXT: "line": 36 +// CHECK-NEXT: }, +// CHECK-NEXT: "end": { +// CHECK-NEXT: "col": 2, +// CHECK-NEXT: "file": "{{.*}}", +// CHECK-NEXT: "line": 38 +// CHECK-NEXT: } +// CHECK-NEXT: }, +// CHECK-NEXT: "name": "TestObjCClass", +// CHECK-NEXT: "super": { +// CHECK-NEXT: "id": "0x{{.*}}", +// CHECK-NEXT: "kind": "ObjCInterfaceDecl", +// CHECK-NEXT: "name": "A" +// CHECK-NEXT: }, +// CHECK-NEXT: "implementation": { +// CHECK-NEXT: "id": "0x{{.*}}", +// CHECK-NEXT: "kind": "ObjCImplementationDecl", +// CHECK-NEXT: "name": "TestObjCClass" +// CHECK-NEXT: }, +// CHECK-NEXT: "protocols": [ +// CHECK-NEXT: { +// CHECK-NEXT: "id": "0x{{.*}}", +// CHECK-NEXT: "kind": "ObjCProtocolDecl", +// CHECK-NEXT: "name": "P" +// CHECK-NEXT: } +// CHECK-NEXT: ], +// CHECK-NEXT: "inner": [ +// CHECK-NEXT: { +// CHECK-NEXT: "id": "0x{{.*}}", +// CHECK-NEXT: "kind": "ObjCMethodDecl", +// CHECK-NEXT: "loc": { +// CHECK-NEXT: "col": 1, +// CHECK-NEXT: "file": "{{.*}}", +// CHECK-NEXT: "line": 37 +// CHECK-NEXT: }, +// CHECK-NEXT: "range": { +// CHECK-NEXT: "begin": { +// CHECK-NEXT: "col": 1, +// CHECK-NEXT: "file": "{{.*}}", +// CHECK-NEXT: "line": 37 +// CHECK-NEXT: }, +// CHECK-NEXT: "end": { +// CHECK-NEXT: "col": 13, +// CHECK-NEXT: "file": "{{.*}}", +// CHECK-NEXT: "line": 37 +// CHECK-NEXT: } +// CHECK-NEXT: }, +// CHECK-NEXT: "name": "foo", +// CHECK-NEXT: "returnType": { +// CHECK-NEXT: "qualType": "void" +// CHECK-NEXT: }, +// CHECK-NEXT: "instance": true +// CHECK-NEXT: } +// CHECK-NEXT: ] +// CHECK-NEXT: } + + +// CHECK: "kind": "ObjCImplementationDecl", +// CHECK-NEXT: "loc": { +// CHECK-NEXT: "col": 17, +// CHECK-NEXT: "file": "{{.*}}", +// CHECK-NEXT: "line": 40 +// CHECK-NEXT: }, +// CHECK-NEXT: "range": { +// CHECK-NEXT: "begin": { +// CHECK-NEXT: "col": 1, +// CHECK-NEXT: "file": "{{.*}}", +// CHECK-NEXT: "line": 40 +// CHECK-NEXT: }, +// CHECK-NEXT: "end": { +// CHECK-NEXT: "col": 1, +// CHECK-NEXT: "file": "{{.*}}", +// CHECK-NEXT: "line": 45 +// CHECK-NEXT: } +// CHECK-NEXT: }, +// CHECK-NEXT: "name": "TestObjCClass", +// CHECK-NEXT: "super": { +// CHECK-NEXT: "id": "0x{{.*}}", +// CHECK-NEXT: "kind": "ObjCInterfaceDecl", +// CHECK-NEXT: "name": "A" +// CHECK-NEXT: }, +// CHECK-NEXT: "interface": { +// CHECK-NEXT: "id": "0x{{.*}}", +// CHECK-NEXT: "kind": "ObjCInterfaceDecl", +// CHECK-NEXT: "name": "TestObjCClass" +// CHECK-NEXT: }, +// CHECK-NEXT: "inner": [ +// CHECK-NEXT: { +// CHECK-NEXT: "id": "0x{{.*}}", +// CHECK-NEXT: "kind": "ObjCIvarDecl", +// CHECK-NEXT: "loc": { +// CHECK-NEXT: "col": 7, +// CHECK-NEXT: "file": "{{.*}}", +// CHECK-NEXT: "line": 41 +// CHECK-NEXT: }, +// CHECK-NEXT: "range": { +// CHECK-NEXT: "begin": { +// CHECK-NEXT: "col": 3, +// CHECK-NEXT: "file": "{{.*}}", +// CHECK-NEXT: "line": 41 +// CHECK-NEXT: }, +// CHECK-NEXT: "end": { +// CHECK-NEXT: "col": 7, +// CHECK-NEXT: "file": "{{.*}}", +// CHECK-NEXT: "line": 41 +// CHECK-NEXT: } +// CHECK-NEXT: }, +// CHECK-NEXT: "name": "i", +// CHECK-NEXT: "type": { +// CHECK-NEXT: "qualType": "int" +// CHECK-NEXT: }, +// CHECK-NEXT: "access": "private" +// CHECK-NEXT: }, +// CHECK-NEXT: { +// CHECK-NEXT: "id": "0x{{.*}}", +// CHECK-NEXT: "kind": "ObjCMethodDecl", +// CHECK-NEXT: "loc": { +// CHECK-NEXT: "col": 1, +// CHECK-NEXT: "file": "{{.*}}", +// CHECK-NEXT: "line": 43 +// CHECK-NEXT: }, +// CHECK-NEXT: "range": { +// CHECK-NEXT: "begin": { +// CHECK-NEXT: "col": 1, +// CHECK-NEXT: "file": "{{.*}}", +// CHECK-NEXT: "line": 43 +// CHECK-NEXT: }, +// CHECK-NEXT: "end": { +// CHECK-NEXT: "col": 1, +// CHECK-NEXT: "file": "{{.*}}", +// CHECK-NEXT: "line": 44 +// CHECK-NEXT: } +// CHECK-NEXT: }, +// CHECK-NEXT: "name": "foo", +// CHECK-NEXT: "returnType": { +// CHECK-NEXT: "qualType": "void" +// CHECK-NEXT: }, +// CHECK-NEXT: "instance": true, +// CHECK-NEXT: "inner": [ +// CHECK-NEXT: { +// CHECK-NEXT: "id": "0x{{.*}}", +// CHECK-NEXT: "kind": "ImplicitParamDecl", +// CHECK-NEXT: "loc": {}, +// CHECK-NEXT: "range": { +// CHECK-NEXT: "begin": {}, +// CHECK-NEXT: "end": {} +// CHECK-NEXT: }, +// CHECK-NEXT: "isImplicit": true, +// CHECK-NEXT: "name": "self", +// CHECK-NEXT: "type": { +// CHECK-NEXT: "qualType": "TestObjCClass *" +// CHECK-NEXT: } +// CHECK-NEXT: }, +// CHECK-NEXT: { +// CHECK-NEXT: "id": "0x{{.*}}", +// CHECK-NEXT: "kind": "ImplicitParamDecl", +// CHECK-NEXT: "loc": {}, +// CHECK-NEXT: "range": { +// CHECK-NEXT: "begin": {}, +// CHECK-NEXT: "end": {} +// CHECK-NEXT: }, +// CHECK-NEXT: "isImplicit": true, +// CHECK-NEXT: "name": "_cmd", +// CHECK-NEXT: "type": { +// CHECK-NEXT: "desugaredQualType": "SEL *", +// CHECK-NEXT: "qualType": "SEL" +// CHECK-NEXT: } +// CHECK-NEXT: }, +// CHECK-NEXT: { +// CHECK-NEXT: "id": "0x{{.*}}", +// CHECK-NEXT: "kind": "CompoundStmt", +// CHECK-NEXT: "range": { +// CHECK-NEXT: "begin": { +// CHECK-NEXT: "col": 14, +// CHECK-NEXT: "file": "{{.*}}", +// CHECK-NEXT: "line": 43 +// CHECK-NEXT: }, +// CHECK-NEXT: "end": { +// CHECK-NEXT: "col": 1, +// CHECK-NEXT: "file": "{{.*}}", +// CHECK-NEXT: "line": 44 +// CHECK-NEXT: } +// CHECK-NEXT: } +// CHECK-NEXT: } +// CHECK-NEXT: ] +// CHECK-NEXT: } +// CHECK-NEXT: ] +// CHECK-NEXT: } + + +// CHECK: "kind": "ObjCCategoryDecl", +// CHECK-NEXT: "loc": { +// CHECK-NEXT: "col": 12, +// CHECK-NEXT: "file": "{{.*}}", +// CHECK-NEXT: "line": 47 +// CHECK-NEXT: }, +// CHECK-NEXT: "range": { +// CHECK-NEXT: "begin": { +// CHECK-NEXT: "col": 1, +// CHECK-NEXT: "file": "{{.*}}", +// CHECK-NEXT: "line": 47 +// CHECK-NEXT: }, +// CHECK-NEXT: "end": { +// CHECK-NEXT: "col": 2, +// CHECK-NEXT: "file": "{{.*}}", +// CHECK-NEXT: "line": 49 +// CHECK-NEXT: } +// CHECK-NEXT: }, +// CHECK-NEXT: "name": "TestObjCCategoryDecl", +// CHECK-NEXT: "interface": { +// CHECK-NEXT: "id": "0x{{.*}}", +// CHECK-NEXT: "kind": "ObjCInterfaceDecl", +// CHECK-NEXT: "name": "TestObjCClass" +// CHECK-NEXT: }, +// CHECK-NEXT: "implementation": { +// CHECK-NEXT: "id": "0x{{.*}}", +// CHECK-NEXT: "kind": "ObjCCategoryImplDecl", +// CHECK-NEXT: "name": "TestObjCCategoryDecl" +// CHECK-NEXT: }, +// CHECK-NEXT: "protocols": [ +// CHECK-NEXT: { +// CHECK-NEXT: "id": "0x{{.*}}", +// CHECK-NEXT: "kind": "ObjCProtocolDecl", +// CHECK-NEXT: "name": "P" +// CHECK-NEXT: } +// CHECK-NEXT: ], +// CHECK-NEXT: "inner": [ +// CHECK-NEXT: { +// CHECK-NEXT: "id": "0x{{.*}}", +// CHECK-NEXT: "kind": "ObjCMethodDecl", +// CHECK-NEXT: "loc": { +// CHECK-NEXT: "col": 1, +// CHECK-NEXT: "file": "{{.*}}", +// CHECK-NEXT: "line": 48 +// CHECK-NEXT: }, +// CHECK-NEXT: "range": { +// CHECK-NEXT: "begin": { +// CHECK-NEXT: "col": 1, +// CHECK-NEXT: "file": "{{.*}}", +// CHECK-NEXT: "line": 48 +// CHECK-NEXT: }, +// CHECK-NEXT: "end": { +// CHECK-NEXT: "col": 13, +// CHECK-NEXT: "file": "{{.*}}", +// CHECK-NEXT: "line": 48 +// CHECK-NEXT: } +// CHECK-NEXT: }, +// CHECK-NEXT: "name": "bar", +// CHECK-NEXT: "returnType": { +// CHECK-NEXT: "qualType": "void" +// CHECK-NEXT: }, +// CHECK-NEXT: "instance": true +// CHECK-NEXT: } +// CHECK-NEXT: ] +// CHECK-NEXT: } + + +// CHECK: "kind": "ObjCInterfaceDecl", +// CHECK-NEXT: "loc": { +// CHECK-NEXT: "col": 12, +// CHECK-NEXT: "file": "{{.*}}", +// CHECK-NEXT: "line": 51 +// CHECK-NEXT: }, +// CHECK-NEXT: "range": { +// CHECK-NEXT: "begin": { +// CHECK-NEXT: "col": 1, +// CHECK-NEXT: "file": "{{.*}}", +// CHECK-NEXT: "line": 51 +// CHECK-NEXT: }, +// CHECK-NEXT: "end": { +// CHECK-NEXT: "col": 2, +// CHECK-NEXT: "file": "{{.*}}", +// CHECK-NEXT: "line": 53 +// CHECK-NEXT: } +// CHECK-NEXT: }, +// CHECK-NEXT: "name": "TestGenericInterface", +// CHECK-NEXT: "super": { +// CHECK-NEXT: "id": "0x{{.*}}", +// CHECK-NEXT: "kind": "ObjCInterfaceDecl", +// CHECK-NEXT: "name": "A" +// CHECK-NEXT: }, +// CHECK-NEXT: "implementation": { +// CHECK-NEXT: "id": "0x{{.*}}" +// CHECK-NEXT: }, +// CHECK-NEXT: "protocols": [ +// CHECK-NEXT: { +// CHECK-NEXT: "id": "0x{{.*}}", +// CHECK-NEXT: "kind": "ObjCProtocolDecl", +// CHECK-NEXT: "name": "P" +// CHECK-NEXT: } +// CHECK-NEXT: ], +// CHECK-NEXT: "inner": [ +// CHECK-NEXT: { +// CHECK-NEXT: "id": "0x{{.*}}", +// CHECK-NEXT: "kind": "ObjCTypeParamDecl", +// CHECK-NEXT: "loc": { +// CHECK-NEXT: "col": 33, +// CHECK-NEXT: "file": "{{.*}}", +// CHECK-NEXT: "line": 51 +// CHECK-NEXT: }, +// CHECK-NEXT: "range": { +// CHECK-NEXT: "begin": { +// CHECK-NEXT: "col": 33, +// CHECK-NEXT: "file": "{{.*}}", +// CHECK-NEXT: "line": 51 +// CHECK-NEXT: }, +// CHECK-NEXT: "end": { +// CHECK-NEXT: "col": 33, +// CHECK-NEXT: "file": "{{.*}}", +// CHECK-NEXT: "line": 51 +// CHECK-NEXT: } +// CHECK-NEXT: }, +// CHECK-NEXT: "name": "T", +// CHECK-NEXT: "type": { +// CHECK-NEXT: "desugaredQualType": "id", +// CHECK-NEXT: "qualType": "id" +// CHECK-NEXT: } +// CHECK-NEXT: } +// CHECK-NEXT: ] +// CHECK-NEXT: } + + +// CHECK: "kind": "ObjCCategoryImplDecl", +// CHECK-NEXT: "loc": { +// CHECK-NEXT: "col": 17, +// CHECK-NEXT: "file": "{{.*}}", +// CHECK-NEXT: "line": 55 +// CHECK-NEXT: }, +// CHECK-NEXT: "range": { +// CHECK-NEXT: "begin": { +// CHECK-NEXT: "col": 1, +// CHECK-NEXT: "file": "{{.*}}", +// CHECK-NEXT: "line": 55 +// CHECK-NEXT: }, +// CHECK-NEXT: "end": { +// CHECK-NEXT: "col": 1, +// CHECK-NEXT: "file": "{{.*}}", +// CHECK-NEXT: "line": 58 +// CHECK-NEXT: } +// CHECK-NEXT: }, +// CHECK-NEXT: "name": "TestObjCCategoryDecl", +// CHECK-NEXT: "interface": { +// CHECK-NEXT: "id": "0x{{.*}}", +// CHECK-NEXT: "kind": "ObjCInterfaceDecl", +// CHECK-NEXT: "name": "TestObjCClass" +// CHECK-NEXT: }, +// CHECK-NEXT: "categoryDecl": { +// CHECK-NEXT: "id": "0x{{.*}}", +// CHECK-NEXT: "kind": "ObjCCategoryDecl", +// CHECK-NEXT: "name": "TestObjCCategoryDecl" +// CHECK-NEXT: }, +// CHECK-NEXT: "inner": [ +// CHECK-NEXT: { +// CHECK-NEXT: "id": "0x{{.*}}", +// CHECK-NEXT: "kind": "ObjCMethodDecl", +// CHECK-NEXT: "loc": { +// CHECK-NEXT: "col": 1, +// CHECK-NEXT: "file": "{{.*}}", +// CHECK-NEXT: "line": 56 +// CHECK-NEXT: }, +// CHECK-NEXT: "range": { +// CHECK-NEXT: "begin": { +// CHECK-NEXT: "col": 1, +// CHECK-NEXT: "file": "{{.*}}", +// CHECK-NEXT: "line": 56 +// CHECK-NEXT: }, +// CHECK-NEXT: "end": { +// CHECK-NEXT: "col": 1, +// CHECK-NEXT: "file": "{{.*}}", +// CHECK-NEXT: "line": 57 +// CHECK-NEXT: } +// CHECK-NEXT: }, +// CHECK-NEXT: "name": "bar", +// CHECK-NEXT: "returnType": { +// CHECK-NEXT: "qualType": "void" +// CHECK-NEXT: }, +// CHECK-NEXT: "instance": true, +// CHECK-NEXT: "inner": [ +// CHECK-NEXT: { +// CHECK-NEXT: "id": "0x{{.*}}", +// CHECK-NEXT: "kind": "ImplicitParamDecl", +// CHECK-NEXT: "loc": {}, +// CHECK-NEXT: "range": { +// CHECK-NEXT: "begin": {}, +// CHECK-NEXT: "end": {} +// CHECK-NEXT: }, +// CHECK-NEXT: "isImplicit": true, +// CHECK-NEXT: "name": "self", +// CHECK-NEXT: "type": { +// CHECK-NEXT: "qualType": "TestObjCClass *" +// CHECK-NEXT: } +// CHECK-NEXT: }, +// CHECK-NEXT: { +// CHECK-NEXT: "id": "0x{{.*}}", +// CHECK-NEXT: "kind": "ImplicitParamDecl", +// CHECK-NEXT: "loc": {}, +// CHECK-NEXT: "range": { +// CHECK-NEXT: "begin": {}, +// CHECK-NEXT: "end": {} +// CHECK-NEXT: }, +// CHECK-NEXT: "isImplicit": true, +// CHECK-NEXT: "name": "_cmd", +// CHECK-NEXT: "type": { +// CHECK-NEXT: "desugaredQualType": "SEL *", +// CHECK-NEXT: "qualType": "SEL" +// CHECK-NEXT: } +// CHECK-NEXT: }, +// CHECK-NEXT: { +// CHECK-NEXT: "id": "0x{{.*}}", +// CHECK-NEXT: "kind": "CompoundStmt", +// CHECK-NEXT: "range": { +// CHECK-NEXT: "begin": { +// CHECK-NEXT: "col": 14, +// CHECK-NEXT: "file": "{{.*}}", +// CHECK-NEXT: "line": 56 +// CHECK-NEXT: }, +// CHECK-NEXT: "end": { +// CHECK-NEXT: "col": 1, +// CHECK-NEXT: "file": "{{.*}}", +// CHECK-NEXT: "line": 57 +// CHECK-NEXT: } +// CHECK-NEXT: } +// CHECK-NEXT: } +// CHECK-NEXT: ] +// CHECK-NEXT: } +// CHECK-NEXT: ] +// CHECK-NEXT: } + + +// CHECK: "kind": "ObjCCompatibleAliasDecl", +// CHECK-NEXT: "loc": { +// CHECK-NEXT: "col": 1, +// CHECK-NEXT: "file": "{{.*}}", +// CHECK-NEXT: "line": 60 +// CHECK-NEXT: }, +// CHECK-NEXT: "range": { +// CHECK-NEXT: "begin": { +// CHECK-NEXT: "col": 1, +// CHECK-NEXT: "file": "{{.*}}", +// CHECK-NEXT: "line": 60 +// CHECK-NEXT: }, +// CHECK-NEXT: "end": { +// CHECK-NEXT: "col": 1, +// CHECK-NEXT: "file": "{{.*}}", +// CHECK-NEXT: "line": 60 +// CHECK-NEXT: } +// CHECK-NEXT: }, +// CHECK-NEXT: "name": "TestObjCCompatibleAliasDecl", +// CHECK-NEXT: "interface": { +// CHECK-NEXT: "id": "0x{{.*}}", +// CHECK-NEXT: "kind": "ObjCInterfaceDecl", +// CHECK-NEXT: "name": "A" +// CHECK-NEXT: } +// CHECK-NEXT: } + + +// CHECK: "kind": "ObjCInterfaceDecl", +// CHECK-NEXT: "loc": { +// CHECK-NEXT: "col": 12, +// CHECK-NEXT: "file": "{{.*}}", +// CHECK-NEXT: "line": 62 +// CHECK-NEXT: }, +// CHECK-NEXT: "range": { +// CHECK-NEXT: "begin": { +// CHECK-NEXT: "col": 1, +// CHECK-NEXT: "file": "{{.*}}", +// CHECK-NEXT: "line": 62 +// CHECK-NEXT: }, +// CHECK-NEXT: "end": { +// CHECK-NEXT: "col": 2, +// CHECK-NEXT: "file": "{{.*}}", +// CHECK-NEXT: "line": 65 +// CHECK-NEXT: } +// CHECK-NEXT: }, +// CHECK-NEXT: "name": "TestObjCProperty", +// CHECK-NEXT: "super": { +// CHECK-NEXT: "id": "0x{{.*}}", +// CHECK-NEXT: "kind": "ObjCInterfaceDecl", +// CHECK-NEXT: "name": "A" +// CHECK-NEXT: }, +// CHECK-NEXT: "implementation": { +// CHECK-NEXT: "id": "0x{{.*}}", +// CHECK-NEXT: "kind": "ObjCImplementationDecl", +// CHECK-NEXT: "name": "TestObjCProperty" +// CHECK-NEXT: }, +// CHECK-NEXT: "inner": [ +// CHECK-NEXT: { +// CHECK-NEXT: "id": "0x{{.*}}", +// CHECK-NEXT: "kind": "ObjCPropertyDecl", +// CHECK-NEXT: "loc": { +// CHECK-NEXT: "col": 52, +// CHECK-NEXT: "file": "{{.*}}", +// CHECK-NEXT: "line": 63 +// CHECK-NEXT: }, +// CHECK-NEXT: "range": { +// CHECK-NEXT: "begin": { +// CHECK-NEXT: "col": 1, +// CHECK-NEXT: "file": "{{.*}}", +// CHECK-NEXT: "line": 63 +// CHECK-NEXT: }, +// CHECK-NEXT: "end": { +// CHECK-NEXT: "col": 52, +// CHECK-NEXT: "file": "{{.*}}", +// CHECK-NEXT: "line": 63 +// CHECK-NEXT: } +// CHECK-NEXT: }, +// CHECK-NEXT: "name": "foo", +// CHECK-NEXT: "type": { +// CHECK-NEXT: "qualType": "int" +// CHECK-NEXT: }, +// CHECK-NEXT: "getter": { +// CHECK-NEXT: "id": "0x{{.*}}", +// CHECK-NEXT: "kind": "ObjCMethodDecl", +// CHECK-NEXT: "name": "getterFoo" +// CHECK-NEXT: }, +// CHECK-NEXT: "setter": { +// CHECK-NEXT: "id": "0x{{.*}}", +// CHECK-NEXT: "kind": "ObjCMethodDecl", +// CHECK-NEXT: "name": "setterFoo:" +// CHECK-NEXT: }, +// CHECK-NEXT: "assign": true, +// CHECK-NEXT: "readwrite": true, +// CHECK-NEXT: "atomic": true, +// CHECK-NEXT: "unsafe_unretained": true +// CHECK-NEXT: }, +// CHECK-NEXT: { +// CHECK-NEXT: "id": "0x{{.*}}", +// CHECK-NEXT: "kind": "ObjCPropertyDecl", +// CHECK-NEXT: "loc": { +// CHECK-NEXT: "col": 15, +// CHECK-NEXT: "file": "{{.*}}", +// CHECK-NEXT: "line": 64 +// CHECK-NEXT: }, +// CHECK-NEXT: "range": { +// CHECK-NEXT: "begin": { +// CHECK-NEXT: "col": 1, +// CHECK-NEXT: "file": "{{.*}}", +// CHECK-NEXT: "line": 64 +// CHECK-NEXT: }, +// CHECK-NEXT: "end": { +// CHECK-NEXT: "col": 15, +// CHECK-NEXT: "file": "{{.*}}", +// CHECK-NEXT: "line": 64 +// CHECK-NEXT: } +// CHECK-NEXT: }, +// CHECK-NEXT: "name": "bar", +// CHECK-NEXT: "type": { +// CHECK-NEXT: "qualType": "int" +// CHECK-NEXT: }, +// CHECK-NEXT: "assign": true, +// CHECK-NEXT: "readwrite": true, +// CHECK-NEXT: "atomic": true, +// CHECK-NEXT: "unsafe_unretained": true +// CHECK-NEXT: }, +// CHECK-NEXT: { +// CHECK-NEXT: "id": "0x{{.*}}", +// CHECK-NEXT: "kind": "ObjCMethodDecl", +// CHECK-NEXT: "loc": { +// CHECK-NEXT: "col": 52, +// CHECK-NEXT: "file": "{{.*}}", +// CHECK-NEXT: "line": 63 +// CHECK-NEXT: }, +// CHECK-NEXT: "range": { +// CHECK-NEXT: "begin": { +// CHECK-NEXT: "col": 52, +// CHECK-NEXT: "file": "{{.*}}", +// CHECK-NEXT: "line": 63 +// CHECK-NEXT: }, +// CHECK-NEXT: "end": { +// CHECK-NEXT: "col": 52, +// CHECK-NEXT: "file": "{{.*}}", +// CHECK-NEXT: "line": 63 +// CHECK-NEXT: } +// CHECK-NEXT: }, +// CHECK-NEXT: "isImplicit": true, +// CHECK-NEXT: "name": "getterFoo", +// CHECK-NEXT: "returnType": { +// CHECK-NEXT: "qualType": "int" +// CHECK-NEXT: }, +// CHECK-NEXT: "instance": true +// CHECK-NEXT: }, +// CHECK-NEXT: { +// CHECK-NEXT: "id": "0x{{.*}}", +// CHECK-NEXT: "kind": "ObjCMethodDecl", +// CHECK-NEXT: "loc": { +// CHECK-NEXT: "col": 52, +// CHECK-NEXT: "file": "{{.*}}", +// CHECK-NEXT: "line": 63 +// CHECK-NEXT: }, +// CHECK-NEXT: "range": { +// CHECK-NEXT: "begin": { +// CHECK-NEXT: "col": 52, +// CHECK-NEXT: "file": "{{.*}}", +// CHECK-NEXT: "line": 63 +// CHECK-NEXT: }, +// CHECK-NEXT: "end": { +// CHECK-NEXT: "col": 52, +// CHECK-NEXT: "file": "{{.*}}", +// CHECK-NEXT: "line": 63 +// CHECK-NEXT: } +// CHECK-NEXT: }, +// CHECK-NEXT: "isImplicit": true, +// CHECK-NEXT: "name": "setterFoo:", +// CHECK-NEXT: "returnType": { +// CHECK-NEXT: "qualType": "void" +// CHECK-NEXT: }, +// CHECK-NEXT: "instance": true, +// CHECK-NEXT: "inner": [ +// CHECK-NEXT: { +// CHECK-NEXT: "id": "0x{{.*}}", +// CHECK-NEXT: "kind": "ParmVarDecl", +// CHECK-NEXT: "loc": { +// CHECK-NEXT: "col": 52, +// CHECK-NEXT: "file": "{{.*}}", +// CHECK-NEXT: "line": 63 +// CHECK-NEXT: }, +// CHECK-NEXT: "range": { +// CHECK-NEXT: "begin": { +// CHECK-NEXT: "col": 52, +// CHECK-NEXT: "file": "{{.*}}", +// CHECK-NEXT: "line": 63 +// CHECK-NEXT: }, +// CHECK-NEXT: "end": { +// CHECK-NEXT: "col": 52, +// CHECK-NEXT: "file": "{{.*}}", +// CHECK-NEXT: "line": 63 +// CHECK-NEXT: } +// CHECK-NEXT: }, +// CHECK-NEXT: "name": "foo", +// CHECK-NEXT: "type": { +// CHECK-NEXT: "qualType": "int" +// CHECK-NEXT: } +// CHECK-NEXT: } +// CHECK-NEXT: ] +// CHECK-NEXT: }, +// CHECK-NEXT: { +// CHECK-NEXT: "id": "0x{{.*}}", +// CHECK-NEXT: "kind": "ObjCMethodDecl", +// CHECK-NEXT: "loc": { +// CHECK-NEXT: "col": 15, +// CHECK-NEXT: "file": "{{.*}}", +// CHECK-NEXT: "line": 64 +// CHECK-NEXT: }, +// CHECK-NEXT: "range": { +// CHECK-NEXT: "begin": { +// CHECK-NEXT: "col": 15, +// CHECK-NEXT: "file": "{{.*}}", +// CHECK-NEXT: "line": 64 +// CHECK-NEXT: }, +// CHECK-NEXT: "end": { +// CHECK-NEXT: "col": 15, +// CHECK-NEXT: "file": "{{.*}}", +// CHECK-NEXT: "line": 64 +// CHECK-NEXT: } +// CHECK-NEXT: }, +// CHECK-NEXT: "isImplicit": true, +// CHECK-NEXT: "name": "bar", +// CHECK-NEXT: "returnType": { +// CHECK-NEXT: "qualType": "int" +// CHECK-NEXT: }, +// CHECK-NEXT: "instance": true +// CHECK-NEXT: }, +// CHECK-NEXT: { +// CHECK-NEXT: "id": "0x{{.*}}", +// CHECK-NEXT: "kind": "ObjCMethodDecl", +// CHECK-NEXT: "loc": { +// CHECK-NEXT: "col": 15, +// CHECK-NEXT: "file": "{{.*}}", +// CHECK-NEXT: "line": 64 +// CHECK-NEXT: }, +// CHECK-NEXT: "range": { +// CHECK-NEXT: "begin": { +// CHECK-NEXT: "col": 15, +// CHECK-NEXT: "file": "{{.*}}", +// CHECK-NEXT: "line": 64 +// CHECK-NEXT: }, +// CHECK-NEXT: "end": { +// CHECK-NEXT: "col": 15, +// CHECK-NEXT: "file": "{{.*}}", +// CHECK-NEXT: "line": 64 +// CHECK-NEXT: } +// CHECK-NEXT: }, +// CHECK-NEXT: "isImplicit": true, +// CHECK-NEXT: "name": "setBar:", +// CHECK-NEXT: "returnType": { +// CHECK-NEXT: "qualType": "void" +// CHECK-NEXT: }, +// CHECK-NEXT: "instance": true, +// CHECK-NEXT: "inner": [ +// CHECK-NEXT: { +// CHECK-NEXT: "id": "0x{{.*}}", +// CHECK-NEXT: "kind": "ParmVarDecl", +// CHECK-NEXT: "loc": { +// CHECK-NEXT: "col": 15, +// CHECK-NEXT: "file": "{{.*}}", +// CHECK-NEXT: "line": 64 +// CHECK-NEXT: }, +// CHECK-NEXT: "range": { +// CHECK-NEXT: "begin": { +// CHECK-NEXT: "col": 15, +// CHECK-NEXT: "file": "{{.*}}", +// CHECK-NEXT: "line": 64 +// CHECK-NEXT: }, +// CHECK-NEXT: "end": { +// CHECK-NEXT: "col": 15, +// CHECK-NEXT: "file": "{{.*}}", +// CHECK-NEXT: "line": 64 +// CHECK-NEXT: } +// CHECK-NEXT: }, +// CHECK-NEXT: "name": "bar", +// CHECK-NEXT: "type": { +// CHECK-NEXT: "qualType": "int" +// CHECK-NEXT: } +// CHECK-NEXT: } +// CHECK-NEXT: ] +// CHECK-NEXT: } +// CHECK-NEXT: ] +// CHECK-NEXT: } + + +// CHECK: "kind": "ObjCImplementationDecl", +// CHECK-NEXT: "loc": { +// CHECK-NEXT: "col": 17, +// CHECK-NEXT: "file": "{{.*}}", +// CHECK-NEXT: "line": 67 +// CHECK-NEXT: }, +// CHECK-NEXT: "range": { +// CHECK-NEXT: "begin": { +// CHECK-NEXT: "col": 1, +// CHECK-NEXT: "file": "{{.*}}", +// CHECK-NEXT: "line": 67 +// CHECK-NEXT: }, +// CHECK-NEXT: "end": { +// CHECK-NEXT: "col": 1, +// CHECK-NEXT: "file": "{{.*}}", +// CHECK-NEXT: "line": 72 +// CHECK-NEXT: } +// CHECK-NEXT: }, +// CHECK-NEXT: "name": "TestObjCProperty", +// CHECK-NEXT: "super": { +// CHECK-NEXT: "id": "0x{{.*}}" +// CHECK-NEXT: }, +// CHECK-NEXT: "interface": { +// CHECK-NEXT: "id": "0x{{.*}}", +// CHECK-NEXT: "kind": "ObjCInterfaceDecl", +// CHECK-NEXT: "name": "TestObjCProperty" +// CHECK-NEXT: }, +// CHECK-NEXT: "inner": [ +// CHECK-NEXT: { +// CHECK-NEXT: "id": "0x{{.*}}", +// CHECK-NEXT: "kind": "ObjCIvarDecl", +// CHECK-NEXT: "loc": { +// CHECK-NEXT: "col": 7, +// CHECK-NEXT: "file": "{{.*}}", +// CHECK-NEXT: "line": 68 +// CHECK-NEXT: }, +// CHECK-NEXT: "range": { +// CHECK-NEXT: "begin": { +// CHECK-NEXT: "col": 3, +// CHECK-NEXT: "file": "{{.*}}", +// CHECK-NEXT: "line": 68 +// CHECK-NEXT: }, +// CHECK-NEXT: "end": { +// CHECK-NEXT: "col": 7, +// CHECK-NEXT: "file": "{{.*}}", +// CHECK-NEXT: "line": 68 +// CHECK-NEXT: } +// CHECK-NEXT: }, +// CHECK-NEXT: "name": "i", +// CHECK-NEXT: "type": { +// CHECK-NEXT: "qualType": "int" +// CHECK-NEXT: }, +// CHECK-NEXT: "access": "private" +// CHECK-NEXT: }, +// CHECK-NEXT: { +// CHECK-NEXT: "id": "0x{{.*}}", +// CHECK-NEXT: "kind": "ObjCPropertyImplDecl", +// CHECK-NEXT: "loc": { +// CHECK-NEXT: "col": 13, +// CHECK-NEXT: "file": "{{.*}}", +// CHECK-NEXT: "line": 70 +// CHECK-NEXT: }, +// CHECK-NEXT: "range": { +// CHECK-NEXT: "begin": { +// CHECK-NEXT: "col": 1, +// CHECK-NEXT: "file": "{{.*}}", +// CHECK-NEXT: "line": 70 +// CHECK-NEXT: }, +// CHECK-NEXT: "end": { +// CHECK-NEXT: "col": 17, +// CHECK-NEXT: "file": "{{.*}}", +// CHECK-NEXT: "line": 70 +// CHECK-NEXT: } +// CHECK-NEXT: }, +// CHECK-NEXT: "name": "foo", +// CHECK-NEXT: "implKind": "synthesize", +// CHECK-NEXT: "propertyDecl": { +// CHECK-NEXT: "id": "0x{{.*}}", +// CHECK-NEXT: "kind": "ObjCPropertyDecl", +// CHECK-NEXT: "name": "foo" +// CHECK-NEXT: }, +// CHECK-NEXT: "ivarDecl": { +// CHECK-NEXT: "id": "0x{{.*}}", +// CHECK-NEXT: "kind": "ObjCIvarDecl", +// CHECK-NEXT: "name": "i", +// CHECK-NEXT: "type": { +// CHECK-NEXT: "qualType": "int" +// CHECK-NEXT: } +// CHECK-NEXT: } +// CHECK-NEXT: }, +// CHECK-NEXT: { +// CHECK-NEXT: "id": "0x{{.*}}", +// CHECK-NEXT: "kind": "ObjCIvarDecl", +// CHECK-NEXT: "loc": { +// CHECK-NEXT: "col": 13, +// CHECK-NEXT: "file": "{{.*}}", +// CHECK-NEXT: "line": 71 +// CHECK-NEXT: }, +// CHECK-NEXT: "range": { +// CHECK-NEXT: "begin": { +// CHECK-NEXT: "col": 13, +// CHECK-NEXT: "file": "{{.*}}", +// CHECK-NEXT: "line": 71 +// CHECK-NEXT: }, +// CHECK-NEXT: "end": { +// CHECK-NEXT: "col": 13, +// CHECK-NEXT: "file": "{{.*}}", +// CHECK-NEXT: "line": 71 +// CHECK-NEXT: } +// CHECK-NEXT: }, +// CHECK-NEXT: "name": "bar", +// CHECK-NEXT: "type": { +// CHECK-NEXT: "qualType": "int" +// CHECK-NEXT: }, +// CHECK-NEXT: "synthesized": true, +// CHECK-NEXT: "access": "private" +// CHECK-NEXT: }, +// CHECK-NEXT: { +// CHECK-NEXT: "id": "0x{{.*}}", +// CHECK-NEXT: "kind": "ObjCPropertyImplDecl", +// CHECK-NEXT: "loc": { +// CHECK-NEXT: "col": 13, +// CHECK-NEXT: "file": "{{.*}}", +// CHECK-NEXT: "line": 71 +// CHECK-NEXT: }, +// CHECK-NEXT: "range": { +// CHECK-NEXT: "begin": { +// CHECK-NEXT: "col": 1, +// CHECK-NEXT: "file": "{{.*}}", +// CHECK-NEXT: "line": 71 +// CHECK-NEXT: }, +// CHECK-NEXT: "end": { +// CHECK-NEXT: "col": 13, +// CHECK-NEXT: "file": "{{.*}}", +// CHECK-NEXT: "line": 71 +// CHECK-NEXT: } +// CHECK-NEXT: }, +// CHECK-NEXT: "name": "bar", +// CHECK-NEXT: "implKind": "synthesize", +// CHECK-NEXT: "propertyDecl": { +// CHECK-NEXT: "id": "0x{{.*}}", +// CHECK-NEXT: "kind": "ObjCPropertyDecl", +// CHECK-NEXT: "name": "bar" +// CHECK-NEXT: }, +// CHECK-NEXT: "ivarDecl": { +// CHECK-NEXT: "id": "0x{{.*}}", +// CHECK-NEXT: "kind": "ObjCIvarDecl", +// CHECK-NEXT: "name": "bar", +// CHECK-NEXT: "type": { +// CHECK-NEXT: "qualType": "int" +// CHECK-NEXT: } +// CHECK-NEXT: } +// CHECK-NEXT: } +// CHECK-NEXT: ] +// CHECK-NEXT: } + + +// CHECK: "kind": "FunctionDecl", +// CHECK-NEXT: "loc": { +// CHECK-NEXT: "col": 6, +// CHECK-NEXT: "file": "{{.*}}", +// CHECK-NEXT: "line": 74 +// CHECK-NEXT: }, +// CHECK-NEXT: "range": { +// CHECK-NEXT: "begin": { +// CHECK-NEXT: "col": 1, +// CHECK-NEXT: "file": "{{.*}}", +// CHECK-NEXT: "line": 74 +// CHECK-NEXT: }, +// CHECK-NEXT: "end": { +// CHECK-NEXT: "col": 1, +// CHECK-NEXT: "file": "{{.*}}", +// CHECK-NEXT: "line": 76 +// CHECK-NEXT: } +// CHECK-NEXT: }, +// CHECK-NEXT: "name": "TestBlockDecl", +// CHECK-NEXT: "type": { +// CHECK-NEXT: "qualType": "void (int)" +// CHECK-NEXT: }, +// CHECK-NEXT: "inner": [ +// CHECK-NEXT: { +// CHECK-NEXT: "id": "0x{{.*}}", +// CHECK-NEXT: "kind": "ParmVarDecl", +// CHECK-NEXT: "loc": { +// CHECK-NEXT: "col": 24, +// CHECK-NEXT: "file": "{{.*}}", +// CHECK-NEXT: "line": 74 +// CHECK-NEXT: }, +// CHECK-NEXT: "range": { +// CHECK-NEXT: "begin": { +// CHECK-NEXT: "col": 20, +// CHECK-NEXT: "file": "{{.*}}", +// CHECK-NEXT: "line": 74 +// CHECK-NEXT: }, +// CHECK-NEXT: "end": { +// CHECK-NEXT: "col": 24, +// CHECK-NEXT: "file": "{{.*}}", +// CHECK-NEXT: "line": 74 +// CHECK-NEXT: } +// CHECK-NEXT: }, +// CHECK-NEXT: "isUsed": true, +// CHECK-NEXT: "name": "x", +// CHECK-NEXT: "type": { +// CHECK-NEXT: "qualType": "int" +// CHECK-NEXT: } +// CHECK-NEXT: }, +// CHECK-NEXT: { +// CHECK-NEXT: "id": "0x{{.*}}", +// CHECK-NEXT: "kind": "CompoundStmt", +// CHECK-NEXT: "range": { +// CHECK-NEXT: "begin": { +// CHECK-NEXT: "col": 27, +// CHECK-NEXT: "file": "{{.*}}", +// CHECK-NEXT: "line": 74 +// CHECK-NEXT: }, +// CHECK-NEXT: "end": { +// CHECK-NEXT: "col": 1, +// CHECK-NEXT: "file": "{{.*}}", +// CHECK-NEXT: "line": 76 +// CHECK-NEXT: } +// CHECK-NEXT: }, +// CHECK-NEXT: "inner": [ +// CHECK-NEXT: { +// CHECK-NEXT: "id": "0x{{.*}}", +// CHECK-NEXT: "kind": "ExprWithCleanups", +// CHECK-NEXT: "range": { +// CHECK-NEXT: "begin": { +// CHECK-NEXT: "col": 3, +// CHECK-NEXT: "file": "{{.*}}", +// CHECK-NEXT: "line": 75 +// CHECK-NEXT: }, +// CHECK-NEXT: "end": { +// CHECK-NEXT: "col": 21, +// CHECK-NEXT: "file": "{{.*}}", +// CHECK-NEXT: "line": 75 +// CHECK-NEXT: } +// CHECK-NEXT: }, +// CHECK-NEXT: "type": { +// CHECK-NEXT: "qualType": "void (^)(int, ...)" +// CHECK-NEXT: }, +// CHECK-NEXT: "valueCategory": "rvalue", +// CHECK-NEXT: "inner": [ +// CHECK-NEXT: { +// CHECK-NEXT: "id": "0x{{.*}}", +// CHECK-NEXT: "kind": "BlockExpr", +// CHECK-NEXT: "range": { +// CHECK-NEXT: "begin": { +// CHECK-NEXT: "col": 3, +// CHECK-NEXT: "file": "{{.*}}", +// CHECK-NEXT: "line": 75 +// CHECK-NEXT: }, +// CHECK-NEXT: "end": { +// CHECK-NEXT: "col": 21, +// CHECK-NEXT: "file": "{{.*}}", +// CHECK-NEXT: "line": 75 +// CHECK-NEXT: } +// CHECK-NEXT: }, +// CHECK-NEXT: "type": { +// CHECK-NEXT: "qualType": "void (^)(int, ...)" +// CHECK-NEXT: }, +// CHECK-NEXT: "valueCategory": "rvalue", +// CHECK-NEXT: "inner": [ +// CHECK-NEXT: { +// CHECK-NEXT: "id": "0x{{.*}}", +// CHECK-NEXT: "kind": "BlockDecl", +// CHECK-NEXT: "loc": { +// CHECK-NEXT: "col": 3, +// CHECK-NEXT: "file": "{{.*}}", +// CHECK-NEXT: "line": 75 +// CHECK-NEXT: }, +// CHECK-NEXT: "range": { +// CHECK-NEXT: "begin": { +// CHECK-NEXT: "col": 3, +// CHECK-NEXT: "file": "{{.*}}", +// CHECK-NEXT: "line": 75 +// CHECK-NEXT: }, +// CHECK-NEXT: "end": { +// CHECK-NEXT: "col": 21, +// CHECK-NEXT: "file": "{{.*}}", +// CHECK-NEXT: "line": 75 +// CHECK-NEXT: } +// CHECK-NEXT: }, +// CHECK-NEXT: "variadic": true, +// CHECK-NEXT: "inner": [ +// CHECK-NEXT: { +// CHECK-NEXT: "id": "0x{{.*}}", +// CHECK-NEXT: "kind": "ParmVarDecl", +// CHECK-NEXT: "loc": { +// CHECK-NEXT: "col": 9, +// CHECK-NEXT: "file": "{{.*}}", +// CHECK-NEXT: "line": 75 +// CHECK-NEXT: }, +// CHECK-NEXT: "range": { +// CHECK-NEXT: "begin": { +// CHECK-NEXT: "col": 5, +// CHECK-NEXT: "file": "{{.*}}", +// CHECK-NEXT: "line": 75 +// CHECK-NEXT: }, +// CHECK-NEXT: "end": { +// CHECK-NEXT: "col": 9, +// CHECK-NEXT: "file": "{{.*}}", +// CHECK-NEXT: "line": 75 +// CHECK-NEXT: } +// CHECK-NEXT: }, +// CHECK-NEXT: "name": "y", +// CHECK-NEXT: "type": { +// CHECK-NEXT: "qualType": "int" +// CHECK-NEXT: } +// CHECK-NEXT: }, +// CHECK-NEXT: { +// CHECK-NEXT: "kind": "Capture", +// CHECK-NEXT: "var": { +// CHECK-NEXT: "id": "0x{{.*}}", +// CHECK-NEXT: "kind": "ParmVarDecl", +// CHECK-NEXT: "name": "x", +// CHECK-NEXT: "type": { +// CHECK-NEXT: "qualType": "int" +// CHECK-NEXT: } +// CHECK-NEXT: } +// CHECK-NEXT: }, +// CHECK-NEXT: { +// CHECK-NEXT: "id": "0x{{.*}}", +// CHECK-NEXT: "kind": "CompoundStmt", +// CHECK-NEXT: "range": { +// CHECK-NEXT: "begin": { +// CHECK-NEXT: "col": 16, +// CHECK-NEXT: "file": "{{.*}}", +// CHECK-NEXT: "line": 75 +// CHECK-NEXT: }, +// CHECK-NEXT: "end": { +// CHECK-NEXT: "col": 21, +// CHECK-NEXT: "file": "{{.*}}", +// CHECK-NEXT: "line": 75 +// CHECK-NEXT: } +// CHECK-NEXT: }, +// CHECK-NEXT: "inner": [ +// CHECK-NEXT: { +// CHECK-NEXT: "id": "0x{{.*}}", +// CHECK-NEXT: "kind": "ImplicitCastExpr", +// CHECK-NEXT: "range": { +// CHECK-NEXT: "begin": { +// CHECK-NEXT: "col": 18, +// CHECK-NEXT: "file": "{{.*}}", +// CHECK-NEXT: "line": 75 +// CHECK-NEXT: }, +// CHECK-NEXT: "end": { +// CHECK-NEXT: "col": 18, +// CHECK-NEXT: "file": "{{.*}}", +// CHECK-NEXT: "line": 75 +// CHECK-NEXT: } +// CHECK-NEXT: }, +// CHECK-NEXT: "type": { +// CHECK-NEXT: "qualType": "int" +// CHECK-NEXT: }, +// CHECK-NEXT: "valueCategory": "rvalue", +// CHECK-NEXT: "castKind": "LValueToRValue", +// CHECK-NEXT: "inner": [ +// CHECK-NEXT: { +// CHECK-NEXT: "id": "0x{{.*}}", +// CHECK-NEXT: "kind": "DeclRefExpr", +// CHECK-NEXT: "range": { +// CHECK-NEXT: "begin": { +// CHECK-NEXT: "col": 18, +// CHECK-NEXT: "file": "{{.*}}", +// CHECK-NEXT: "line": 75 +// CHECK-NEXT: }, +// CHECK-NEXT: "end": { +// CHECK-NEXT: "col": 18, +// CHECK-NEXT: "file": "{{.*}}", +// CHECK-NEXT: "line": 75 +// CHECK-NEXT: } +// CHECK-NEXT: }, +// CHECK-NEXT: "type": { +// CHECK-NEXT: "qualType": "const int" +// CHECK-NEXT: }, +// CHECK-NEXT: "valueCategory": "lvalue", +// CHECK-NEXT: "referencedDecl": { +// CHECK-NEXT: "id": "0x{{.*}}", +// CHECK-NEXT: "kind": "ParmVarDecl", +// CHECK-NEXT: "name": "x", +// CHECK-NEXT: "type": { +// CHECK-NEXT: "qualType": "int" +// CHECK-NEXT: } +// CHECK-NEXT: } +// CHECK-NEXT: } +// CHECK-NEXT: ] +// CHECK-NEXT: } +// CHECK-NEXT: ] +// CHECK-NEXT: }, +// CHECK-NEXT: { +// CHECK-NEXT: "id": "0x{{.*}}", +// CHECK-NEXT: "kind": "ParmVarDecl", +// CHECK-NEXT: "loc": { +// CHECK-NEXT: "col": 9, +// CHECK-NEXT: "file": "{{.*}}", +// CHECK-NEXT: "line": 75 +// CHECK-NEXT: }, +// CHECK-NEXT: "range": { +// CHECK-NEXT: "begin": { +// CHECK-NEXT: "col": 5, +// CHECK-NEXT: "file": "{{.*}}", +// CHECK-NEXT: "line": 75 +// CHECK-NEXT: }, +// CHECK-NEXT: "end": { +// CHECK-NEXT: "col": 9, +// CHECK-NEXT: "file": "{{.*}}", +// CHECK-NEXT: "line": 75 +// CHECK-NEXT: } +// CHECK-NEXT: }, +// CHECK-NEXT: "name": "y", +// CHECK-NEXT: "type": { +// CHECK-NEXT: "qualType": "int" +// CHECK-NEXT: } +// CHECK-NEXT: } +// CHECK-NEXT: ] +// CHECK-NEXT: } +// CHECK-NEXT: ] +// CHECK-NEXT: } +// CHECK-NEXT: ] +// CHECK-NEXT: } +// CHECK-NEXT: ] +// CHECK-NEXT: } +// CHECK-NEXT: ] +// CHECK-NEXT: } + + +// CHECK: "kind": "VarDecl", +// CHECK-NEXT: "loc": { +// CHECK-NEXT: "col": 21, +// CHECK-NEXT: "file": "{{.*}}", +// CHECK-NEXT: "line": 83 +// CHECK-NEXT: }, +// CHECK-NEXT: "range": { +// CHECK-NEXT: "begin": { +// CHECK-NEXT: "col": 3, +// CHECK-NEXT: "file": "{{.*}}", +// CHECK-NEXT: "line": 83 +// CHECK-NEXT: }, +// CHECK-NEXT: "end": { +// CHECK-NEXT: "col": 21, +// CHECK-NEXT: "file": "{{.*}}", +// CHECK-NEXT: "line": 83 +// CHECK-NEXT: } +// CHECK-NEXT: }, +// CHECK-NEXT: "name": "Test", +// CHECK-NEXT: "type": { +// CHECK-NEXT: "desugaredQualType": "int", +// CHECK-NEXT: "qualType": "typeof (B.foo)" +// CHECK-NEXT: } +// CHECK-NEXT: } + _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits