r363943 - Dump more information about expressions involving temporaries when dumping the AST to JSON.
Aaron Ballman via cfe-commits
cfe-commits at lists.llvm.org
Thu Jun 20 09:22:36 PDT 2019
Author: aaronballman
Date: Thu Jun 20 09:22:35 2019
New Revision: 363943
URL: http://llvm.org/viewvc/llvm-project?rev=363943&view=rev
Log:
Dump more information about expressions involving temporaries when dumping the AST to JSON.
Added:
cfe/trunk/test/AST/ast-dump-temporaries-json.cpp
Modified:
cfe/trunk/include/clang/AST/JSONNodeDumper.h
cfe/trunk/lib/AST/JSONNodeDumper.cpp
cfe/trunk/test/AST/ast-dump-decl-json.m
cfe/trunk/test/AST/ast-dump-stmt-json.m
Modified: cfe/trunk/include/clang/AST/JSONNodeDumper.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/AST/JSONNodeDumper.h?rev=363943&r1=363942&r2=363943&view=diff
==============================================================================
--- cfe/trunk/include/clang/AST/JSONNodeDumper.h (original)
+++ cfe/trunk/include/clang/AST/JSONNodeDumper.h Thu Jun 20 09:22:35 2019
@@ -255,6 +255,9 @@ public:
void VisitGenericSelectionExpr(const GenericSelectionExpr *GSE);
void VisitCXXUnresolvedConstructExpr(const CXXUnresolvedConstructExpr *UCE);
void VisitCXXConstructExpr(const CXXConstructExpr *CE);
+ void VisitExprWithCleanups(const ExprWithCleanups *EWC);
+ void VisitCXXBindTemporaryExpr(const CXXBindTemporaryExpr *BTE);
+ void VisitMaterializeTemporaryExpr(const MaterializeTemporaryExpr *MTE);
void VisitIntegerLiteral(const IntegerLiteral *IL);
void VisitCharacterLiteral(const CharacterLiteral *CL);
Modified: cfe/trunk/lib/AST/JSONNodeDumper.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/AST/JSONNodeDumper.cpp?rev=363943&r1=363942&r2=363943&view=diff
==============================================================================
--- cfe/trunk/lib/AST/JSONNodeDumper.cpp (original)
+++ cfe/trunk/lib/AST/JSONNodeDumper.cpp Thu Jun 20 09:22:35 2019
@@ -1026,6 +1026,51 @@ void JSONNodeDumper::VisitCXXConstructEx
}
}
+void JSONNodeDumper::VisitExprWithCleanups(const ExprWithCleanups *EWC) {
+ attributeOnlyIfTrue("cleanupsHaveSideEffects",
+ EWC->cleanupsHaveSideEffects());
+ if (EWC->getNumObjects()) {
+ JOS.attributeArray("cleanups", [this, EWC] {
+ for (const ExprWithCleanups::CleanupObject &CO : EWC->getObjects())
+ JOS.value(createBareDeclRef(CO));
+ });
+ }
+}
+
+void JSONNodeDumper::VisitCXXBindTemporaryExpr(
+ const CXXBindTemporaryExpr *BTE) {
+ const CXXTemporary *Temp = BTE->getTemporary();
+ JOS.attribute("temp", createPointerRepresentation(Temp));
+ if (const CXXDestructorDecl *Dtor = Temp->getDestructor())
+ JOS.attribute("dtor", createBareDeclRef(Dtor));
+}
+
+void JSONNodeDumper::VisitMaterializeTemporaryExpr(
+ const MaterializeTemporaryExpr *MTE) {
+ if (const ValueDecl *VD = MTE->getExtendingDecl())
+ JOS.attribute("extendingDecl", createBareDeclRef(VD));
+
+ switch (MTE->getStorageDuration()) {
+ case SD_Automatic:
+ JOS.attribute("storageDuration", "automatic");
+ break;
+ case SD_Dynamic:
+ JOS.attribute("storageDuration", "dynamic");
+ break;
+ case SD_FullExpression:
+ JOS.attribute("storageDuration", "full expression");
+ break;
+ case SD_Static:
+ JOS.attribute("storageDuration", "static");
+ break;
+ case SD_Thread:
+ JOS.attribute("storageDuration", "thread");
+ break;
+ }
+
+ attributeOnlyIfTrue("boundToLValueRef", MTE->isBoundToLvalueReference());
+}
+
void JSONNodeDumper::VisitIntegerLiteral(const IntegerLiteral *IL) {
JOS.attribute("value",
IL->getValue().toString(
Modified: 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=363943&r1=363942&r2=363943&view=diff
==============================================================================
--- cfe/trunk/test/AST/ast-dump-decl-json.m (original)
+++ cfe/trunk/test/AST/ast-dump-decl-json.m Thu Jun 20 09:22:35 2019
@@ -83,6 +83,7 @@ void f() {
__typeof__(B.foo) Test;
}
+
// CHECK: "kind": "ObjCInterfaceDecl",
// CHECK-NEXT: "loc": {
// CHECK-NEXT: "col": 12,
@@ -1492,6 +1493,13 @@ void f() {
// CHECK-NEXT: "qualType": "void (^)(int, ...)"
// CHECK-NEXT: },
// CHECK-NEXT: "valueCategory": "rvalue",
+// CHECK-NEXT: "cleanupsHaveSideEffects": true,
+// CHECK-NEXT: "cleanups": [
+// CHECK-NEXT: {
+// CHECK-NEXT: "id": "0x{{.*}}",
+// CHECK-NEXT: "kind": "BlockDecl"
+// CHECK-NEXT: }
+// CHECK-NEXT: ],
// CHECK-NEXT: "inner": [
// CHECK-NEXT: {
// CHECK-NEXT: "id": "0x{{.*}}",
@@ -1701,4 +1709,3 @@ void f() {
// CHECK-NEXT: "qualType": "typeof (B.foo)"
// CHECK-NEXT: }
// CHECK-NEXT: }
-
Modified: cfe/trunk/test/AST/ast-dump-stmt-json.m
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/AST/ast-dump-stmt-json.m?rev=363943&r1=363942&r2=363943&view=diff
==============================================================================
--- cfe/trunk/test/AST/ast-dump-stmt-json.m (original)
+++ cfe/trunk/test/AST/ast-dump-stmt-json.m Thu Jun 20 09:22:35 2019
@@ -104,6 +104,13 @@ void TestObjCAtCatchStmt() {
// CHECK-NEXT: "qualType": "void (^)(void)"
// CHECK-NEXT: },
// CHECK-NEXT: "valueCategory": "rvalue",
+// CHECK-NEXT: "cleanupsHaveSideEffects": true,
+// CHECK-NEXT: "cleanups": [
+// CHECK-NEXT: {
+// CHECK-NEXT: "id": "0x{{.*}}",
+// CHECK-NEXT: "kind": "BlockDecl"
+// CHECK-NEXT: }
+// CHECK-NEXT: ],
// CHECK-NEXT: "inner": [
// CHECK-NEXT: {
// CHECK-NEXT: "id": "0x{{.*}}",
@@ -322,6 +329,13 @@ void TestObjCAtCatchStmt() {
// CHECK-NEXT: "qualType": "void (^)(void)"
// CHECK-NEXT: },
// CHECK-NEXT: "valueCategory": "rvalue",
+// CHECK-NEXT: "cleanupsHaveSideEffects": true,
+// CHECK-NEXT: "cleanups": [
+// CHECK-NEXT: {
+// CHECK-NEXT: "id": "0x{{.*}}",
+// CHECK-NEXT: "kind": "BlockDecl"
+// CHECK-NEXT: }
+// CHECK-NEXT: ],
// CHECK-NEXT: "inner": [
// CHECK-NEXT: {
// CHECK-NEXT: "id": "0x{{.*}}",
@@ -716,4 +730,3 @@ void TestObjCAtCatchStmt() {
// CHECK-NEXT: }
// CHECK-NEXT: ]
// CHECK-NEXT: }
-
Added: cfe/trunk/test/AST/ast-dump-temporaries-json.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/AST/ast-dump-temporaries-json.cpp?rev=363943&view=auto
==============================================================================
--- cfe/trunk/test/AST/ast-dump-temporaries-json.cpp (added)
+++ cfe/trunk/test/AST/ast-dump-temporaries-json.cpp Thu Jun 20 09:22:35 2019
@@ -0,0 +1,446 @@
+// RUN: %clang_cc1 -triple x86_64-linux-gnu -fsyntax-only -ast-dump=json %s | FileCheck %s
+
+struct S {
+ S() {}
+ ~S() {}
+};
+
+void func(const int &);
+
+void BindTemp() {
+ const S &s = S();
+}
+
+void MaterializeTemp() {
+ const int &i = 1.0;
+
+ float f = 1.0f;
+ func(f);
+}
+
+
+
+// CHECK: "kind": "ExprWithCleanups",
+// CHECK-NEXT: "range": {
+// CHECK-NEXT: "begin": {
+// CHECK-NEXT: "col": 16,
+// CHECK-NEXT: "file": "{{.*}}",
+// CHECK-NEXT: "line": 11
+// CHECK-NEXT: },
+// CHECK-NEXT: "end": {
+// CHECK-NEXT: "col": 18,
+// CHECK-NEXT: "file": "{{.*}}",
+// CHECK-NEXT: "line": 11
+// CHECK-NEXT: }
+// CHECK-NEXT: },
+// CHECK-NEXT: "type": {
+// CHECK-NEXT: "qualType": "const S"
+// CHECK-NEXT: },
+// CHECK-NEXT: "valueCategory": "lvalue",
+// CHECK-NEXT: "cleanupsHaveSideEffects": true,
+// CHECK-NEXT: "inner": [
+// CHECK-NEXT: {
+// CHECK-NEXT: "id": "0x{{.*}}",
+// CHECK-NEXT: "kind": "MaterializeTemporaryExpr",
+// CHECK-NEXT: "range": {
+// CHECK-NEXT: "begin": {
+// CHECK-NEXT: "col": 16,
+// CHECK-NEXT: "file": "{{.*}}",
+// CHECK-NEXT: "line": 11
+// CHECK-NEXT: },
+// CHECK-NEXT: "end": {
+// CHECK-NEXT: "col": 18,
+// CHECK-NEXT: "file": "{{.*}}",
+// CHECK-NEXT: "line": 11
+// CHECK-NEXT: }
+// CHECK-NEXT: },
+// CHECK-NEXT: "type": {
+// CHECK-NEXT: "qualType": "const S"
+// CHECK-NEXT: },
+// CHECK-NEXT: "valueCategory": "lvalue",
+// CHECK-NEXT: "extendingDecl": {
+// CHECK-NEXT: "id": "0x{{.*}}",
+// CHECK-NEXT: "kind": "VarDecl",
+// CHECK-NEXT: "name": "s",
+// CHECK-NEXT: "type": {
+// CHECK-NEXT: "qualType": "const S &"
+// CHECK-NEXT: }
+// CHECK-NEXT: },
+// CHECK-NEXT: "storageDuration": "automatic",
+// CHECK-NEXT: "boundToLValueRef": true,
+// CHECK-NEXT: "inner": [
+// CHECK-NEXT: {
+// CHECK-NEXT: "id": "0x{{.*}}",
+// CHECK-NEXT: "kind": "ImplicitCastExpr",
+// CHECK-NEXT: "range": {
+// CHECK-NEXT: "begin": {
+// CHECK-NEXT: "col": 16,
+// CHECK-NEXT: "file": "{{.*}}",
+// CHECK-NEXT: "line": 11
+// CHECK-NEXT: },
+// CHECK-NEXT: "end": {
+// CHECK-NEXT: "col": 18,
+// CHECK-NEXT: "file": "{{.*}}",
+// CHECK-NEXT: "line": 11
+// CHECK-NEXT: }
+// CHECK-NEXT: },
+// CHECK-NEXT: "type": {
+// CHECK-NEXT: "qualType": "const S"
+// CHECK-NEXT: },
+// CHECK-NEXT: "valueCategory": "rvalue",
+// CHECK-NEXT: "castKind": "NoOp",
+// CHECK-NEXT: "inner": [
+// CHECK-NEXT: {
+// CHECK-NEXT: "id": "0x{{.*}}",
+// CHECK-NEXT: "kind": "CXXBindTemporaryExpr",
+// CHECK-NEXT: "range": {
+// CHECK-NEXT: "begin": {
+// CHECK-NEXT: "col": 16,
+// CHECK-NEXT: "file": "{{.*}}",
+// CHECK-NEXT: "line": 11
+// CHECK-NEXT: },
+// CHECK-NEXT: "end": {
+// CHECK-NEXT: "col": 18,
+// CHECK-NEXT: "file": "{{.*}}",
+// CHECK-NEXT: "line": 11
+// CHECK-NEXT: }
+// CHECK-NEXT: },
+// CHECK-NEXT: "type": {
+// CHECK-NEXT: "qualType": "S"
+// CHECK-NEXT: },
+// CHECK-NEXT: "valueCategory": "rvalue",
+// CHECK-NEXT: "temp": "0x{{.*}}",
+// CHECK-NEXT: "dtor": {
+// CHECK-NEXT: "id": "0x{{.*}}",
+// CHECK-NEXT: "kind": "CXXDestructorDecl",
+// CHECK-NEXT: "name": "~S",
+// CHECK-NEXT: "type": {
+// CHECK-NEXT: "qualType": "void () noexcept"
+// CHECK-NEXT: }
+// CHECK-NEXT: },
+// CHECK-NEXT: "inner": [
+// CHECK-NEXT: {
+// CHECK-NEXT: "id": "0x{{.*}}",
+// CHECK-NEXT: "kind": "CXXTemporaryObjectExpr",
+// CHECK-NEXT: "range": {
+// CHECK-NEXT: "begin": {
+// CHECK-NEXT: "col": 16,
+// CHECK-NEXT: "file": "{{.*}}",
+// CHECK-NEXT: "line": 11
+// CHECK-NEXT: },
+// CHECK-NEXT: "end": {
+// CHECK-NEXT: "col": 18,
+// CHECK-NEXT: "file": "{{.*}}",
+// CHECK-NEXT: "line": 11
+// CHECK-NEXT: }
+// CHECK-NEXT: },
+// CHECK-NEXT: "type": {
+// CHECK-NEXT: "qualType": "S"
+// CHECK-NEXT: },
+// CHECK-NEXT: "valueCategory": "rvalue",
+// CHECK-NEXT: "ctorType": {
+// CHECK-NEXT: "qualType": "void ()"
+// CHECK-NEXT: },
+// CHECK-NEXT: "hadMultipleCandidates": true,
+// CHECK-NEXT: "constructionKind": "complete"
+// CHECK-NEXT: }
+// CHECK-NEXT: ]
+// CHECK-NEXT: }
+// CHECK-NEXT: ]
+// CHECK-NEXT: }
+// CHECK-NEXT: ]
+// CHECK-NEXT: }
+// CHECK-NEXT: ]
+// CHECK-NEXT: }
+
+
+// CHECK: "kind": "ExprWithCleanups",
+// CHECK-NEXT: "range": {
+// CHECK-NEXT: "begin": {
+// CHECK-NEXT: "col": 18,
+// 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: "type": {
+// CHECK-NEXT: "qualType": "const int"
+// CHECK-NEXT: },
+// CHECK-NEXT: "valueCategory": "lvalue",
+// CHECK-NEXT: "inner": [
+// CHECK-NEXT: {
+// CHECK-NEXT: "id": "0x{{.*}}",
+// CHECK-NEXT: "kind": "MaterializeTemporaryExpr",
+// CHECK-NEXT: "range": {
+// CHECK-NEXT: "begin": {
+// CHECK-NEXT: "col": 18,
+// 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: "type": {
+// CHECK-NEXT: "qualType": "const int"
+// CHECK-NEXT: },
+// CHECK-NEXT: "valueCategory": "lvalue",
+// CHECK-NEXT: "extendingDecl": {
+// CHECK-NEXT: "id": "0x{{.*}}",
+// CHECK-NEXT: "kind": "VarDecl",
+// CHECK-NEXT: "name": "i",
+// CHECK-NEXT: "type": {
+// CHECK-NEXT: "qualType": "const int &"
+// CHECK-NEXT: }
+// CHECK-NEXT: },
+// CHECK-NEXT: "storageDuration": "automatic",
+// CHECK-NEXT: "boundToLValueRef": true,
+// 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": 15
+// CHECK-NEXT: },
+// CHECK-NEXT: "end": {
+// CHECK-NEXT: "col": 18,
+// CHECK-NEXT: "file": "{{.*}}",
+// CHECK-NEXT: "line": 15
+// CHECK-NEXT: }
+// CHECK-NEXT: },
+// CHECK-NEXT: "type": {
+// CHECK-NEXT: "qualType": "const int"
+// CHECK-NEXT: },
+// CHECK-NEXT: "valueCategory": "rvalue",
+// CHECK-NEXT: "castKind": "FloatingToIntegral",
+// CHECK-NEXT: "inner": [
+// CHECK-NEXT: {
+// CHECK-NEXT: "id": "0x{{.*}}",
+// CHECK-NEXT: "kind": "FloatingLiteral",
+// CHECK-NEXT: "range": {
+// CHECK-NEXT: "begin": {
+// CHECK-NEXT: "col": 18,
+// 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: "type": {
+// CHECK-NEXT: "qualType": "double"
+// CHECK-NEXT: },
+// CHECK-NEXT: "valueCategory": "rvalue",
+// CHECK-NEXT: "value": 1
+// CHECK-NEXT: }
+// CHECK-NEXT: ]
+// CHECK-NEXT: }
+// CHECK-NEXT: ]
+// CHECK-NEXT: }
+// CHECK-NEXT: ]
+// CHECK-NEXT: }
+
+
+// CHECK: "kind": "ExprWithCleanups",
+// CHECK-NEXT: "range": {
+// CHECK-NEXT: "begin": {
+// CHECK-NEXT: "col": 3,
+// CHECK-NEXT: "file": "{{.*}}",
+// CHECK-NEXT: "line": 18
+// CHECK-NEXT: },
+// CHECK-NEXT: "end": {
+// CHECK-NEXT: "col": 9,
+// CHECK-NEXT: "file": "{{.*}}",
+// CHECK-NEXT: "line": 18
+// CHECK-NEXT: }
+// CHECK-NEXT: },
+// CHECK-NEXT: "type": {
+// CHECK-NEXT: "qualType": "void"
+// CHECK-NEXT: },
+// CHECK-NEXT: "valueCategory": "rvalue",
+// CHECK-NEXT: "inner": [
+// CHECK-NEXT: {
+// CHECK-NEXT: "id": "0x{{.*}}",
+// CHECK-NEXT: "kind": "CallExpr",
+// CHECK-NEXT: "range": {
+// CHECK-NEXT: "begin": {
+// CHECK-NEXT: "col": 3,
+// CHECK-NEXT: "file": "{{.*}}",
+// CHECK-NEXT: "line": 18
+// CHECK-NEXT: },
+// CHECK-NEXT: "end": {
+// CHECK-NEXT: "col": 9,
+// CHECK-NEXT: "file": "{{.*}}",
+// CHECK-NEXT: "line": 18
+// CHECK-NEXT: }
+// CHECK-NEXT: },
+// CHECK-NEXT: "type": {
+// CHECK-NEXT: "qualType": "void"
+// CHECK-NEXT: },
+// CHECK-NEXT: "valueCategory": "rvalue",
+// CHECK-NEXT: "inner": [
+// CHECK-NEXT: {
+// CHECK-NEXT: "id": "0x{{.*}}",
+// CHECK-NEXT: "kind": "ImplicitCastExpr",
+// CHECK-NEXT: "range": {
+// CHECK-NEXT: "begin": {
+// CHECK-NEXT: "col": 3,
+// CHECK-NEXT: "file": "{{.*}}",
+// CHECK-NEXT: "line": 18
+// CHECK-NEXT: },
+// CHECK-NEXT: "end": {
+// CHECK-NEXT: "col": 3,
+// CHECK-NEXT: "file": "{{.*}}",
+// CHECK-NEXT: "line": 18
+// CHECK-NEXT: }
+// CHECK-NEXT: },
+// CHECK-NEXT: "type": {
+// CHECK-NEXT: "qualType": "void (*)(const int &)"
+// CHECK-NEXT: },
+// CHECK-NEXT: "valueCategory": "rvalue",
+// CHECK-NEXT: "castKind": "FunctionToPointerDecay",
+// CHECK-NEXT: "inner": [
+// CHECK-NEXT: {
+// CHECK-NEXT: "id": "0x{{.*}}",
+// CHECK-NEXT: "kind": "DeclRefExpr",
+// CHECK-NEXT: "range": {
+// CHECK-NEXT: "begin": {
+// CHECK-NEXT: "col": 3,
+// CHECK-NEXT: "file": "{{.*}}",
+// CHECK-NEXT: "line": 18
+// CHECK-NEXT: },
+// CHECK-NEXT: "end": {
+// CHECK-NEXT: "col": 3,
+// CHECK-NEXT: "file": "{{.*}}",
+// CHECK-NEXT: "line": 18
+// CHECK-NEXT: }
+// CHECK-NEXT: },
+// CHECK-NEXT: "type": {
+// CHECK-NEXT: "qualType": "void (const int &)"
+// CHECK-NEXT: },
+// CHECK-NEXT: "valueCategory": "lvalue",
+// CHECK-NEXT: "referencedDecl": {
+// CHECK-NEXT: "id": "0x{{.*}}",
+// CHECK-NEXT: "kind": "FunctionDecl",
+// CHECK-NEXT: "name": "func",
+// CHECK-NEXT: "type": {
+// CHECK-NEXT: "qualType": "void (const int &)"
+// CHECK-NEXT: }
+// CHECK-NEXT: }
+// CHECK-NEXT: }
+// CHECK-NEXT: ]
+// CHECK-NEXT: },
+// CHECK-NEXT: {
+// CHECK-NEXT: "id": "0x{{.*}}",
+// CHECK-NEXT: "kind": "MaterializeTemporaryExpr",
+// CHECK-NEXT: "range": {
+// CHECK-NEXT: "begin": {
+// CHECK-NEXT: "col": 8,
+// CHECK-NEXT: "file": "{{.*}}",
+// CHECK-NEXT: "line": 18
+// CHECK-NEXT: },
+// CHECK-NEXT: "end": {
+// CHECK-NEXT: "col": 8,
+// CHECK-NEXT: "file": "{{.*}}",
+// CHECK-NEXT: "line": 18
+// CHECK-NEXT: }
+// CHECK-NEXT: },
+// CHECK-NEXT: "type": {
+// CHECK-NEXT: "qualType": "const int"
+// CHECK-NEXT: },
+// CHECK-NEXT: "valueCategory": "lvalue",
+// CHECK-NEXT: "storageDuration": "full expression",
+// CHECK-NEXT: "boundToLValueRef": true,
+// CHECK-NEXT: "inner": [
+// CHECK-NEXT: {
+// CHECK-NEXT: "id": "0x{{.*}}",
+// CHECK-NEXT: "kind": "ImplicitCastExpr",
+// CHECK-NEXT: "range": {
+// CHECK-NEXT: "begin": {
+// CHECK-NEXT: "col": 8,
+// CHECK-NEXT: "file": "{{.*}}",
+// CHECK-NEXT: "line": 18
+// CHECK-NEXT: },
+// CHECK-NEXT: "end": {
+// CHECK-NEXT: "col": 8,
+// CHECK-NEXT: "file": "{{.*}}",
+// CHECK-NEXT: "line": 18
+// CHECK-NEXT: }
+// CHECK-NEXT: },
+// CHECK-NEXT: "type": {
+// CHECK-NEXT: "qualType": "const int"
+// CHECK-NEXT: },
+// CHECK-NEXT: "valueCategory": "rvalue",
+// CHECK-NEXT: "castKind": "FloatingToIntegral",
+// CHECK-NEXT: "inner": [
+// CHECK-NEXT: {
+// CHECK-NEXT: "id": "0x{{.*}}",
+// CHECK-NEXT: "kind": "ImplicitCastExpr",
+// CHECK-NEXT: "range": {
+// CHECK-NEXT: "begin": {
+// CHECK-NEXT: "col": 8,
+// CHECK-NEXT: "file": "{{.*}}",
+// CHECK-NEXT: "line": 18
+// CHECK-NEXT: },
+// CHECK-NEXT: "end": {
+// CHECK-NEXT: "col": 8,
+// CHECK-NEXT: "file": "{{.*}}",
+// CHECK-NEXT: "line": 18
+// CHECK-NEXT: }
+// CHECK-NEXT: },
+// CHECK-NEXT: "type": {
+// CHECK-NEXT: "qualType": "float"
+// 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": 8,
+// CHECK-NEXT: "file": "{{.*}}",
+// CHECK-NEXT: "line": 18
+// CHECK-NEXT: },
+// CHECK-NEXT: "end": {
+// CHECK-NEXT: "col": 8,
+// CHECK-NEXT: "file": "{{.*}}",
+// CHECK-NEXT: "line": 18
+// CHECK-NEXT: }
+// CHECK-NEXT: },
+// CHECK-NEXT: "type": {
+// CHECK-NEXT: "qualType": "float"
+// CHECK-NEXT: },
+// CHECK-NEXT: "valueCategory": "lvalue",
+// CHECK-NEXT: "referencedDecl": {
+// CHECK-NEXT: "id": "0x{{.*}}",
+// CHECK-NEXT: "kind": "VarDecl",
+// CHECK-NEXT: "name": "f",
+// CHECK-NEXT: "type": {
+// CHECK-NEXT: "qualType": "float"
+// 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-NEXT: }
+
More information about the cfe-commits
mailing list