diff --git a/clang/lib/AST/JSONNodeDumper.cpp b/clang/lib/AST/JSONNodeDumper.cpp --- a/clang/lib/AST/JSONNodeDumper.cpp +++ b/clang/lib/AST/JSONNodeDumper.cpp @@ -798,6 +798,7 @@ void JSONNodeDumper::VisitFunctionDecl(const FunctionDecl *FD) { VisitNamedDecl(FD); JOS.attribute("type", createQualType(FD->getType())); + JOS.attribute("returnType", createQualType(FD->getReturnType())); StorageClass SC = FD->getStorageClass(); if (SC != SC_None) JOS.attribute("storageClass", VarDecl::getStorageClassSpecifierString(SC)); diff --git a/clang/test/AST/ast-dump-decl-context-json.cpp b/clang/test/AST/ast-dump-decl-context-json.cpp --- a/clang/test/AST/ast-dump-decl-context-json.cpp +++ b/clang/test/AST/ast-dump-decl-context-json.cpp @@ -89,6 +89,9 @@ // CHECK-NEXT: "mangledName": "_ZN4Test2NS8FunctionEv", // CHECK-NEXT: "type": { // CHECK-NEXT: "qualType": "void ()" +// CHECK-NEXT: }, +// CHECK-NEXT: "returnType": { +// CHECK-NEXT: "qualType": "void" // CHECK-NEXT: } // CHECK-NEXT: } // CHECK-NEXT: ] @@ -121,6 +124,9 @@ // CHECK-NEXT: "type": { // CHECK-NEXT: "qualType": "void ()" // CHECK-NEXT: }, +// CHECK-NEXT: "returnType": { +// CHECK-NEXT: "qualType": "void" +// CHECK-NEXT: }, // CHECK-NEXT: "inner": [ // CHECK-NEXT: { // CHECK-NEXT: "id": "0x{{.*}}", @@ -267,6 +273,9 @@ // CHECK-NEXT: "mangledName": "_ZN4Test1S6MethodEv", // CHECK-NEXT: "type": { // CHECK-NEXT: "qualType": "void ()" +// CHECK-NEXT: }, +// CHECK-NEXT: "returnType": { +// CHECK-NEXT: "qualType": "void" // CHECK-NEXT: } // CHECK-NEXT: } // CHECK-NEXT: ] @@ -299,6 +308,9 @@ // CHECK-NEXT: "type": { // CHECK-NEXT: "qualType": "void ()" // CHECK-NEXT: }, +// CHECK-NEXT: "returnType": { +// CHECK-NEXT: "qualType": "void" +// CHECK-NEXT: }, // CHECK-NEXT: "inner": [ // CHECK-NEXT: { // CHECK-NEXT: "id": "0x{{.*}}", diff --git a/clang/test/AST/ast-dump-decl-json.c b/clang/test/AST/ast-dump-decl-json.c --- a/clang/test/AST/ast-dump-decl-json.c +++ b/clang/test/AST/ast-dump-decl-json.c @@ -1134,6 +1134,9 @@ // CHECK-NEXT: "type": { // CHECK-NEXT: "qualType": "int (int, enum (anonymous enum at {{.*}}:69:29))" // CHECK-NEXT: }, +// CHECK-NEXT: "returnType": { +// CHECK-NEXT: "qualType": "int" +// CHECK-NEXT: }, // CHECK-NEXT: "inner": [ // CHECK-NEXT: { // CHECK-NEXT: "id": "0x{{.*}}", @@ -1308,6 +1311,9 @@ // CHECK-NEXT: "type": { // CHECK-NEXT: "qualType": "int (enum Enum)" // CHECK-NEXT: }, +// CHECK-NEXT: "returnType": { +// CHECK-NEXT: "qualType": "int" +// CHECK-NEXT: }, // CHECK-NEXT: "inner": [ // CHECK-NEXT: { // CHECK-NEXT: "id": "0x{{.*}}", @@ -1479,6 +1485,9 @@ // CHECK-NEXT: "type": { // CHECK-NEXT: "qualType": "int (int)" // CHECK-NEXT: }, +// CHECK-NEXT: "returnType": { +// CHECK-NEXT: "qualType": "int" +// CHECK-NEXT: }, // CHECK-NEXT: "inner": [ // CHECK-NEXT: { // CHECK-NEXT: "id": "0x{{.*}}", @@ -1534,6 +1543,9 @@ // CHECK-NEXT: "mangledName": "TestFunctionDeclNoProto", // CHECK-NEXT: "type": { // CHECK-NEXT: "qualType": "void ()" +// CHECK-NEXT: }, +// CHECK-NEXT: "returnType": { +// CHECK-NEXT: "qualType": "void" // CHECK-NEXT: } // CHECK-NEXT: } @@ -1563,6 +1575,9 @@ // CHECK-NEXT: "type": { // CHECK-NEXT: "qualType": "int ()" // CHECK-NEXT: }, +// CHECK-NEXT: "returnType": { +// CHECK-NEXT: "qualType": "int" +// CHECK-NEXT: }, // CHECK-NEXT: "storageClass": "extern" // CHECK-NEXT: } @@ -1592,6 +1607,9 @@ // CHECK-NEXT: "type": { // CHECK-NEXT: "qualType": "int ()" // CHECK-NEXT: }, +// CHECK-NEXT: "returnType": { +// CHECK-NEXT: "qualType": "int" +// CHECK-NEXT: }, // CHECK-NEXT: "inline": true // CHECK-NEXT: } diff --git a/clang/test/AST/ast-dump-decl-json.m b/clang/test/AST/ast-dump-decl-json.m --- a/clang/test/AST/ast-dump-decl-json.m +++ b/clang/test/AST/ast-dump-decl-json.m @@ -1703,6 +1703,9 @@ // CHECK-NEXT: "type": { // CHECK-NEXT: "qualType": "void (int)" // CHECK-NEXT: }, +// CHECK-NEXT: "returnType": { +// CHECK-NEXT: "qualType": "void" +// CHECK-NEXT: }, // CHECK-NEXT: "inner": [ // CHECK-NEXT: { // CHECK-NEXT: "id": "0x{{.*}}", diff --git a/clang/test/AST/ast-dump-expr-json.c b/clang/test/AST/ast-dump-expr-json.c --- a/clang/test/AST/ast-dump-expr-json.c +++ b/clang/test/AST/ast-dump-expr-json.c @@ -136,6 +136,9 @@ // CHECK-NEXT: "type": { // CHECK-NEXT: "qualType": "void (void)" // CHECK-NEXT: }, +// CHECK-NEXT: "returnType": { +// CHECK-NEXT: "qualType": "void" +// CHECK-NEXT: }, // CHECK-NEXT: "inner": [ // CHECK-NEXT: { // CHECK-NEXT: "id": "0x{{.*}}", @@ -296,6 +299,9 @@ // CHECK-NEXT: "type": { // CHECK-NEXT: "qualType": "void (int)" // CHECK-NEXT: }, +// CHECK-NEXT: "returnType": { +// CHECK-NEXT: "qualType": "void" +// CHECK-NEXT: }, // CHECK-NEXT: "inner": [ // CHECK-NEXT: { // CHECK-NEXT: "id": "0x{{.*}}", @@ -555,6 +561,9 @@ // CHECK-NEXT: "type": { // CHECK-NEXT: "qualType": "void (int)" // CHECK-NEXT: }, +// CHECK-NEXT: "returnType": { +// CHECK-NEXT: "qualType": "void" +// CHECK-NEXT: }, // CHECK-NEXT: "inner": [ // CHECK-NEXT: { // CHECK-NEXT: "id": "0x{{.*}}", @@ -989,6 +998,9 @@ // CHECK-NEXT: "type": { // CHECK-NEXT: "qualType": "void (int, int)" // CHECK-NEXT: }, +// CHECK-NEXT: "returnType": { +// CHECK-NEXT: "qualType": "void" +// CHECK-NEXT: }, // CHECK-NEXT: "inner": [ // CHECK-NEXT: { // CHECK-NEXT: "id": "0x{{.*}}", @@ -3362,6 +3374,9 @@ // CHECK-NEXT: "type": { // CHECK-NEXT: "qualType": "void (int, int *)" // CHECK-NEXT: }, +// CHECK-NEXT: "returnType": { +// CHECK-NEXT: "qualType": "void" +// CHECK-NEXT: }, // CHECK-NEXT: "inner": [ // CHECK-NEXT: { // CHECK-NEXT: "id": "0x{{.*}}", @@ -4029,6 +4044,9 @@ // CHECK-NEXT: "type": { // CHECK-NEXT: "qualType": "void (int *, struct S, struct S *)" // CHECK-NEXT: }, +// CHECK-NEXT: "returnType": { +// CHECK-NEXT: "qualType": "void" +// CHECK-NEXT: }, // CHECK-NEXT: "inner": [ // CHECK-NEXT: { // CHECK-NEXT: "id": "0x{{.*}}", @@ -4926,6 +4944,9 @@ // CHECK-NEXT: "type": { // CHECK-NEXT: "qualType": "void (int)" // CHECK-NEXT: }, +// CHECK-NEXT: "returnType": { +// CHECK-NEXT: "qualType": "void" +// CHECK-NEXT: }, // CHECK-NEXT: "inner": [ // CHECK-NEXT: { // CHECK-NEXT: "id": "0x{{.*}}", diff --git a/clang/test/AST/ast-dump-expr-json.cpp b/clang/test/AST/ast-dump-expr-json.cpp --- a/clang/test/AST/ast-dump-expr-json.cpp +++ b/clang/test/AST/ast-dump-expr-json.cpp @@ -182,6 +182,9 @@ // CHECK-NEXT: "type": { // CHECK-NEXT: "qualType": "void ()" // CHECK-NEXT: }, +// CHECK-NEXT: "returnType": { +// CHECK-NEXT: "qualType": "void" +// CHECK-NEXT: }, // CHECK-NEXT: "inner": [ // CHECK-NEXT: { // CHECK-NEXT: "id": "0x{{.*}}", @@ -298,6 +301,9 @@ // CHECK-NEXT: "type": { // CHECK-NEXT: "qualType": "void (S, S *, int S::*, void (S::*)(int))" // CHECK-NEXT: }, +// CHECK-NEXT: "returnType": { +// CHECK-NEXT: "qualType": "void" +// CHECK-NEXT: }, // CHECK-NEXT: "inner": [ // CHECK-NEXT: { // CHECK-NEXT: "id": "0x{{.*}}", @@ -1045,6 +1051,9 @@ // CHECK-NEXT: "type": { // CHECK-NEXT: "qualType": "void (const S *)" // CHECK-NEXT: }, +// CHECK-NEXT: "returnType": { +// CHECK-NEXT: "qualType": "void" +// CHECK-NEXT: }, // CHECK-NEXT: "inner": [ // CHECK-NEXT: { // CHECK-NEXT: "id": "0x{{.*}}", @@ -1484,6 +1493,9 @@ // CHECK-NEXT: "type": { // CHECK-NEXT: "qualType": "void (int *)" // CHECK-NEXT: }, +// CHECK-NEXT: "returnType": { +// CHECK-NEXT: "qualType": "void" +// CHECK-NEXT: }, // CHECK-NEXT: "inner": [ // CHECK-NEXT: { // CHECK-NEXT: "id": "0x{{.*}}", @@ -2510,6 +2522,9 @@ // CHECK-NEXT: "type": { // CHECK-NEXT: "qualType": "void (S, S *, U *)" // CHECK-NEXT: }, +// CHECK-NEXT: "returnType": { +// CHECK-NEXT: "qualType": "void" +// CHECK-NEXT: }, // CHECK-NEXT: "inner": [ // CHECK-NEXT: { // CHECK-NEXT: "id": "0x{{.*}}", @@ -3639,6 +3654,9 @@ // CHECK-NEXT: "type": { // CHECK-NEXT: "qualType": "void (Ts...)" // CHECK-NEXT: }, +// CHECK-NEXT: "returnType": { +// CHECK-NEXT: "qualType": "void" +// CHECK-NEXT: }, // CHECK-NEXT: "inner": [ // CHECK-NEXT: { // CHECK-NEXT: "id": "0x{{.*}}", @@ -3831,6 +3849,9 @@ // CHECK-NEXT: "type": { // CHECK-NEXT: "qualType": "void ()" // CHECK-NEXT: }, +// CHECK-NEXT: "returnType": { +// CHECK-NEXT: "qualType": "void" +// CHECK-NEXT: }, // CHECK-NEXT: "inner": [ // CHECK-NEXT: { // CHECK-NEXT: "id": "0x{{.*}}", @@ -3973,6 +3994,9 @@ // CHECK-NEXT: "type": { // CHECK-NEXT: "qualType": "auto () const -> auto" // CHECK-NEXT: }, +// CHECK-NEXT: "returnType": { +// CHECK-NEXT: "qualType": "auto" +// CHECK-NEXT: }, // CHECK-NEXT: "inline": true, // CHECK-NEXT: "inner": [ // CHECK-NEXT: { @@ -4184,6 +4208,9 @@ // CHECK-NEXT: "type": { // CHECK-NEXT: "qualType": "auto () const -> auto" // CHECK-NEXT: }, +// CHECK-NEXT: "returnType": { +// CHECK-NEXT: "qualType": "auto" +// CHECK-NEXT: }, // CHECK-NEXT: "inline": true, // CHECK-NEXT: "inner": [ // CHECK-NEXT: { @@ -4503,6 +4530,9 @@ // CHECK-NEXT: "type": { // CHECK-NEXT: "qualType": "auto () const" // CHECK-NEXT: }, +// CHECK-NEXT: "returnType": { +// CHECK-NEXT: "qualType": "auto" +// CHECK-NEXT: }, // CHECK-NEXT: "inline": true, // CHECK-NEXT: "inner": [ // CHECK-NEXT: { @@ -4548,6 +4578,9 @@ // CHECK-NEXT: "type": { // CHECK-NEXT: "qualType": "auto (*() const noexcept)()" // CHECK-NEXT: }, +// CHECK-NEXT: "returnType": { +// CHECK-NEXT: "qualType": "auto (*)()" +// CHECK-NEXT: }, // CHECK-NEXT: "inline": true, // CHECK-NEXT: "constexpr": true // CHECK-NEXT: }, @@ -4576,6 +4609,9 @@ // CHECK-NEXT: "type": { // CHECK-NEXT: "qualType": "auto ()" // CHECK-NEXT: }, +// CHECK-NEXT: "returnType": { +// CHECK-NEXT: "qualType": "auto" +// CHECK-NEXT: }, // CHECK-NEXT: "storageClass": "static", // CHECK-NEXT: "inline": true // CHECK-NEXT: } @@ -4705,6 +4741,9 @@ // CHECK-NEXT: "type": { // CHECK-NEXT: "qualType": "auto (int, ...) const" // CHECK-NEXT: }, +// CHECK-NEXT: "returnType": { +// CHECK-NEXT: "qualType": "auto" +// CHECK-NEXT: }, // CHECK-NEXT: "inline": true, // CHECK-NEXT: "variadic": true, // CHECK-NEXT: "inner": [ @@ -4777,6 +4816,9 @@ // CHECK-NEXT: "type": { // CHECK-NEXT: "qualType": "auto (*() const noexcept)(int, ...)" // CHECK-NEXT: }, +// CHECK-NEXT: "returnType": { +// CHECK-NEXT: "qualType": "auto (*)(int, ...)" +// CHECK-NEXT: }, // CHECK-NEXT: "inline": true, // CHECK-NEXT: "constexpr": true // CHECK-NEXT: }, @@ -4805,6 +4847,9 @@ // CHECK-NEXT: "type": { // CHECK-NEXT: "qualType": "auto (int, ...)" // CHECK-NEXT: }, +// CHECK-NEXT: "returnType": { +// CHECK-NEXT: "qualType": "auto" +// CHECK-NEXT: }, // CHECK-NEXT: "storageClass": "static", // CHECK-NEXT: "inline": true, // CHECK-NEXT: "variadic": true, @@ -4959,6 +5004,9 @@ // CHECK-NEXT: "type": { // CHECK-NEXT: "qualType": "auto () const -> auto" // CHECK-NEXT: }, +// CHECK-NEXT: "returnType": { +// CHECK-NEXT: "qualType": "auto" +// CHECK-NEXT: }, // CHECK-NEXT: "inline": true, // CHECK-NEXT: "inner": [ // CHECK-NEXT: { @@ -5180,6 +5228,9 @@ // CHECK-NEXT: "type": { // CHECK-NEXT: "qualType": "auto () const -> auto" // CHECK-NEXT: }, +// CHECK-NEXT: "returnType": { +// CHECK-NEXT: "qualType": "auto" +// CHECK-NEXT: }, // CHECK-NEXT: "inline": true, // CHECK-NEXT: "inner": [ // CHECK-NEXT: { @@ -5326,6 +5377,9 @@ // CHECK-NEXT: "type": { // CHECK-NEXT: "qualType": "auto () const -> auto" // CHECK-NEXT: }, +// CHECK-NEXT: "returnType": { +// CHECK-NEXT: "qualType": "auto" +// CHECK-NEXT: }, // CHECK-NEXT: "inline": true, // CHECK-NEXT: "inner": [ // CHECK-NEXT: { @@ -5568,6 +5622,9 @@ // CHECK-NEXT: "type": { // CHECK-NEXT: "qualType": "auto () const -> auto" // CHECK-NEXT: }, +// CHECK-NEXT: "returnType": { +// CHECK-NEXT: "qualType": "auto" +// CHECK-NEXT: }, // CHECK-NEXT: "inline": true, // CHECK-NEXT: "inner": [ // CHECK-NEXT: { @@ -5714,6 +5771,9 @@ // CHECK-NEXT: "type": { // CHECK-NEXT: "qualType": "auto () const -> auto" // CHECK-NEXT: }, +// CHECK-NEXT: "returnType": { +// CHECK-NEXT: "qualType": "auto" +// CHECK-NEXT: }, // CHECK-NEXT: "inline": true, // CHECK-NEXT: "inner": [ // CHECK-NEXT: { @@ -5952,6 +6012,9 @@ // CHECK-NEXT: "type": { // CHECK-NEXT: "qualType": "auto () const -> auto" // CHECK-NEXT: }, +// CHECK-NEXT: "returnType": { +// CHECK-NEXT: "qualType": "auto" +// CHECK-NEXT: }, // CHECK-NEXT: "inline": true, // CHECK-NEXT: "inner": [ // CHECK-NEXT: { @@ -6513,6 +6576,9 @@ // CHECK-NEXT: "type": { // CHECK-NEXT: "qualType": "auto () const -> auto" // CHECK-NEXT: }, +// CHECK-NEXT: "returnType": { +// CHECK-NEXT: "qualType": "auto" +// CHECK-NEXT: }, // CHECK-NEXT: "inline": true, // CHECK-NEXT: "inner": [ // CHECK-NEXT: { @@ -6781,6 +6847,9 @@ // CHECK-NEXT: "type": { // CHECK-NEXT: "qualType": "auto () const" // CHECK-NEXT: }, +// CHECK-NEXT: "returnType": { +// CHECK-NEXT: "qualType": "auto" +// CHECK-NEXT: }, // CHECK-NEXT: "inline": true, // CHECK-NEXT: "constexpr": true, // CHECK-NEXT: "inner": [ @@ -6827,6 +6896,9 @@ // CHECK-NEXT: "type": { // CHECK-NEXT: "qualType": "auto (*() const noexcept)()" // CHECK-NEXT: }, +// CHECK-NEXT: "returnType": { +// CHECK-NEXT: "qualType": "auto (*)()" +// CHECK-NEXT: }, // CHECK-NEXT: "inline": true, // CHECK-NEXT: "constexpr": true // CHECK-NEXT: }, @@ -6855,6 +6927,9 @@ // CHECK-NEXT: "type": { // CHECK-NEXT: "qualType": "auto ()" // CHECK-NEXT: }, +// CHECK-NEXT: "returnType": { +// CHECK-NEXT: "qualType": "auto" +// CHECK-NEXT: }, // CHECK-NEXT: "storageClass": "static", // CHECK-NEXT: "inline": true // CHECK-NEXT: } @@ -6984,6 +7059,9 @@ // CHECK-NEXT: "type": { // CHECK-NEXT: "qualType": "auto ()" // CHECK-NEXT: }, +// CHECK-NEXT: "returnType": { +// CHECK-NEXT: "qualType": "auto" +// CHECK-NEXT: }, // CHECK-NEXT: "inline": true, // CHECK-NEXT: "inner": [ // CHECK-NEXT: { @@ -7029,6 +7107,9 @@ // CHECK-NEXT: "type": { // CHECK-NEXT: "qualType": "auto (*() const noexcept)()" // CHECK-NEXT: }, +// CHECK-NEXT: "returnType": { +// CHECK-NEXT: "qualType": "auto (*)()" +// CHECK-NEXT: }, // CHECK-NEXT: "inline": true, // CHECK-NEXT: "constexpr": true // CHECK-NEXT: }, @@ -7057,6 +7138,9 @@ // CHECK-NEXT: "type": { // CHECK-NEXT: "qualType": "auto ()" // CHECK-NEXT: }, +// CHECK-NEXT: "returnType": { +// CHECK-NEXT: "qualType": "auto" +// CHECK-NEXT: }, // CHECK-NEXT: "storageClass": "static", // CHECK-NEXT: "inline": true // CHECK-NEXT: } @@ -7186,6 +7270,9 @@ // CHECK-NEXT: "type": { // CHECK-NEXT: "qualType": "auto () const noexcept" // CHECK-NEXT: }, +// CHECK-NEXT: "returnType": { +// CHECK-NEXT: "qualType": "auto" +// CHECK-NEXT: }, // CHECK-NEXT: "inline": true, // CHECK-NEXT: "inner": [ // CHECK-NEXT: { @@ -7231,6 +7318,9 @@ // CHECK-NEXT: "type": { // CHECK-NEXT: "qualType": "auto (*() const noexcept)() noexcept" // CHECK-NEXT: }, +// CHECK-NEXT: "returnType": { +// CHECK-NEXT: "qualType": "auto (*)() noexcept" +// CHECK-NEXT: }, // CHECK-NEXT: "inline": true, // CHECK-NEXT: "constexpr": true // CHECK-NEXT: }, @@ -7259,6 +7349,9 @@ // CHECK-NEXT: "type": { // CHECK-NEXT: "qualType": "auto () noexcept" // CHECK-NEXT: }, +// CHECK-NEXT: "returnType": { +// CHECK-NEXT: "qualType": "auto" +// CHECK-NEXT: }, // CHECK-NEXT: "storageClass": "static", // CHECK-NEXT: "inline": true // CHECK-NEXT: } @@ -7388,6 +7481,9 @@ // CHECK-NEXT: "type": { // CHECK-NEXT: "qualType": "auto () const -> int" // CHECK-NEXT: }, +// CHECK-NEXT: "returnType": { +// CHECK-NEXT: "qualType": "int" +// CHECK-NEXT: }, // CHECK-NEXT: "inline": true, // CHECK-NEXT: "inner": [ // CHECK-NEXT: { @@ -7474,6 +7570,9 @@ // CHECK-NEXT: "type": { // CHECK-NEXT: "qualType": "auto (*() const noexcept)() -> int" // CHECK-NEXT: }, +// CHECK-NEXT: "returnType": { +// CHECK-NEXT: "qualType": "auto (*)() -> int" +// CHECK-NEXT: }, // CHECK-NEXT: "inline": true, // CHECK-NEXT: "constexpr": true // CHECK-NEXT: }, @@ -7502,6 +7601,9 @@ // CHECK-NEXT: "type": { // CHECK-NEXT: "qualType": "auto () -> int" // CHECK-NEXT: }, +// CHECK-NEXT: "returnType": { +// CHECK-NEXT: "qualType": "int" +// CHECK-NEXT: }, // CHECK-NEXT: "storageClass": "static", // CHECK-NEXT: "inline": true // CHECK-NEXT: } @@ -7786,6 +7888,9 @@ // CHECK-NEXT: "type": { // CHECK-NEXT: "qualType": "void ()" // CHECK-NEXT: }, +// CHECK-NEXT: "returnType": { +// CHECK-NEXT: "qualType": "void" +// CHECK-NEXT: }, // CHECK-NEXT: "inner": [ // CHECK-NEXT: { // CHECK-NEXT: "id": "0x{{.*}}", @@ -8224,6 +8329,9 @@ // CHECK-NEXT: "type": { // CHECK-NEXT: "qualType": "void ()" // CHECK-NEXT: }, +// CHECK-NEXT: "returnType": { +// CHECK-NEXT: "qualType": "void" +// CHECK-NEXT: }, // CHECK-NEXT: "inner": [ // CHECK-NEXT: { // CHECK-NEXT: "id": "0x{{.*}}", @@ -8505,6 +8613,9 @@ // CHECK-NEXT: "type": { // CHECK-NEXT: "qualType": "void ()" // CHECK-NEXT: }, +// CHECK-NEXT: "returnType": { +// CHECK-NEXT: "qualType": "void" +// CHECK-NEXT: }, // CHECK-NEXT: "inner": [ // CHECK-NEXT: { // CHECK-NEXT: "id": "0x{{.*}}", @@ -8988,6 +9099,9 @@ // CHECK-NEXT: "type": { // CHECK-NEXT: "qualType": "void ()" // CHECK-NEXT: }, +// CHECK-NEXT: "returnType": { +// CHECK-NEXT: "qualType": "void" +// CHECK-NEXT: }, // CHECK-NEXT: "inner": [ // CHECK-NEXT: { // CHECK-NEXT: "id": "0x{{.*}}", diff --git a/clang/test/AST/ast-dump-expr-json.m b/clang/test/AST/ast-dump-expr-json.m --- a/clang/test/AST/ast-dump-expr-json.m +++ b/clang/test/AST/ast-dump-expr-json.m @@ -124,6 +124,9 @@ // CHECK-NEXT: "type": { // CHECK-NEXT: "qualType": "void ()" // CHECK-NEXT: }, +// CHECK-NEXT: "returnType": { +// CHECK-NEXT: "qualType": "void" +// CHECK-NEXT: }, // CHECK-NEXT: "inner": [ // CHECK-NEXT: { // CHECK-NEXT: "id": "0x{{.*}}", @@ -270,6 +273,9 @@ // CHECK-NEXT: "type": { // CHECK-NEXT: "qualType": "void (I *)" // CHECK-NEXT: }, +// CHECK-NEXT: "returnType": { +// CHECK-NEXT: "qualType": "void" +// CHECK-NEXT: }, // CHECK-NEXT: "inner": [ // CHECK-NEXT: { // CHECK-NEXT: "id": "0x{{.*}}", @@ -450,6 +456,9 @@ // CHECK-NEXT: "type": { // CHECK-NEXT: "qualType": "void ()" // CHECK-NEXT: }, +// CHECK-NEXT: "returnType": { +// CHECK-NEXT: "qualType": "void" +// CHECK-NEXT: }, // CHECK-NEXT: "inner": [ // CHECK-NEXT: { // CHECK-NEXT: "id": "0x{{.*}}", @@ -612,6 +621,9 @@ // CHECK-NEXT: "type": { // CHECK-NEXT: "qualType": "void ()" // CHECK-NEXT: }, +// CHECK-NEXT: "returnType": { +// CHECK-NEXT: "qualType": "void" +// CHECK-NEXT: }, // CHECK-NEXT: "inner": [ // CHECK-NEXT: { // CHECK-NEXT: "id": "0x{{.*}}", @@ -736,6 +748,9 @@ // CHECK-NEXT: "type": { // CHECK-NEXT: "qualType": "void (id)" // CHECK-NEXT: }, +// CHECK-NEXT: "returnType": { +// CHECK-NEXT: "qualType": "void" +// CHECK-NEXT: }, // CHECK-NEXT: "inner": [ // CHECK-NEXT: { // CHECK-NEXT: "id": "0x{{.*}}", @@ -923,6 +938,9 @@ // CHECK-NEXT: "type": { // CHECK-NEXT: "qualType": "void (J *)" // CHECK-NEXT: }, +// CHECK-NEXT: "returnType": { +// CHECK-NEXT: "qualType": "void" +// CHECK-NEXT: }, // CHECK-NEXT: "inner": [ // CHECK-NEXT: { // CHECK-NEXT: "id": "0x{{.*}}", @@ -1946,6 +1964,9 @@ // CHECK-NEXT: "type": { // CHECK-NEXT: "qualType": "void (NSMutableArray *, NSMutableDictionary *)" // CHECK-NEXT: }, +// CHECK-NEXT: "returnType": { +// CHECK-NEXT: "qualType": "void" +// CHECK-NEXT: }, // CHECK-NEXT: "inner": [ // CHECK-NEXT: { // CHECK-NEXT: "id": "0x{{.*}}", @@ -4794,6 +4815,9 @@ // CHECK-NEXT: "type": { // CHECK-NEXT: "qualType": "void (I *)" // CHECK-NEXT: }, +// CHECK-NEXT: "returnType": { +// CHECK-NEXT: "qualType": "void" +// CHECK-NEXT: }, // CHECK-NEXT: "inner": [ // CHECK-NEXT: { // CHECK-NEXT: "id": "0x{{.*}}", @@ -4999,6 +5023,9 @@ // CHECK-NEXT: "type": { // CHECK-NEXT: "qualType": "void ()" // CHECK-NEXT: }, +// CHECK-NEXT: "returnType": { +// CHECK-NEXT: "qualType": "void" +// CHECK-NEXT: }, // CHECK-NEXT: "inner": [ // CHECK-NEXT: { // CHECK-NEXT: "id": "0x{{.*}}", diff --git a/clang/test/AST/ast-dump-funcs-json.cpp b/clang/test/AST/ast-dump-funcs-json.cpp --- a/clang/test/AST/ast-dump-funcs-json.cpp +++ b/clang/test/AST/ast-dump-funcs-json.cpp @@ -68,6 +68,9 @@ // CHECK-NEXT: "mangledName": "_ZN1S5Test1Ev", // CHECK-NEXT: "type": { // CHECK-NEXT: "qualType": "void ()" +// CHECK-NEXT: }, +// CHECK-NEXT: "returnType": { +// CHECK-NEXT: "qualType": "void" // CHECK-NEXT: } // CHECK-NEXT: } @@ -96,6 +99,9 @@ // CHECK-NEXT: "mangledName": "_ZNK1S5Test2Ev", // CHECK-NEXT: "type": { // CHECK-NEXT: "qualType": "void () const" +// CHECK-NEXT: }, +// CHECK-NEXT: "returnType": { +// CHECK-NEXT: "qualType": "void" // CHECK-NEXT: } // CHECK-NEXT: } @@ -124,6 +130,9 @@ // CHECK-NEXT: "mangledName": "_ZNV1S5Test3Ev", // CHECK-NEXT: "type": { // CHECK-NEXT: "qualType": "void () volatile" +// CHECK-NEXT: }, +// CHECK-NEXT: "returnType": { +// CHECK-NEXT: "qualType": "void" // CHECK-NEXT: } // CHECK-NEXT: } @@ -152,6 +161,9 @@ // CHECK-NEXT: "mangledName": "_ZNR1S5Test4Ev", // CHECK-NEXT: "type": { // CHECK-NEXT: "qualType": "void () &" +// CHECK-NEXT: }, +// CHECK-NEXT: "returnType": { +// CHECK-NEXT: "qualType": "void" // CHECK-NEXT: } // CHECK-NEXT: } @@ -180,6 +192,9 @@ // CHECK-NEXT: "mangledName": "_ZNO1S5Test5Ev", // CHECK-NEXT: "type": { // CHECK-NEXT: "qualType": "void () &&" +// CHECK-NEXT: }, +// CHECK-NEXT: "returnType": { +// CHECK-NEXT: "qualType": "void" // CHECK-NEXT: } // CHECK-NEXT: } @@ -209,6 +224,9 @@ // CHECK-NEXT: "type": { // CHECK-NEXT: "qualType": "void (float, int)" // CHECK-NEXT: }, +// CHECK-NEXT: "returnType": { +// CHECK-NEXT: "qualType": "void" +// CHECK-NEXT: }, // CHECK-NEXT: "virtual": true, // CHECK-NEXT: "inner": [ // CHECK-NEXT: { @@ -312,6 +330,9 @@ // CHECK-NEXT: "type": { // CHECK-NEXT: "qualType": "void ()" // CHECK-NEXT: }, +// CHECK-NEXT: "returnType": { +// CHECK-NEXT: "qualType": "void" +// CHECK-NEXT: }, // CHECK-NEXT: "virtual": true, // CHECK-NEXT: "pure": true // CHECK-NEXT: } @@ -342,6 +363,9 @@ // CHECK-NEXT: "type": { // CHECK-NEXT: "qualType": "void (float, int)" // CHECK-NEXT: }, +// CHECK-NEXT: "returnType": { +// CHECK-NEXT: "qualType": "void" +// CHECK-NEXT: }, // CHECK-NEXT: "inner": [ // CHECK-NEXT: { // CHECK-NEXT: "id": "0x{{.*}}", @@ -459,6 +483,9 @@ // CHECK-NEXT: "mangledName": "_ZN1U5Test1Ev", // CHECK-NEXT: "type": { // CHECK-NEXT: "qualType": "void ()" +// CHECK-NEXT: }, +// CHECK-NEXT: "returnType": { +// CHECK-NEXT: "qualType": "void" // CHECK-NEXT: } // CHECK-NEXT: } @@ -490,6 +517,9 @@ // CHECK-NEXT: "type": { // CHECK-NEXT: "qualType": "void ()" // CHECK-NEXT: }, +// CHECK-NEXT: "returnType": { +// CHECK-NEXT: "qualType": "void" +// CHECK-NEXT: }, // CHECK-NEXT: "inner": [ // CHECK-NEXT: { // CHECK-NEXT: "id": "0x{{.*}}", @@ -536,6 +566,9 @@ // CHECK-NEXT: "mangledName": "_Z5Test1v", // CHECK-NEXT: "type": { // CHECK-NEXT: "qualType": "void ()" +// CHECK-NEXT: }, +// CHECK-NEXT: "returnType": { +// CHECK-NEXT: "qualType": "void" // CHECK-NEXT: } // CHECK-NEXT: } @@ -564,6 +597,9 @@ // CHECK-NEXT: "mangledName": "_Z5Test2v", // CHECK-NEXT: "type": { // CHECK-NEXT: "qualType": "void ()" +// CHECK-NEXT: }, +// CHECK-NEXT: "returnType": { +// CHECK-NEXT: "qualType": "void" // CHECK-NEXT: } // CHECK-NEXT: } @@ -593,6 +629,9 @@ // CHECK-NEXT: "type": { // CHECK-NEXT: "qualType": "void (int, int)" // CHECK-NEXT: }, +// CHECK-NEXT: "returnType": { +// CHECK-NEXT: "qualType": "void" +// CHECK-NEXT: }, // CHECK-NEXT: "inner": [ // CHECK-NEXT: { // CHECK-NEXT: "id": "0x{{.*}}", @@ -675,6 +714,9 @@ // CHECK-NEXT: "type": { // CHECK-NEXT: "qualType": "void (int, int)" // CHECK-NEXT: }, +// CHECK-NEXT: "returnType": { +// CHECK-NEXT: "qualType": "void" +// CHECK-NEXT: }, // CHECK-NEXT: "inner": [ // CHECK-NEXT: { // CHECK-NEXT: "id": "0x{{.*}}", @@ -781,6 +823,9 @@ // CHECK-NEXT: "type": { // CHECK-NEXT: "qualType": "void ()" // CHECK-NEXT: }, +// CHECK-NEXT: "returnType": { +// CHECK-NEXT: "qualType": "void" +// CHECK-NEXT: }, // CHECK-NEXT: "constexpr": true // CHECK-NEXT: } @@ -810,6 +855,9 @@ // CHECK-NEXT: "type": { // CHECK-NEXT: "qualType": "void ()" // CHECK-NEXT: }, +// CHECK-NEXT: "returnType": { +// CHECK-NEXT: "qualType": "void" +// CHECK-NEXT: }, // CHECK-NEXT: "storageClass": "static" // CHECK-NEXT: } @@ -839,6 +887,9 @@ // CHECK-NEXT: "type": { // CHECK-NEXT: "qualType": "void ()" // CHECK-NEXT: }, +// CHECK-NEXT: "returnType": { +// CHECK-NEXT: "qualType": "void" +// CHECK-NEXT: }, // CHECK-NEXT: "storageClass": "extern" // CHECK-NEXT: } @@ -868,6 +919,9 @@ // CHECK-NEXT: "type": { // CHECK-NEXT: "qualType": "void ()" // CHECK-NEXT: }, +// CHECK-NEXT: "returnType": { +// CHECK-NEXT: "qualType": "void" +// CHECK-NEXT: }, // CHECK-NEXT: "inline": true // CHECK-NEXT: } @@ -896,6 +950,9 @@ // CHECK-NEXT: "mangledName": "_Z5Test9v", // CHECK-NEXT: "type": { // CHECK-NEXT: "qualType": "void () noexcept" +// CHECK-NEXT: }, +// CHECK-NEXT: "returnType": { +// CHECK-NEXT: "qualType": "void" // CHECK-NEXT: } // CHECK-NEXT: } @@ -924,6 +981,9 @@ // CHECK-NEXT: "mangledName": "_Z6Test10v", // CHECK-NEXT: "type": { // CHECK-NEXT: "qualType": "void () noexcept(false)" +// CHECK-NEXT: }, +// CHECK-NEXT: "returnType": { +// CHECK-NEXT: "qualType": "void" // CHECK-NEXT: } // CHECK-NEXT: } @@ -952,6 +1012,9 @@ // CHECK-NEXT: "mangledName": "_Z6Test11v", // CHECK-NEXT: "type": { // CHECK-NEXT: "qualType": "void () noexcept(1)" +// CHECK-NEXT: }, +// CHECK-NEXT: "returnType": { +// CHECK-NEXT: "qualType": "void" // CHECK-NEXT: } // CHECK-NEXT: } @@ -1032,6 +1095,9 @@ // CHECK-NEXT: "type": { // CHECK-NEXT: "qualType": "T (T &)" // CHECK-NEXT: }, +// CHECK-NEXT: "returnType": { +// CHECK-NEXT: "qualType": "T" +// CHECK-NEXT: }, // CHECK-NEXT: "inner": [ // CHECK-NEXT: { // CHECK-NEXT: "id": "0x{{.*}}", @@ -1088,6 +1154,9 @@ // CHECK-NEXT: "type": { // CHECK-NEXT: "qualType": "void (int)" // CHECK-NEXT: }, +// CHECK-NEXT: "returnType": { +// CHECK-NEXT: "qualType": "void" +// CHECK-NEXT: }, // CHECK-NEXT: "inner": [ // CHECK-NEXT: { // CHECK-NEXT: "id": "0x{{.*}}", @@ -1158,6 +1227,9 @@ // CHECK-NEXT: "type": { // CHECK-NEXT: "qualType": "void (int, ...)" // CHECK-NEXT: }, +// CHECK-NEXT: "returnType": { +// CHECK-NEXT: "qualType": "void" +// CHECK-NEXT: }, // CHECK-NEXT: "variadic": true, // CHECK-NEXT: "inner": [ // CHECK-NEXT: { diff --git a/clang/test/AST/ast-dump-macro-json.c b/clang/test/AST/ast-dump-macro-json.c --- a/clang/test/AST/ast-dump-macro-json.c +++ b/clang/test/AST/ast-dump-macro-json.c @@ -52,6 +52,9 @@ // CHECK-NEXT: "mangledName": "frobble", // CHECK-NEXT: "type": { // CHECK-NEXT: "qualType": "void (void)" +// CHECK-NEXT: }, +// CHECK-NEXT: "returnType": { +// CHECK-NEXT: "qualType": "void" // CHECK-NEXT: } // CHECK-NEXT: } @@ -88,6 +91,9 @@ // CHECK-NEXT: "mangledName": "frobble", // CHECK-NEXT: "type": { // CHECK-NEXT: "qualType": "void (void)" +// CHECK-NEXT: }, +// CHECK-NEXT: "returnType": { +// CHECK-NEXT: "qualType": "void" // CHECK-NEXT: } // CHECK-NEXT: } @@ -123,6 +129,9 @@ // CHECK-NEXT: "mangledName": "quux", // CHECK-NEXT: "type": { // CHECK-NEXT: "qualType": "void (void)" +// CHECK-NEXT: }, +// CHECK-NEXT: "returnType": { +// CHECK-NEXT: "qualType": "void" // CHECK-NEXT: } // CHECK-NEXT: } @@ -160,6 +169,9 @@ // CHECK-NEXT: "mangledName": "foo0", // CHECK-NEXT: "type": { // CHECK-NEXT: "qualType": "void (void)" +// CHECK-NEXT: }, +// CHECK-NEXT: "returnType": { +// CHECK-NEXT: "qualType": "void" // CHECK-NEXT: } // CHECK-NEXT: } @@ -197,5 +209,8 @@ // CHECK-NEXT: "mangledName": "foo1", // CHECK-NEXT: "type": { // CHECK-NEXT: "qualType": "void (void)" +// CHECK-NEXT: }, +// CHECK-NEXT: "returnType": { +// CHECK-NEXT: "qualType": "void" // CHECK-NEXT: } // CHECK-NEXT: } diff --git a/clang/test/AST/ast-dump-record-definition-data-json.cpp b/clang/test/AST/ast-dump-record-definition-data-json.cpp --- a/clang/test/AST/ast-dump-record-definition-data-json.cpp +++ b/clang/test/AST/ast-dump-record-definition-data-json.cpp @@ -222,6 +222,10 @@ // CHECK-NEXT: "type": { // CHECK-NEXT: "qualType": "void () const" // CHECK-NEXT: }, +// CHECK-NEXT: "returnType": { +// CHECK-NEXT: "desugaredQualType": "void", +// CHECK-NEXT: "qualType": "void" +// CHECK-NEXT: }, // CHECK-NEXT: "inline": true, // CHECK-NEXT: "constexpr": true, // CHECK-NEXT: "inner": [ @@ -269,6 +273,9 @@ // CHECK-NEXT: "type": { // CHECK-NEXT: "qualType": "void (*() const noexcept)()" // CHECK-NEXT: }, +// CHECK-NEXT: "returnType": { +// CHECK-NEXT: "qualType": "void (*)()" +// CHECK-NEXT: }, // CHECK-NEXT: "inline": true, // CHECK-NEXT: "constexpr": true // CHECK-NEXT: }, @@ -298,6 +305,10 @@ // CHECK-NEXT: "type": { // CHECK-NEXT: "qualType": "void ()" // CHECK-NEXT: }, +// CHECK-NEXT: "returnType": { +// CHECK-NEXT: "desugaredQualType": "void", +// CHECK-NEXT: "qualType": "void" +// CHECK-NEXT: }, // CHECK-NEXT: "storageClass": "static", // CHECK-NEXT: "inline": true // CHECK-NEXT: }, @@ -328,6 +339,9 @@ // CHECK-NEXT: "type": { // CHECK-NEXT: "qualType": "void () noexcept" // CHECK-NEXT: }, +// CHECK-NEXT: "returnType": { +// CHECK-NEXT: "qualType": "void" +// CHECK-NEXT: }, // CHECK-NEXT: "inline": true, // CHECK-NEXT: "explicitlyDefaulted": "default" // CHECK-NEXT: } @@ -463,6 +477,9 @@ // CHECK-NEXT: "type": { // CHECK-NEXT: "qualType": "auto (auto) const" // CHECK-NEXT: }, +// CHECK-NEXT: "returnType": { +// CHECK-NEXT: "qualType": "auto" +// CHECK-NEXT: }, // CHECK-NEXT: "inline": true, // CHECK-NEXT: "constexpr": true, // CHECK-NEXT: "inner": [ @@ -580,6 +597,9 @@ // CHECK-NEXT: "type": { // CHECK-NEXT: "qualType": "auto (*() const noexcept)(auto)" // CHECK-NEXT: }, +// CHECK-NEXT: "returnType": { +// CHECK-NEXT: "qualType": "auto (*)(auto)" +// CHECK-NEXT: }, // CHECK-NEXT: "inline": true, // CHECK-NEXT: "constexpr": true // CHECK-NEXT: } @@ -655,6 +675,9 @@ // CHECK-NEXT: "type": { // CHECK-NEXT: "qualType": "auto (auto)" // CHECK-NEXT: }, +// CHECK-NEXT: "returnType": { +// CHECK-NEXT: "qualType": "auto" +// CHECK-NEXT: }, // CHECK-NEXT: "storageClass": "static", // CHECK-NEXT: "inline": true, // CHECK-NEXT: "inner": [ @@ -713,6 +736,9 @@ // CHECK-NEXT: "type": { // CHECK-NEXT: "qualType": "void () noexcept" // CHECK-NEXT: }, +// CHECK-NEXT: "returnType": { +// CHECK-NEXT: "qualType": "void" +// CHECK-NEXT: }, // CHECK-NEXT: "inline": true, // CHECK-NEXT: "explicitlyDefaulted": "default" // CHECK-NEXT: } @@ -830,6 +856,9 @@ // CHECK-NEXT: "type": { // CHECK-NEXT: "qualType": "void (const CanPassInRegisters &)" // CHECK-NEXT: }, +// CHECK-NEXT: "returnType": { +// CHECK-NEXT: "qualType": "void" +// CHECK-NEXT: }, // CHECK-NEXT: "constexpr": true, // CHECK-NEXT: "explicitlyDefaulted": "default", // CHECK-NEXT: "inner": [ @@ -972,6 +1001,9 @@ // CHECK-NEXT: "type": { // CHECK-NEXT: "qualType": "void (const CantPassInRegisters &)" // CHECK-NEXT: }, +// CHECK-NEXT: "returnType": { +// CHECK-NEXT: "qualType": "void" +// CHECK-NEXT: }, // CHECK-NEXT: "explicitlyDeleted": true, // CHECK-NEXT: "inner": [ // CHECK-NEXT: { @@ -1629,6 +1661,9 @@ // CHECK-NEXT: "mangledName": "_ZN16IsStandardLayout1fEv", // CHECK-NEXT: "type": { // CHECK-NEXT: "qualType": "void ()" +// CHECK-NEXT: }, +// CHECK-NEXT: "returnType": { +// CHECK-NEXT: "qualType": "void" // CHECK-NEXT: } // CHECK-NEXT: } // CHECK-NEXT: ] @@ -1752,6 +1787,9 @@ // CHECK-NEXT: "type": { // CHECK-NEXT: "qualType": "void ()" // CHECK-NEXT: }, +// CHECK-NEXT: "returnType": { +// CHECK-NEXT: "qualType": "void" +// CHECK-NEXT: }, // CHECK-NEXT: "virtual": true // CHECK-NEXT: }, // CHECK-NEXT: { @@ -1781,6 +1819,9 @@ // CHECK-NEXT: "type": { // CHECK-NEXT: "qualType": "IsNotStandardLayout &(const IsNotStandardLayout &)" // CHECK-NEXT: }, +// CHECK-NEXT: "returnType": { +// CHECK-NEXT: "qualType": "IsNotStandardLayout &" +// CHECK-NEXT: }, // CHECK-NEXT: "inline": true, // CHECK-NEXT: "constexpr": true, // CHECK-NEXT: "explicitlyDefaulted": "default", @@ -1837,6 +1878,9 @@ // CHECK-NEXT: "type": { // CHECK-NEXT: "qualType": "IsNotStandardLayout &(IsNotStandardLayout &&)" // CHECK-NEXT: }, +// CHECK-NEXT: "returnType": { +// CHECK-NEXT: "qualType": "IsNotStandardLayout &" +// CHECK-NEXT: }, // CHECK-NEXT: "inline": true, // CHECK-NEXT: "constexpr": true, // CHECK-NEXT: "explicitlyDefaulted": "default", @@ -1893,6 +1937,9 @@ // CHECK-NEXT: "type": { // CHECK-NEXT: "qualType": "void ()" // CHECK-NEXT: }, +// CHECK-NEXT: "returnType": { +// CHECK-NEXT: "qualType": "void" +// CHECK-NEXT: }, // CHECK-NEXT: "inline": true, // CHECK-NEXT: "explicitlyDefaulted": "default" // CHECK-NEXT: } @@ -2110,6 +2157,9 @@ // CHECK-NEXT: "type": { // CHECK-NEXT: "qualType": "void (const IsNotTriviallyCopyable &)" // CHECK-NEXT: }, +// CHECK-NEXT: "returnType": { +// CHECK-NEXT: "qualType": "void" +// CHECK-NEXT: }, // CHECK-NEXT: "inner": [ // CHECK-NEXT: { // CHECK-NEXT: "id": "0x{{.*}}", @@ -2529,6 +2579,9 @@ // CHECK-NEXT: "type": { // CHECK-NEXT: "qualType": "void ()" // CHECK-NEXT: }, +// CHECK-NEXT: "returnType": { +// CHECK-NEXT: "qualType": "void" +// CHECK-NEXT: }, // CHECK-NEXT: "constexpr": true, // CHECK-NEXT: "explicitlyDefaulted": "default" // CHECK-NEXT: } @@ -2658,6 +2711,9 @@ // CHECK-NEXT: "type": { // CHECK-NEXT: "qualType": "void ()" // CHECK-NEXT: }, +// CHECK-NEXT: "returnType": { +// CHECK-NEXT: "qualType": "void" +// CHECK-NEXT: }, // CHECK-NEXT: "inner": [ // CHECK-NEXT: { // CHECK-NEXT: "id": "0x{{.*}}", @@ -2798,6 +2854,9 @@ // CHECK-NEXT: "type": { // CHECK-NEXT: "qualType": "void ()" // CHECK-NEXT: }, +// CHECK-NEXT: "returnType": { +// CHECK-NEXT: "qualType": "void" +// CHECK-NEXT: }, // CHECK-NEXT: "virtual": true // CHECK-NEXT: }, // CHECK-NEXT: { @@ -2827,6 +2886,9 @@ // CHECK-NEXT: "type": { // CHECK-NEXT: "qualType": "IsPolymorphic &(const IsPolymorphic &)" // CHECK-NEXT: }, +// CHECK-NEXT: "returnType": { +// CHECK-NEXT: "qualType": "IsPolymorphic &" +// CHECK-NEXT: }, // CHECK-NEXT: "inline": true, // CHECK-NEXT: "constexpr": true, // CHECK-NEXT: "explicitlyDefaulted": "default", @@ -2883,6 +2945,9 @@ // CHECK-NEXT: "type": { // CHECK-NEXT: "qualType": "IsPolymorphic &(IsPolymorphic &&)" // CHECK-NEXT: }, +// CHECK-NEXT: "returnType": { +// CHECK-NEXT: "qualType": "IsPolymorphic &" +// CHECK-NEXT: }, // CHECK-NEXT: "inline": true, // CHECK-NEXT: "constexpr": true, // CHECK-NEXT: "explicitlyDefaulted": "default", @@ -2939,6 +3004,9 @@ // CHECK-NEXT: "type": { // CHECK-NEXT: "qualType": "void ()" // CHECK-NEXT: }, +// CHECK-NEXT: "returnType": { +// CHECK-NEXT: "qualType": "void" +// CHECK-NEXT: }, // CHECK-NEXT: "inline": true, // CHECK-NEXT: "explicitlyDefaulted": "default" // CHECK-NEXT: } @@ -3071,6 +3139,9 @@ // CHECK-NEXT: "mangledName": "_ZN16IsNotPolymorphic1fEv", // CHECK-NEXT: "type": { // CHECK-NEXT: "qualType": "void ()" +// CHECK-NEXT: }, +// CHECK-NEXT: "returnType": { +// CHECK-NEXT: "qualType": "void" // CHECK-NEXT: } // CHECK-NEXT: } // CHECK-NEXT: ] @@ -3195,6 +3266,9 @@ // CHECK-NEXT: "type": { // CHECK-NEXT: "qualType": "void ()" // CHECK-NEXT: }, +// CHECK-NEXT: "returnType": { +// CHECK-NEXT: "qualType": "void" +// CHECK-NEXT: }, // CHECK-NEXT: "virtual": true, // CHECK-NEXT: "pure": true // CHECK-NEXT: }, @@ -3225,6 +3299,9 @@ // CHECK-NEXT: "type": { // CHECK-NEXT: "qualType": "IsAbstract &(const IsAbstract &)" // CHECK-NEXT: }, +// CHECK-NEXT: "returnType": { +// CHECK-NEXT: "qualType": "IsAbstract &" +// CHECK-NEXT: }, // CHECK-NEXT: "inline": true, // CHECK-NEXT: "constexpr": true, // CHECK-NEXT: "explicitlyDefaulted": "default", @@ -3281,6 +3358,9 @@ // CHECK-NEXT: "type": { // CHECK-NEXT: "qualType": "IsAbstract &(IsAbstract &&)" // CHECK-NEXT: }, +// CHECK-NEXT: "returnType": { +// CHECK-NEXT: "qualType": "IsAbstract &" +// CHECK-NEXT: }, // CHECK-NEXT: "inline": true, // CHECK-NEXT: "constexpr": true, // CHECK-NEXT: "explicitlyDefaulted": "default", @@ -3337,6 +3417,9 @@ // CHECK-NEXT: "type": { // CHECK-NEXT: "qualType": "void ()" // CHECK-NEXT: }, +// CHECK-NEXT: "returnType": { +// CHECK-NEXT: "qualType": "void" +// CHECK-NEXT: }, // CHECK-NEXT: "inline": true, // CHECK-NEXT: "explicitlyDefaulted": "default" // CHECK-NEXT: } @@ -3461,6 +3544,9 @@ // CHECK-NEXT: "type": { // CHECK-NEXT: "qualType": "void ()" // CHECK-NEXT: }, +// CHECK-NEXT: "returnType": { +// CHECK-NEXT: "qualType": "void" +// CHECK-NEXT: }, // CHECK-NEXT: "virtual": true // CHECK-NEXT: }, // CHECK-NEXT: { @@ -3490,6 +3576,9 @@ // CHECK-NEXT: "type": { // CHECK-NEXT: "qualType": "IsNotAbstract &(const IsNotAbstract &)" // CHECK-NEXT: }, +// CHECK-NEXT: "returnType": { +// CHECK-NEXT: "qualType": "IsNotAbstract &" +// CHECK-NEXT: }, // CHECK-NEXT: "inline": true, // CHECK-NEXT: "constexpr": true, // CHECK-NEXT: "explicitlyDefaulted": "default", @@ -3546,6 +3635,9 @@ // CHECK-NEXT: "type": { // CHECK-NEXT: "qualType": "IsNotAbstract &(IsNotAbstract &&)" // CHECK-NEXT: }, +// CHECK-NEXT: "returnType": { +// CHECK-NEXT: "qualType": "IsNotAbstract &" +// CHECK-NEXT: }, // CHECK-NEXT: "inline": true, // CHECK-NEXT: "constexpr": true, // CHECK-NEXT: "explicitlyDefaulted": "default", @@ -3602,6 +3694,9 @@ // CHECK-NEXT: "type": { // CHECK-NEXT: "qualType": "void ()" // CHECK-NEXT: }, +// CHECK-NEXT: "returnType": { +// CHECK-NEXT: "qualType": "void" +// CHECK-NEXT: }, // CHECK-NEXT: "inline": true, // CHECK-NEXT: "explicitlyDefaulted": "default" // CHECK-NEXT: } @@ -3724,6 +3819,9 @@ // CHECK-NEXT: "type": { // CHECK-NEXT: "qualType": "void ()" // CHECK-NEXT: }, +// CHECK-NEXT: "returnType": { +// CHECK-NEXT: "qualType": "void" +// CHECK-NEXT: }, // CHECK-NEXT: "explicitlyDefaulted": "default" // CHECK-NEXT: } // CHECK-NEXT: ] @@ -3840,6 +3938,9 @@ // CHECK-NEXT: "type": { // CHECK-NEXT: "qualType": "void () noexcept" // CHECK-NEXT: }, +// CHECK-NEXT: "returnType": { +// CHECK-NEXT: "qualType": "void" +// CHECK-NEXT: }, // CHECK-NEXT: "inner": [ // CHECK-NEXT: { // CHECK-NEXT: "id": "0x{{.*}}", @@ -3985,6 +4086,9 @@ // CHECK-NEXT: "type": { // CHECK-NEXT: "qualType": "void ()" // CHECK-NEXT: }, +// CHECK-NEXT: "returnType": { +// CHECK-NEXT: "qualType": "void" +// CHECK-NEXT: }, // CHECK-NEXT: "inner": [ // CHECK-NEXT: { // CHECK-NEXT: "id": "0x{{.*}}", @@ -4237,6 +4341,9 @@ // CHECK-NEXT: "type": { // CHECK-NEXT: "qualType": "void ()" // CHECK-NEXT: }, +// CHECK-NEXT: "returnType": { +// CHECK-NEXT: "qualType": "void" +// CHECK-NEXT: }, // CHECK-NEXT: "constexpr": true, // CHECK-NEXT: "inner": [ // CHECK-NEXT: { @@ -4383,6 +4490,9 @@ // CHECK-NEXT: "type": { // CHECK-NEXT: "qualType": "void ()" // CHECK-NEXT: }, +// CHECK-NEXT: "returnType": { +// CHECK-NEXT: "qualType": "void" +// CHECK-NEXT: }, // CHECK-NEXT: "inner": [ // CHECK-NEXT: { // CHECK-NEXT: "id": "0x{{.*}}", diff --git a/clang/test/AST/ast-dump-records-json.cpp b/clang/test/AST/ast-dump-records-json.cpp --- a/clang/test/AST/ast-dump-records-json.cpp +++ b/clang/test/AST/ast-dump-records-json.cpp @@ -2588,6 +2588,9 @@ // CHECK-NEXT: "type": { // CHECK-NEXT: "qualType": "Base1 &(const Base1 &)" // CHECK-NEXT: }, +// CHECK-NEXT: "returnType": { +// CHECK-NEXT: "qualType": "Base1 &" +// CHECK-NEXT: }, // CHECK-NEXT: "inline": true, // CHECK-NEXT: "constexpr": true, // CHECK-NEXT: "explicitlyDefaulted": "default", @@ -2644,6 +2647,9 @@ // CHECK-NEXT: "type": { // CHECK-NEXT: "qualType": "Base1 &(Base1 &&)" // CHECK-NEXT: }, +// CHECK-NEXT: "returnType": { +// CHECK-NEXT: "qualType": "Base1 &" +// CHECK-NEXT: }, // CHECK-NEXT: "inline": true, // CHECK-NEXT: "constexpr": true, // CHECK-NEXT: "explicitlyDefaulted": "default", @@ -2700,6 +2706,9 @@ // CHECK-NEXT: "type": { // CHECK-NEXT: "qualType": "void ()" // CHECK-NEXT: }, +// CHECK-NEXT: "returnType": { +// CHECK-NEXT: "qualType": "void" +// CHECK-NEXT: }, // CHECK-NEXT: "inline": true, // CHECK-NEXT: "explicitlyDefaulted": "default" // CHECK-NEXT: } @@ -2829,6 +2838,9 @@ // CHECK-NEXT: "type": { // CHECK-NEXT: "qualType": "Base2 &(const Base2 &)" // CHECK-NEXT: }, +// CHECK-NEXT: "returnType": { +// CHECK-NEXT: "qualType": "Base2 &" +// CHECK-NEXT: }, // CHECK-NEXT: "inline": true, // CHECK-NEXT: "constexpr": true, // CHECK-NEXT: "explicitlyDefaulted": "default", @@ -2885,6 +2897,9 @@ // CHECK-NEXT: "type": { // CHECK-NEXT: "qualType": "Base2 &(Base2 &&)" // CHECK-NEXT: }, +// CHECK-NEXT: "returnType": { +// CHECK-NEXT: "qualType": "Base2 &" +// CHECK-NEXT: }, // CHECK-NEXT: "inline": true, // CHECK-NEXT: "constexpr": true, // CHECK-NEXT: "explicitlyDefaulted": "default", @@ -2941,6 +2956,9 @@ // CHECK-NEXT: "type": { // CHECK-NEXT: "qualType": "void ()" // CHECK-NEXT: }, +// CHECK-NEXT: "returnType": { +// CHECK-NEXT: "qualType": "void" +// CHECK-NEXT: }, // CHECK-NEXT: "inline": true, // CHECK-NEXT: "explicitlyDefaulted": "default" // CHECK-NEXT: } @@ -3070,6 +3088,9 @@ // CHECK-NEXT: "type": { // CHECK-NEXT: "qualType": "Base3 &(const Base3 &)" // CHECK-NEXT: }, +// CHECK-NEXT: "returnType": { +// CHECK-NEXT: "qualType": "Base3 &" +// CHECK-NEXT: }, // CHECK-NEXT: "inline": true, // CHECK-NEXT: "constexpr": true, // CHECK-NEXT: "explicitlyDefaulted": "default", @@ -3126,6 +3147,9 @@ // CHECK-NEXT: "type": { // CHECK-NEXT: "qualType": "Base3 &(Base3 &&)" // CHECK-NEXT: }, +// CHECK-NEXT: "returnType": { +// CHECK-NEXT: "qualType": "Base3 &" +// CHECK-NEXT: }, // CHECK-NEXT: "inline": true, // CHECK-NEXT: "constexpr": true, // CHECK-NEXT: "explicitlyDefaulted": "default", @@ -3182,6 +3206,9 @@ // CHECK-NEXT: "type": { // CHECK-NEXT: "qualType": "void ()" // CHECK-NEXT: }, +// CHECK-NEXT: "returnType": { +// CHECK-NEXT: "qualType": "void" +// CHECK-NEXT: }, // CHECK-NEXT: "inline": true, // CHECK-NEXT: "explicitlyDefaulted": "default" // CHECK-NEXT: } @@ -3534,6 +3561,9 @@ // CHECK-NEXT: "type": { // CHECK-NEXT: "qualType": "Derived3 &(const Derived3 &)" // CHECK-NEXT: }, +// CHECK-NEXT: "returnType": { +// CHECK-NEXT: "qualType": "Derived3 &" +// CHECK-NEXT: }, // CHECK-NEXT: "inline": true, // CHECK-NEXT: "explicitlyDefaulted": "default", // CHECK-NEXT: "inner": [ @@ -3589,6 +3619,9 @@ // CHECK-NEXT: "type": { // CHECK-NEXT: "qualType": "Derived3 &(Derived3 &&)" // CHECK-NEXT: }, +// CHECK-NEXT: "returnType": { +// CHECK-NEXT: "qualType": "Derived3 &" +// CHECK-NEXT: }, // CHECK-NEXT: "inline": true, // CHECK-NEXT: "explicitlyDefaulted": "default", // CHECK-NEXT: "inner": [ @@ -3644,6 +3677,9 @@ // CHECK-NEXT: "type": { // CHECK-NEXT: "qualType": "void ()" // CHECK-NEXT: }, +// CHECK-NEXT: "returnType": { +// CHECK-NEXT: "qualType": "void" +// CHECK-NEXT: }, // CHECK-NEXT: "inline": true, // CHECK-NEXT: "explicitlyDefaulted": "default" // CHECK-NEXT: } @@ -3787,6 +3823,9 @@ // CHECK-NEXT: "type": { // CHECK-NEXT: "qualType": "Derived4 &(const Derived4 &)" // CHECK-NEXT: }, +// CHECK-NEXT: "returnType": { +// CHECK-NEXT: "qualType": "Derived4 &" +// CHECK-NEXT: }, // CHECK-NEXT: "inline": true, // CHECK-NEXT: "explicitlyDefaulted": "default", // CHECK-NEXT: "inner": [ @@ -3842,6 +3881,9 @@ // CHECK-NEXT: "type": { // CHECK-NEXT: "qualType": "Derived4 &(Derived4 &&)" // CHECK-NEXT: }, +// CHECK-NEXT: "returnType": { +// CHECK-NEXT: "qualType": "Derived4 &" +// CHECK-NEXT: }, // CHECK-NEXT: "inline": true, // CHECK-NEXT: "explicitlyDefaulted": "default", // CHECK-NEXT: "inner": [ @@ -3897,6 +3939,9 @@ // CHECK-NEXT: "type": { // CHECK-NEXT: "qualType": "void ()" // CHECK-NEXT: }, +// CHECK-NEXT: "returnType": { +// CHECK-NEXT: "qualType": "void" +// CHECK-NEXT: }, // CHECK-NEXT: "inline": true, // CHECK-NEXT: "explicitlyDefaulted": "default" // CHECK-NEXT: } @@ -4026,6 +4071,9 @@ // CHECK-NEXT: "type": { // CHECK-NEXT: "qualType": "Derived5 &(const Derived5 &)" // CHECK-NEXT: }, +// CHECK-NEXT: "returnType": { +// CHECK-NEXT: "qualType": "Derived5 &" +// CHECK-NEXT: }, // CHECK-NEXT: "inline": true, // CHECK-NEXT: "explicitlyDefaulted": "default", // CHECK-NEXT: "inner": [ @@ -4081,6 +4129,9 @@ // CHECK-NEXT: "type": { // CHECK-NEXT: "qualType": "Derived5 &(Derived5 &&)" // CHECK-NEXT: }, +// CHECK-NEXT: "returnType": { +// CHECK-NEXT: "qualType": "Derived5 &" +// CHECK-NEXT: }, // CHECK-NEXT: "inline": true, // CHECK-NEXT: "explicitlyDefaulted": "default", // CHECK-NEXT: "inner": [ @@ -4136,6 +4187,9 @@ // CHECK-NEXT: "type": { // CHECK-NEXT: "qualType": "void ()" // CHECK-NEXT: }, +// CHECK-NEXT: "returnType": { +// CHECK-NEXT: "qualType": "void" +// CHECK-NEXT: }, // CHECK-NEXT: "inline": true, // CHECK-NEXT: "explicitlyDefaulted": "default" // CHECK-NEXT: } diff --git a/clang/test/AST/ast-dump-stmt-json.cpp b/clang/test/AST/ast-dump-stmt-json.cpp --- a/clang/test/AST/ast-dump-stmt-json.cpp +++ b/clang/test/AST/ast-dump-stmt-json.cpp @@ -151,6 +151,9 @@ // CHECK-NEXT: "type": { // CHECK-NEXT: "qualType": "void ()" // CHECK-NEXT: }, +// CHECK-NEXT: "returnType": { +// CHECK-NEXT: "qualType": "void" +// CHECK-NEXT: }, // CHECK-NEXT: "inner": [ // CHECK-NEXT: { // CHECK-NEXT: "id": "0x{{.*}}", @@ -303,6 +306,9 @@ // CHECK-NEXT: "type": { // CHECK-NEXT: "qualType": "void ()" // CHECK-NEXT: }, +// CHECK-NEXT: "returnType": { +// CHECK-NEXT: "qualType": "void" +// CHECK-NEXT: }, // CHECK-NEXT: "inner": [ // CHECK-NEXT: { // CHECK-NEXT: "id": "0x{{.*}}", @@ -537,6 +543,9 @@ // CHECK-NEXT: "type": { // CHECK-NEXT: "qualType": "void ()" // CHECK-NEXT: }, +// CHECK-NEXT: "returnType": { +// CHECK-NEXT: "qualType": "void" +// CHECK-NEXT: }, // CHECK-NEXT: "inner": [ // CHECK-NEXT: { // CHECK-NEXT: "id": "0x{{.*}}", @@ -689,6 +698,9 @@ // CHECK-NEXT: "type": { // CHECK-NEXT: "qualType": "void ()" // CHECK-NEXT: }, +// CHECK-NEXT: "returnType": { +// CHECK-NEXT: "qualType": "void" +// CHECK-NEXT: }, // CHECK-NEXT: "inner": [ // CHECK-NEXT: { // CHECK-NEXT: "id": "0x{{.*}}", @@ -818,6 +830,9 @@ // CHECK-NEXT: "type": { // CHECK-NEXT: "qualType": "void ()" // CHECK-NEXT: }, +// CHECK-NEXT: "returnType": { +// CHECK-NEXT: "qualType": "void" +// CHECK-NEXT: }, // CHECK-NEXT: "inner": [ // CHECK-NEXT: { // CHECK-NEXT: "id": "0x{{.*}}", @@ -1439,6 +1454,9 @@ // CHECK-NEXT: "type": { // CHECK-NEXT: "qualType": "void *(unsigned long)" // CHECK-NEXT: }, +// CHECK-NEXT: "returnType": { +// CHECK-NEXT: "qualType": "void *" +// CHECK-NEXT: }, // CHECK-NEXT: "inner": [ // CHECK-NEXT: { // CHECK-NEXT: "id": "0x{{.*}}", @@ -1496,6 +1514,9 @@ // CHECK-NEXT: "type": { // CHECK-NEXT: "qualType": "void *(unsigned long, std::align_val_t)" // CHECK-NEXT: }, +// CHECK-NEXT: "returnType": { +// CHECK-NEXT: "qualType": "void *" +// CHECK-NEXT: }, // CHECK-NEXT: "inner": [ // CHECK-NEXT: { // CHECK-NEXT: "id": "0x{{.*}}", @@ -1576,6 +1597,9 @@ // CHECK-NEXT: "type": { // CHECK-NEXT: "qualType": "void *(unsigned long)" // CHECK-NEXT: }, +// CHECK-NEXT: "returnType": { +// CHECK-NEXT: "qualType": "void *" +// CHECK-NEXT: }, // CHECK-NEXT: "inner": [ // CHECK-NEXT: { // CHECK-NEXT: "id": "0x{{.*}}", @@ -1633,6 +1657,9 @@ // CHECK-NEXT: "type": { // CHECK-NEXT: "qualType": "void *(unsigned long, std::align_val_t)" // CHECK-NEXT: }, +// CHECK-NEXT: "returnType": { +// CHECK-NEXT: "qualType": "void *" +// CHECK-NEXT: }, // CHECK-NEXT: "inner": [ // CHECK-NEXT: { // CHECK-NEXT: "id": "0x{{.*}}", @@ -1713,6 +1740,9 @@ // CHECK-NEXT: "type": { // CHECK-NEXT: "qualType": "void (void *) noexcept" // CHECK-NEXT: }, +// CHECK-NEXT: "returnType": { +// CHECK-NEXT: "qualType": "void" +// CHECK-NEXT: }, // CHECK-NEXT: "inner": [ // CHECK-NEXT: { // CHECK-NEXT: "id": "0x{{.*}}", @@ -1752,6 +1782,9 @@ // CHECK-NEXT: "type": { // CHECK-NEXT: "qualType": "void (void *, std::align_val_t) noexcept" // CHECK-NEXT: }, +// CHECK-NEXT: "returnType": { +// CHECK-NEXT: "qualType": "void" +// CHECK-NEXT: }, // CHECK-NEXT: "inner": [ // CHECK-NEXT: { // CHECK-NEXT: "id": "0x{{.*}}", @@ -1805,6 +1838,9 @@ // CHECK-NEXT: "type": { // CHECK-NEXT: "qualType": "void (void *) noexcept" // CHECK-NEXT: }, +// CHECK-NEXT: "returnType": { +// CHECK-NEXT: "qualType": "void" +// CHECK-NEXT: }, // CHECK-NEXT: "inner": [ // CHECK-NEXT: { // CHECK-NEXT: "id": "0x{{.*}}", @@ -1844,6 +1880,9 @@ // CHECK-NEXT: "type": { // CHECK-NEXT: "qualType": "void (void *, std::align_val_t) noexcept" // CHECK-NEXT: }, +// CHECK-NEXT: "returnType": { +// CHECK-NEXT: "qualType": "void" +// CHECK-NEXT: }, // CHECK-NEXT: "inner": [ // CHECK-NEXT: { // CHECK-NEXT: "id": "0x{{.*}}", @@ -1960,6 +1999,9 @@ // CHECK-NEXT: "type": { // CHECK-NEXT: "qualType": "void ()" // CHECK-NEXT: }, +// CHECK-NEXT: "returnType": { +// CHECK-NEXT: "qualType": "void" +// CHECK-NEXT: }, // CHECK-NEXT: "inner": [ // CHECK-NEXT: { // CHECK-NEXT: "id": "0x{{.*}}", @@ -2183,6 +2225,9 @@ // CHECK-NEXT: "type": { // CHECK-NEXT: "qualType": "void ()" // CHECK-NEXT: }, +// CHECK-NEXT: "returnType": { +// CHECK-NEXT: "qualType": "void" +// CHECK-NEXT: }, // CHECK-NEXT: "inner": [ // CHECK-NEXT: { // CHECK-NEXT: "id": "0x{{.*}}", @@ -2690,6 +2735,9 @@ // CHECK-NEXT: "type": { // CHECK-NEXT: "qualType": "void ()" // CHECK-NEXT: }, +// CHECK-NEXT: "returnType": { +// CHECK-NEXT: "qualType": "void" +// CHECK-NEXT: }, // CHECK-NEXT: "inner": [ // CHECK-NEXT: { // CHECK-NEXT: "id": "0x{{.*}}", @@ -2906,6 +2954,9 @@ // CHECK-NEXT: "type": { // CHECK-NEXT: "qualType": "void ()" // CHECK-NEXT: }, +// CHECK-NEXT: "returnType": { +// CHECK-NEXT: "qualType": "void" +// CHECK-NEXT: }, // CHECK-NEXT: "inner": [ // CHECK-NEXT: { // CHECK-NEXT: "id": "0x{{.*}}", @@ -3105,6 +3156,9 @@ // CHECK-NEXT: "type": { // CHECK-NEXT: "qualType": "void (int)" // CHECK-NEXT: }, +// CHECK-NEXT: "returnType": { +// CHECK-NEXT: "qualType": "void" +// CHECK-NEXT: }, // CHECK-NEXT: "inner": [ // CHECK-NEXT: { // CHECK-NEXT: "id": "0x{{.*}}", @@ -3316,6 +3370,9 @@ // CHECK-NEXT: "type": { // CHECK-NEXT: "qualType": "void (bool)" // CHECK-NEXT: }, +// CHECK-NEXT: "returnType": { +// CHECK-NEXT: "qualType": "void" +// CHECK-NEXT: }, // CHECK-NEXT: "inner": [ // CHECK-NEXT: { // CHECK-NEXT: "id": "0x{{.*}}", @@ -4000,6 +4057,9 @@ // CHECK-NEXT: "type": { // CHECK-NEXT: "qualType": "void ()" // CHECK-NEXT: }, +// CHECK-NEXT: "returnType": { +// CHECK-NEXT: "qualType": "void" +// CHECK-NEXT: }, // CHECK-NEXT: "inner": [ // CHECK-NEXT: { // CHECK-NEXT: "id": "0x{{.*}}", @@ -6737,6 +6797,9 @@ // CHECK-NEXT: "type": { // CHECK-NEXT: "qualType": "void (Ty)" // CHECK-NEXT: }, +// CHECK-NEXT: "returnType": { +// CHECK-NEXT: "qualType": "void" +// CHECK-NEXT: }, // CHECK-NEXT: "inner": [ // CHECK-NEXT: { // CHECK-NEXT: "id": "0x{{.*}}", diff --git a/clang/test/AST/ast-dump-stmt-json.m b/clang/test/AST/ast-dump-stmt-json.m --- a/clang/test/AST/ast-dump-stmt-json.m +++ b/clang/test/AST/ast-dump-stmt-json.m @@ -48,6 +48,9 @@ // CHECK-NEXT: "type": { // CHECK-NEXT: "qualType": "void (int)" // CHECK-NEXT: }, +// CHECK-NEXT: "returnType": { +// CHECK-NEXT: "qualType": "void" +// CHECK-NEXT: }, // CHECK-NEXT: "inner": [ // CHECK-NEXT: { // CHECK-NEXT: "id": "0x{{.*}}", @@ -281,6 +284,9 @@ // CHECK-NEXT: "type": { // CHECK-NEXT: "qualType": "void (int)" // CHECK-NEXT: }, +// CHECK-NEXT: "returnType": { +// CHECK-NEXT: "qualType": "void" +// CHECK-NEXT: }, // CHECK-NEXT: "inner": [ // CHECK-NEXT: { // CHECK-NEXT: "id": "0x{{.*}}", @@ -514,6 +520,9 @@ // CHECK-NEXT: "type": { // CHECK-NEXT: "qualType": "void ()" // CHECK-NEXT: }, +// CHECK-NEXT: "returnType": { +// CHECK-NEXT: "qualType": "void" +// CHECK-NEXT: }, // CHECK-NEXT: "inner": [ // CHECK-NEXT: { // CHECK-NEXT: "id": "0x{{.*}}", diff --git a/clang/test/AST/ast-dump-template-decls-json.cpp b/clang/test/AST/ast-dump-template-decls-json.cpp --- a/clang/test/AST/ast-dump-template-decls-json.cpp +++ b/clang/test/AST/ast-dump-template-decls-json.cpp @@ -287,6 +287,9 @@ // CHECK-NEXT: "type": { // CHECK-NEXT: "qualType": "void (Ty)" // CHECK-NEXT: }, +// CHECK-NEXT: "returnType": { +// CHECK-NEXT: "qualType": "void" +// CHECK-NEXT: }, // CHECK-NEXT: "inner": [ // CHECK-NEXT: { // CHECK-NEXT: "id": "0x{{.*}}", @@ -394,6 +397,9 @@ // CHECK-NEXT: "type": { // CHECK-NEXT: "qualType": "void (Ty...)" // CHECK-NEXT: }, +// CHECK-NEXT: "returnType": { +// CHECK-NEXT: "qualType": "void" +// CHECK-NEXT: }, // CHECK-NEXT: "inner": [ // CHECK-NEXT: { // CHECK-NEXT: "id": "0x{{.*}}", @@ -526,6 +532,9 @@ // CHECK-NEXT: "type": { // CHECK-NEXT: "qualType": "void (Ty)" // CHECK-NEXT: }, +// CHECK-NEXT: "returnType": { +// CHECK-NEXT: "qualType": "void" +// CHECK-NEXT: }, // CHECK-NEXT: "inner": [ // CHECK-NEXT: { // CHECK-NEXT: "id": "0x{{.*}}", @@ -592,6 +601,9 @@ // CHECK-NEXT: "type": { // CHECK-NEXT: "qualType": "void (float)" // CHECK-NEXT: }, +// CHECK-NEXT: "returnType": { +// CHECK-NEXT: "qualType": "void" +// CHECK-NEXT: }, // CHECK-NEXT: "inner": [ // CHECK-NEXT: { // CHECK-NEXT: "kind": "TemplateArgument", @@ -776,6 +788,9 @@ // CHECK-NEXT: "type": { // CHECK-NEXT: "qualType": "void (Ty, Uy)" // CHECK-NEXT: }, +// CHECK-NEXT: "returnType": { +// CHECK-NEXT: "qualType": "void" +// CHECK-NEXT: }, // CHECK-NEXT: "inner": [ // CHECK-NEXT: { // CHECK-NEXT: "id": "0x{{.*}}", @@ -906,6 +921,9 @@ // CHECK-NEXT: "type": { // CHECK-NEXT: "qualType": "void (Ty)" // CHECK-NEXT: }, +// CHECK-NEXT: "returnType": { +// CHECK-NEXT: "qualType": "void" +// CHECK-NEXT: }, // CHECK-NEXT: "inner": [ // CHECK-NEXT: { // CHECK-NEXT: "id": "0x{{.*}}", @@ -1014,6 +1032,9 @@ // CHECK-NEXT: "type": { // CHECK-NEXT: "qualType": "void (int)" // CHECK-NEXT: }, +// CHECK-NEXT: "returnType": { +// CHECK-NEXT: "qualType": "void" +// CHECK-NEXT: }, // CHECK-NEXT: "inner": [ // CHECK-NEXT: { // CHECK-NEXT: "id": "0x{{.*}}", @@ -1176,6 +1197,9 @@ // CHECK-NEXT: "type": { // CHECK-NEXT: "qualType": "void (Ty)" // CHECK-NEXT: }, +// CHECK-NEXT: "returnType": { +// CHECK-NEXT: "qualType": "void" +// CHECK-NEXT: }, // CHECK-NEXT: "inner": [ // CHECK-NEXT: { // CHECK-NEXT: "id": "0x{{.*}}", @@ -1302,6 +1326,9 @@ // CHECK-NEXT: "name": "h", // CHECK-NEXT: "type": { // CHECK-NEXT: "qualType": "void ()" +// CHECK-NEXT: }, +// CHECK-NEXT: "returnType": { +// CHECK-NEXT: "qualType": "void" // CHECK-NEXT: } // CHECK-NEXT: } // CHECK-NEXT: ] @@ -2468,6 +2495,9 @@ // CHECK-NEXT: "name": "f", // CHECK-NEXT: "type": { // CHECK-NEXT: "qualType": "void ()" +// CHECK-NEXT: }, +// CHECK-NEXT: "returnType": { +// CHECK-NEXT: "qualType": "void" // CHECK-NEXT: } // CHECK-NEXT: } // CHECK-NEXT: ] @@ -2558,6 +2588,9 @@ // CHECK-NEXT: "type": { // CHECK-NEXT: "qualType": "void ()" // CHECK-NEXT: }, +// CHECK-NEXT: "returnType": { +// CHECK-NEXT: "qualType": "void" +// CHECK-NEXT: }, // CHECK-NEXT: "inner": [ // CHECK-NEXT: { // CHECK-NEXT: "id": "0x{{.*}}",