Skip to content

Commit ecb90b5

Browse files
committed
Modify TypePrinter to differentiate between anonymous struct and unnamed struct
Currently TypePrinter lumps anonymous classes and unnamed classes in one group "anonymous" this is not correct and can be confusing in some contexts. Differential Revision: https://reviews.llvm.org/D96807
1 parent df2940a commit ecb90b5

File tree

61 files changed

+691
-689
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

61 files changed

+691
-689
lines changed

clang/lib/AST/TypePrinter.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1304,8 +1304,10 @@ void TypePrinter::printTag(TagDecl *D, raw_ostream &OS) {
13041304
if (isa<CXXRecordDecl>(D) && cast<CXXRecordDecl>(D)->isLambda()) {
13051305
OS << "lambda";
13061306
HasKindDecoration = true;
1307-
} else {
1307+
} else if ((isa<RecordDecl>(D) && cast<RecordDecl>(D)->isAnonymousStructOrUnion())) {
13081308
OS << "anonymous";
1309+
} else {
1310+
OS << "unnamed";
13091311
}
13101312

13111313
if (Policy.AnonymousTagLocations) {

clang/test/AST/ast-dump-decl-json.c

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -576,8 +576,8 @@ void testParmVarDecl(int TestParmVarDecl);
576576
// CHECK-NEXT: },
577577
// CHECK-NEXT: "name": "e",
578578
// CHECK-NEXT: "type": {
579-
// CHECK-NEXT: "desugaredQualType": "enum TestEnumDeclAnon::(anonymous at {{.*}}:31:3)",
580-
// CHECK-NEXT: "qualType": "enum (anonymous enum at {{.*}}:31:3)"
579+
// CHECK-NEXT: "desugaredQualType": "enum TestEnumDeclAnon::(unnamed at {{.*}}:31:3)",
580+
// CHECK-NEXT: "qualType": "enum (unnamed enum at {{.*}}:31:3)"
581581
// CHECK-NEXT: }
582582
// CHECK-NEXT: }
583583
// CHECK-NEXT: ]
@@ -764,8 +764,8 @@ void testParmVarDecl(int TestParmVarDecl);
764764
// CHECK-NEXT: },
765765
// CHECK-NEXT: "name": "testRecordDeclAnon1",
766766
// CHECK-NEXT: "type": {
767-
// CHECK-NEXT: "desugaredQualType": "struct TestRecordDeclAnon1::(anonymous at {{.*}}:46:3)",
768-
// CHECK-NEXT: "qualType": "struct (anonymous struct at {{.*}}:46:3)"
767+
// CHECK-NEXT: "desugaredQualType": "struct TestRecordDeclAnon1::(unnamed at {{.*}}:46:3)",
768+
// CHECK-NEXT: "qualType": "struct (unnamed struct at {{.*}}:46:3)"
769769
// CHECK-NEXT: }
770770
// CHECK-NEXT: }
771771
// CHECK-NEXT: ]
@@ -1133,7 +1133,7 @@ void testParmVarDecl(int TestParmVarDecl);
11331133
// CHECK-NEXT: "name": "TestFunctionDecl",
11341134
// CHECK-NEXT: "mangledName": "TestFunctionDecl",
11351135
// CHECK-NEXT: "type": {
1136-
// CHECK-NEXT: "qualType": "int (int, enum (anonymous enum at {{.*}}:69:29))"
1136+
// CHECK-NEXT: "qualType": "int (int, enum (unnamed enum at {{.*}}:69:29))"
11371137
// CHECK-NEXT: },
11381138
// CHECK-NEXT: "inner": [
11391139
// CHECK-NEXT: {
@@ -1187,8 +1187,8 @@ void testParmVarDecl(int TestParmVarDecl);
11871187
// CHECK-NEXT: "name": "y",
11881188
// CHECK-NEXT: "mangledName": "y",
11891189
// CHECK-NEXT: "type": {
1190-
// CHECK-NEXT: "desugaredQualType": "enum (anonymous at {{.*}}:69:29)",
1191-
// CHECK-NEXT: "qualType": "enum (anonymous enum at {{.*}}:69:29)"
1190+
// CHECK-NEXT: "desugaredQualType": "enum (unnamed at {{.*}}:69:29)",
1191+
// CHECK-NEXT: "qualType": "enum (unnamed enum at {{.*}}:69:29)"
11921192
// CHECK-NEXT: }
11931193
// CHECK-NEXT: },
11941194
// CHECK-NEXT: {

clang/test/AST/ast-dump-enum-json.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ enum class I : int {
7979
// CHECK-NEXT: },
8080
// CHECK-NEXT: "name": "One",
8181
// CHECK-NEXT: "type": {
82-
// CHECK-NEXT: "qualType": "(anonymous enum at {{.*}}:3:1)"
82+
// CHECK-NEXT: "qualType": "(unnamed enum at {{.*}}:3:1)"
8383
// CHECK-NEXT: }
8484
// CHECK-NEXT: },
8585
// CHECK-NEXT: {
@@ -105,7 +105,7 @@ enum class I : int {
105105
// CHECK-NEXT: },
106106
// CHECK-NEXT: "name": "Two",
107107
// CHECK-NEXT: "type": {
108-
// CHECK-NEXT: "qualType": "(anonymous enum at {{.*}}:3:1)"
108+
// CHECK-NEXT: "qualType": "(unnamed enum at {{.*}}:3:1)"
109109
// CHECK-NEXT: }
110110
// CHECK-NEXT: }
111111
// CHECK-NEXT: ]

clang/test/AST/ast-dump-openmp-cancel.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,4 +17,4 @@ void test() {
1717
// CHECK-NEXT: | `-OMPCancelDirective {{.*}} <line:6:1, col:28> openmp_standalone_directive
1818
// CHECK-NEXT: |-ImplicitParamDecl {{.*}} <line:4:1> col:1 implicit .global_tid. 'const int *const restrict'
1919
// CHECK-NEXT: |-ImplicitParamDecl {{.*}} <col:1> col:1 implicit .bound_tid. 'const int *const restrict'
20-
// CHECK-NEXT: `-ImplicitParamDecl {{.*}} <col:1> col:1 implicit __context 'struct (anonymous at {{.*}}ast-dump-openmp-cancel.c:4:1) *const restrict'
20+
// CHECK-NEXT: `-ImplicitParamDecl {{.*}} <col:1> col:1 implicit __context 'struct (unnamed at {{.*}}ast-dump-openmp-cancel.c:4:1) *const restrict'

clang/test/AST/ast-dump-openmp-cancellation-point.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,4 +17,4 @@ void test() {
1717
// CHECK-NEXT: | `-OMPCancellationPointDirective {{.*}} <line:6:1, col:40> openmp_standalone_directive
1818
// CHECK-NEXT: |-ImplicitParamDecl {{.*}} <line:4:1> col:1 implicit .global_tid. 'const int *const restrict'
1919
// CHECK-NEXT: |-ImplicitParamDecl {{.*}} <col:1> col:1 implicit .bound_tid. 'const int *const restrict'
20-
// CHECK-NEXT: `-ImplicitParamDecl {{.*}} <col:1> col:1 implicit __context 'struct (anonymous at {{.*}}ast-dump-openmp-cancellation-point.c:4:1) *const restrict'
20+
// CHECK-NEXT: `-ImplicitParamDecl {{.*}} <col:1> col:1 implicit __context 'struct (unnamed at {{.*}}ast-dump-openmp-cancellation-point.c:4:1) *const restrict'

clang/test/AST/ast-dump-openmp-distribute-parallel-for-simd.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ void test_five(int x, int y, int z) {
5959
// CHECK-NEXT: | | |-ImplicitParamDecl {{.*}} <col:1> col:1 implicit .bound_tid. 'const int *const restrict'
6060
// CHECK-NEXT: | | |-ImplicitParamDecl {{.*}} <col:1> col:1 implicit used .previous.lb. 'const unsigned long'
6161
// CHECK-NEXT: | | |-ImplicitParamDecl {{.*}} <col:1> col:1 implicit used .previous.ub. 'const unsigned long'
62-
// CHECK-NEXT: | | |-ImplicitParamDecl {{.*}} <col:1> col:1 implicit __context 'struct (anonymous at {{.*}}ast-dump-openmp-distribute-parallel-for-simd.c:4:1) *const restrict'
62+
// CHECK-NEXT: | | |-ImplicitParamDecl {{.*}} <col:1> col:1 implicit __context 'struct (unnamed at {{.*}}ast-dump-openmp-distribute-parallel-for-simd.c:4:1) *const restrict'
6363
// CHECK-NEXT: | | `-VarDecl {{.*}} <line:5:8, col:16> col:12 used i 'int' cinit
6464
// CHECK-NEXT: | | `-IntegerLiteral {{.*}} <col:16> 'int' 0
6565
// CHECK-NEXT: | `-DeclRefExpr {{.*}} <col:23> 'int' lvalue ParmVar {{.*}} 'x' 'int'
@@ -99,7 +99,7 @@ void test_five(int x, int y, int z) {
9999
// CHECK-NEXT: | | |-ImplicitParamDecl {{.*}} <col:1> col:1 implicit .bound_tid. 'const int *const restrict'
100100
// CHECK-NEXT: | | |-ImplicitParamDecl {{.*}} <col:1> col:1 implicit used .previous.lb. 'const unsigned long'
101101
// CHECK-NEXT: | | |-ImplicitParamDecl {{.*}} <col:1> col:1 implicit used .previous.ub. 'const unsigned long'
102-
// CHECK-NEXT: | | |-ImplicitParamDecl {{.*}} <col:1> col:1 implicit __context 'struct (anonymous at {{.*}}ast-dump-openmp-distribute-parallel-for-simd.c:10:1) *const restrict'
102+
// CHECK-NEXT: | | |-ImplicitParamDecl {{.*}} <col:1> col:1 implicit __context 'struct (unnamed at {{.*}}ast-dump-openmp-distribute-parallel-for-simd.c:10:1) *const restrict'
103103
// CHECK-NEXT: | | |-VarDecl {{.*}} <line:11:8, col:16> col:12 used i 'int' cinit
104104
// CHECK-NEXT: | | | `-IntegerLiteral {{.*}} <col:16> 'int' 0
105105
// CHECK-NEXT: | | `-VarDecl {{.*}} <line:12:10, col:18> col:14 used i 'int' cinit
@@ -146,7 +146,7 @@ void test_five(int x, int y, int z) {
146146
// CHECK-NEXT: | | |-ImplicitParamDecl {{.*}} <col:1> col:1 implicit .bound_tid. 'const int *const restrict'
147147
// CHECK-NEXT: | | |-ImplicitParamDecl {{.*}} <col:1> col:1 implicit used .previous.lb. 'const unsigned long'
148148
// CHECK-NEXT: | | |-ImplicitParamDecl {{.*}} <col:1> col:1 implicit used .previous.ub. 'const unsigned long'
149-
// CHECK-NEXT: | | |-ImplicitParamDecl {{.*}} <col:1> col:1 implicit __context 'struct (anonymous at {{.*}}ast-dump-openmp-distribute-parallel-for-simd.c:17:1) *const restrict'
149+
// CHECK-NEXT: | | |-ImplicitParamDecl {{.*}} <col:1> col:1 implicit __context 'struct (unnamed at {{.*}}ast-dump-openmp-distribute-parallel-for-simd.c:17:1) *const restrict'
150150
// CHECK-NEXT: | | |-VarDecl {{.*}} <line:18:8, col:16> col:12 used i 'int' cinit
151151
// CHECK-NEXT: | | | `-IntegerLiteral {{.*}} <col:16> 'int' 0
152152
// CHECK-NEXT: | | `-VarDecl {{.*}} <line:19:10, col:18> col:14 used i 'int' cinit
@@ -193,7 +193,7 @@ void test_five(int x, int y, int z) {
193193
// CHECK-NEXT: | | |-ImplicitParamDecl {{.*}} <col:1> col:1 implicit .bound_tid. 'const int *const restrict'
194194
// CHECK-NEXT: | | |-ImplicitParamDecl {{.*}} <col:1> col:1 implicit used .previous.lb. 'const unsigned long'
195195
// CHECK-NEXT: | | |-ImplicitParamDecl {{.*}} <col:1> col:1 implicit used .previous.ub. 'const unsigned long'
196-
// CHECK-NEXT: | | |-ImplicitParamDecl {{.*}} <col:1> col:1 implicit __context 'struct (anonymous at {{.*}}ast-dump-openmp-distribute-parallel-for-simd.c:24:1) *const restrict'
196+
// CHECK-NEXT: | | |-ImplicitParamDecl {{.*}} <col:1> col:1 implicit __context 'struct (unnamed at {{.*}}ast-dump-openmp-distribute-parallel-for-simd.c:24:1) *const restrict'
197197
// CHECK-NEXT: | | |-VarDecl {{.*}} <line:25:8, col:16> col:12 used i 'int' cinit
198198
// CHECK-NEXT: | | | `-IntegerLiteral {{.*}} <col:16> 'int' 0
199199
// CHECK-NEXT: | | `-VarDecl {{.*}} <line:26:10, col:18> col:14 used i 'int' cinit
@@ -253,7 +253,7 @@ void test_five(int x, int y, int z) {
253253
// CHECK-NEXT: | |-ImplicitParamDecl {{.*}} <col:1> col:1 implicit .bound_tid. 'const int *const restrict'
254254
// CHECK-NEXT: | |-ImplicitParamDecl {{.*}} <col:1> col:1 implicit used .previous.lb. 'const unsigned long'
255255
// CHECK-NEXT: | |-ImplicitParamDecl {{.*}} <col:1> col:1 implicit used .previous.ub. 'const unsigned long'
256-
// CHECK-NEXT: | |-ImplicitParamDecl {{.*}} <col:1> col:1 implicit __context 'struct (anonymous at {{.*}}ast-dump-openmp-distribute-parallel-for-simd.c:31:1) *const restrict'
256+
// CHECK-NEXT: | |-ImplicitParamDecl {{.*}} <col:1> col:1 implicit __context 'struct (unnamed at {{.*}}ast-dump-openmp-distribute-parallel-for-simd.c:31:1) *const restrict'
257257
// CHECK-NEXT: | |-VarDecl {{.*}} <line:32:8, col:16> col:12 used i 'int' cinit
258258
// CHECK-NEXT: | | `-IntegerLiteral {{.*}} <col:16> 'int' 0
259259
// CHECK-NEXT: | |-VarDecl {{.*}} <line:33:10, col:18> col:14 used i 'int' cinit

clang/test/AST/ast-dump-openmp-distribute-parallel-for.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ void test_five(int x, int y, int z) {
5959
// CHECK-NEXT: | | |-ImplicitParamDecl {{.*}} <col:1> col:1 implicit .bound_tid. 'const int *const restrict'
6060
// CHECK-NEXT: | | |-ImplicitParamDecl {{.*}} <col:1> col:1 implicit used .previous.lb. 'const unsigned long'
6161
// CHECK-NEXT: | | |-ImplicitParamDecl {{.*}} <col:1> col:1 implicit used .previous.ub. 'const unsigned long'
62-
// CHECK-NEXT: | | |-ImplicitParamDecl {{.*}} <col:1> col:1 implicit __context 'struct (anonymous at {{.*}}ast-dump-openmp-distribute-parallel-for.c:4:1) *const restrict'
62+
// CHECK-NEXT: | | |-ImplicitParamDecl {{.*}} <col:1> col:1 implicit __context 'struct (unnamed at {{.*}}ast-dump-openmp-distribute-parallel-for.c:4:1) *const restrict'
6363
// CHECK-NEXT: | | `-VarDecl {{.*}} <line:5:8, col:16> col:12 used i 'int' cinit
6464
// CHECK-NEXT: | | `-IntegerLiteral {{.*}} <col:16> 'int' 0
6565
// CHECK-NEXT: | `-DeclRefExpr {{.*}} <col:3> 'int' lvalue ParmVar {{.*}} 'x' 'int'
@@ -99,7 +99,7 @@ void test_five(int x, int y, int z) {
9999
// CHECK-NEXT: | | |-ImplicitParamDecl {{.*}} <col:1> col:1 implicit .bound_tid. 'const int *const restrict'
100100
// CHECK-NEXT: | | |-ImplicitParamDecl {{.*}} <col:1> col:1 implicit used .previous.lb. 'const unsigned long'
101101
// CHECK-NEXT: | | |-ImplicitParamDecl {{.*}} <col:1> col:1 implicit used .previous.ub. 'const unsigned long'
102-
// CHECK-NEXT: | | |-ImplicitParamDecl {{.*}} <col:1> col:1 implicit __context 'struct (anonymous at {{.*}}ast-dump-openmp-distribute-parallel-for.c:10:1) *const restrict'
102+
// CHECK-NEXT: | | |-ImplicitParamDecl {{.*}} <col:1> col:1 implicit __context 'struct (unnamed at {{.*}}ast-dump-openmp-distribute-parallel-for.c:10:1) *const restrict'
103103
// CHECK-NEXT: | | |-VarDecl {{.*}} <line:11:8, col:16> col:12 used i 'int' cinit
104104
// CHECK-NEXT: | | | `-IntegerLiteral {{.*}} <col:16> 'int' 0
105105
// CHECK-NEXT: | | `-VarDecl {{.*}} <line:12:10, col:18> col:14 used i 'int' cinit
@@ -146,7 +146,7 @@ void test_five(int x, int y, int z) {
146146
// CHECK-NEXT: | | |-ImplicitParamDecl {{.*}} <col:1> col:1 implicit .bound_tid. 'const int *const restrict'
147147
// CHECK-NEXT: | | |-ImplicitParamDecl {{.*}} <col:1> col:1 implicit used .previous.lb. 'const unsigned long'
148148
// CHECK-NEXT: | | |-ImplicitParamDecl {{.*}} <col:1> col:1 implicit used .previous.ub. 'const unsigned long'
149-
// CHECK-NEXT: | | |-ImplicitParamDecl {{.*}} <col:1> col:1 implicit __context 'struct (anonymous at {{.*}}ast-dump-openmp-distribute-parallel-for.c:17:1) *const restrict'
149+
// CHECK-NEXT: | | |-ImplicitParamDecl {{.*}} <col:1> col:1 implicit __context 'struct (unnamed at {{.*}}ast-dump-openmp-distribute-parallel-for.c:17:1) *const restrict'
150150
// CHECK-NEXT: | | |-VarDecl {{.*}} <line:18:8, col:16> col:12 used i 'int' cinit
151151
// CHECK-NEXT: | | | `-IntegerLiteral {{.*}} <col:16> 'int' 0
152152
// CHECK-NEXT: | | `-VarDecl {{.*}} <line:19:10, col:18> col:14 used i 'int' cinit
@@ -193,7 +193,7 @@ void test_five(int x, int y, int z) {
193193
// CHECK-NEXT: | | |-ImplicitParamDecl {{.*}} <col:1> col:1 implicit .bound_tid. 'const int *const restrict'
194194
// CHECK-NEXT: | | |-ImplicitParamDecl {{.*}} <col:1> col:1 implicit used .previous.lb. 'const unsigned long'
195195
// CHECK-NEXT: | | |-ImplicitParamDecl {{.*}} <col:1> col:1 implicit used .previous.ub. 'const unsigned long'
196-
// CHECK-NEXT: | | |-ImplicitParamDecl {{.*}} <col:1> col:1 implicit __context 'struct (anonymous at {{.*}}ast-dump-openmp-distribute-parallel-for.c:24:1) *const restrict'
196+
// CHECK-NEXT: | | |-ImplicitParamDecl {{.*}} <col:1> col:1 implicit __context 'struct (unnamed at {{.*}}ast-dump-openmp-distribute-parallel-for.c:24:1) *const restrict'
197197
// CHECK-NEXT: | | |-VarDecl {{.*}} <line:25:8, col:16> col:12 used i 'int' cinit
198198
// CHECK-NEXT: | | | `-IntegerLiteral {{.*}} <col:16> 'int' 0
199199
// CHECK-NEXT: | | `-VarDecl {{.*}} <line:26:10, col:18> col:14 used i 'int' cinit
@@ -253,7 +253,7 @@ void test_five(int x, int y, int z) {
253253
// CHECK-NEXT: | |-ImplicitParamDecl {{.*}} <col:1> col:1 implicit .bound_tid. 'const int *const restrict'
254254
// CHECK-NEXT: | |-ImplicitParamDecl {{.*}} <col:1> col:1 implicit used .previous.lb. 'const unsigned long'
255255
// CHECK-NEXT: | |-ImplicitParamDecl {{.*}} <col:1> col:1 implicit used .previous.ub. 'const unsigned long'
256-
// CHECK-NEXT: | |-ImplicitParamDecl {{.*}} <col:1> col:1 implicit __context 'struct (anonymous at {{.*}}ast-dump-openmp-distribute-parallel-for.c:31:1) *const restrict'
256+
// CHECK-NEXT: | |-ImplicitParamDecl {{.*}} <col:1> col:1 implicit __context 'struct (unnamed at {{.*}}ast-dump-openmp-distribute-parallel-for.c:31:1) *const restrict'
257257
// CHECK-NEXT: | |-VarDecl {{.*}} <line:32:8, col:16> col:12 used i 'int' cinit
258258
// CHECK-NEXT: | | `-IntegerLiteral {{.*}} <col:16> 'int' 0
259259
// CHECK-NEXT: | |-VarDecl {{.*}} <line:33:10, col:18> col:14 used i 'int' cinit

clang/test/AST/ast-dump-openmp-distribute-simd.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ void test_five(int x, int y, int z) {
5555
// CHECK-NEXT: | | | |-UnaryOperator {{.*}} <col:26, col:27> 'int' postfix '++'
5656
// CHECK-NEXT: | | | | `-DeclRefExpr {{.*}} <col:26> 'int' lvalue Var {{.*}} 'i' 'int'
5757
// CHECK-NEXT: | | | `-NullStmt {{.*}} <line:6:5>
58-
// CHECK-NEXT: | | |-ImplicitParamDecl {{.*}} <line:4:1> col:1 implicit __context 'struct (anonymous at {{.*}}ast-dump-openmp-distribute-simd.c:4:1) *const restrict'
58+
// CHECK-NEXT: | | |-ImplicitParamDecl {{.*}} <line:4:1> col:1 implicit __context 'struct (unnamed at {{.*}}ast-dump-openmp-distribute-simd.c:4:1) *const restrict'
5959
// CHECK-NEXT: | | `-VarDecl {{.*}} <line:5:8, col:16> col:12 used i 'int' cinit
6060
// CHECK-NEXT: | | `-IntegerLiteral {{.*}} <col:16> 'int' 0
6161
// CHECK-NEXT: | `-DeclRefExpr {{.*}} <col:23> 'int' lvalue ParmVar {{.*}} 'x' 'int'
@@ -91,7 +91,7 @@ void test_five(int x, int y, int z) {
9191
// CHECK-NEXT: | | | |-UnaryOperator {{.*}} <col:28, col:29> 'int' postfix '++'
9292
// CHECK-NEXT: | | | | `-DeclRefExpr {{.*}} <col:28> 'int' lvalue Var {{.*}} 'i' 'int'
9393
// CHECK-NEXT: | | | `-NullStmt {{.*}} <line:13:7>
94-
// CHECK-NEXT: | | |-ImplicitParamDecl {{.*}} <line:10:1> col:1 implicit __context 'struct (anonymous at {{.*}}ast-dump-openmp-distribute-simd.c:10:1) *const restrict'
94+
// CHECK-NEXT: | | |-ImplicitParamDecl {{.*}} <line:10:1> col:1 implicit __context 'struct (unnamed at {{.*}}ast-dump-openmp-distribute-simd.c:10:1) *const restrict'
9595
// CHECK-NEXT: | | |-VarDecl {{.*}} <line:11:8, col:16> col:12 used i 'int' cinit
9696
// CHECK-NEXT: | | | `-IntegerLiteral {{.*}} <col:16> 'int' 0
9797
// CHECK-NEXT: | | `-VarDecl {{.*}} <line:12:10, col:18> col:14 used i 'int' cinit
@@ -134,7 +134,7 @@ void test_five(int x, int y, int z) {
134134
// CHECK-NEXT: | | | |-UnaryOperator {{.*}} <col:28, col:29> 'int' postfix '++'
135135
// CHECK-NEXT: | | | | `-DeclRefExpr {{.*}} <col:28> 'int' lvalue Var {{.*}} 'i' 'int'
136136
// CHECK-NEXT: | | | `-NullStmt {{.*}} <line:20:7>
137-
// CHECK-NEXT: | | |-ImplicitParamDecl {{.*}} <line:17:1> col:1 implicit __context 'struct (anonymous at {{.*}}ast-dump-openmp-distribute-simd.c:17:1) *const restrict'
137+
// CHECK-NEXT: | | |-ImplicitParamDecl {{.*}} <line:17:1> col:1 implicit __context 'struct (unnamed at {{.*}}ast-dump-openmp-distribute-simd.c:17:1) *const restrict'
138138
// CHECK-NEXT: | | |-VarDecl {{.*}} <line:18:8, col:16> col:12 used i 'int' cinit
139139
// CHECK-NEXT: | | | `-IntegerLiteral {{.*}} <col:16> 'int' 0
140140
// CHECK-NEXT: | | `-VarDecl {{.*}} <line:19:10, col:18> col:14 used i 'int' cinit
@@ -177,7 +177,7 @@ void test_five(int x, int y, int z) {
177177
// CHECK-NEXT: | | | |-UnaryOperator {{.*}} <col:28, col:29> 'int' postfix '++'
178178
// CHECK-NEXT: | | | | `-DeclRefExpr {{.*}} <col:28> 'int' lvalue Var {{.*}} 'i' 'int'
179179
// CHECK-NEXT: | | | `-NullStmt {{.*}} <line:27:7>
180-
// CHECK-NEXT: | | |-ImplicitParamDecl {{.*}} <line:24:1> col:1 implicit __context 'struct (anonymous at {{.*}}ast-dump-openmp-distribute-simd.c:24:1) *const restrict'
180+
// CHECK-NEXT: | | |-ImplicitParamDecl {{.*}} <line:24:1> col:1 implicit __context 'struct (unnamed at {{.*}}ast-dump-openmp-distribute-simd.c:24:1) *const restrict'
181181
// CHECK-NEXT: | | |-VarDecl {{.*}} <line:25:8, col:16> col:12 used i 'int' cinit
182182
// CHECK-NEXT: | | | `-IntegerLiteral {{.*}} <col:16> 'int' 0
183183
// CHECK-NEXT: | | `-VarDecl {{.*}} <line:26:10, col:18> col:14 used i 'int' cinit
@@ -233,7 +233,7 @@ void test_five(int x, int y, int z) {
233233
// CHECK-NEXT: | | |-UnaryOperator {{.*}} <col:30, col:31> 'int' postfix '++'
234234
// CHECK-NEXT: | | | `-DeclRefExpr {{.*}} <col:30> 'int' lvalue Var {{.*}} 'i' 'int'
235235
// CHECK-NEXT: | | `-NullStmt {{.*}} <line:35:9>
236-
// CHECK-NEXT: | |-ImplicitParamDecl {{.*}} <line:31:1> col:1 implicit __context 'struct (anonymous at {{.*}}ast-dump-openmp-distribute-simd.c:31:1) *const restrict'
236+
// CHECK-NEXT: | |-ImplicitParamDecl {{.*}} <line:31:1> col:1 implicit __context 'struct (unnamed at {{.*}}ast-dump-openmp-distribute-simd.c:31:1) *const restrict'
237237
// CHECK-NEXT: | |-VarDecl {{.*}} <line:32:8, col:16> col:12 used i 'int' cinit
238238
// CHECK-NEXT: | | `-IntegerLiteral {{.*}} <col:16> 'int' 0
239239
// CHECK-NEXT: | |-VarDecl {{.*}} <line:33:10, col:18> col:14 used i 'int' cinit

0 commit comments

Comments
 (0)