@@ -49,7 +49,7 @@ declaration: Function - root
4949 )" },
5050 {R"cpp(
5151namespace root {
52- struct S { static const int x = 0; };
52+ struct S { static const int x = 0; ~S(); };
5353int y = S::x + root::S().x;
5454}
5555 )cpp" ,
@@ -60,10 +60,12 @@ declaration: Namespace - root
6060 type: Qualified - const
6161 type: Builtin - int
6262 expression: IntegerLiteral - 0
63+ declaration: CXXDestructor
64+ type: Record - S
65+ type: FunctionProto
66+ type: Builtin - void
6367 declaration: CXXConstructor
6468 declaration: CXXConstructor
65- declaration: CXXConstructor
66- declaration: CXXDestructor
6769 declaration: Var - y
6870 type: Builtin - int
6971 expression: ExprWithCleanups
@@ -74,14 +76,45 @@ declaration: Namespace - root
7476 type: Record - S
7577 expression: ImplicitCast - LValueToRValue
7678 expression: Member - x
77- expression: MaterializeTemporary - rvalue
79+ expression: CXXBindTemporary
7880 expression: CXXTemporaryObject - S
7981 type: Elaborated
8082 specifier: Namespace - root::
8183 type: Record - S
8284 )" },
8385 {R"cpp(
8486namespace root {
87+ struct S { static const int x = 0; };
88+ int y = S::x + root::S().x;
89+ }
90+ )cpp" ,
91+ R"(
92+ declaration: Namespace - root
93+ declaration: CXXRecord - S
94+ declaration: Var - x
95+ type: Qualified - const
96+ type: Builtin - int
97+ expression: IntegerLiteral - 0
98+ declaration: CXXConstructor
99+ declaration: CXXConstructor
100+ declaration: CXXConstructor
101+ declaration: CXXDestructor
102+ declaration: Var - y
103+ type: Builtin - int
104+ expression: BinaryOperator - +
105+ expression: ImplicitCast - LValueToRValue
106+ expression: DeclRef - x
107+ specifier: TypeSpec
108+ type: Record - S
109+ expression: ImplicitCast - LValueToRValue
110+ expression: Member - x
111+ expression: CXXTemporaryObject - S
112+ type: Elaborated
113+ specifier: Namespace - root::
114+ type: Record - S
115+ )" },
116+ {R"cpp(
117+ namespace root {
85118template <typename T> int tmpl() {
86119 (void)tmpl<unsigned>();
87120 return T::value;
0 commit comments