Skip to content

Commit 6a77ac8

Browse files
committed
C++: Follow extractor changes for 0136
1 parent 8cd3cb5 commit 6a77ac8

File tree

3 files changed

+235
-279
lines changed

3 files changed

+235
-279
lines changed

cpp/ql/test/library-tests/conversions/conversions.expected

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@
122122
| conversions.cpp:179:36:179:37 | (..:: *)... | pointer-to-member derived class conversion | prval | ..:: * | ..:: * |
123123
| conversions.cpp:180:10:180:47 | static_cast<..:: *>... | pointer-to-member derived class conversion | prval | ..:: * | ..:: * |
124124
| conversions.cpp:180:43:180:46 | (..:: *)... | pointer-to-member derived class conversion | prval | ..:: * | ..:: * |
125-
| conversions.cpp:190:22:190:29 | (const String)... | glvalue conversion | lval | const String | String |
125+
| conversions.cpp:190:22:190:29 | (const String)... | glvalue conversion | lval | const String | void |
126126
| conversions.cpp:193:20:193:31 | (const Base)... | glvalue conversion | lval | const Base | Base |
127127
| conversions.cpp:193:31:193:31 | (Base)... | base class conversion | lval | Base | Middle |
128128
| conversions.cpp:193:31:193:31 | (Middle)... | base class conversion | lval | Middle | Derived |

cpp/ql/test/library-tests/ir/ir/PrintAST.expected

Lines changed: 69 additions & 105 deletions
Original file line numberDiff line numberDiff line change
@@ -5122,25 +5122,19 @@ ir.cpp:
51225122
# 809| Conversion = glvalue conversion
51235123
# 809| Type = const Base
51245124
# 809| ValueCategory = lvalue
5125-
# 809| expr: (reference dereference)
5126-
# 809| Type = Base
5127-
# 809| ValueCategory = lvalue
5128-
# 809| expr: (reference to)
5129-
# 809| Type = Base &
5125+
# 809| expr: call to Base
5126+
# 809| Type = void
5127+
# 809| ValueCategory = prvalue
5128+
# 809| 0: (reference to)
5129+
# 809| Type = const Base &
51305130
# 809| ValueCategory = prvalue
5131-
# 809| expr: call to Base
5132-
# 809| Type = void
5133-
# 809| ValueCategory = prvalue
5134-
# 809| 0: (reference to)
5135-
# 809| Type = const Base &
5136-
# 809| ValueCategory = prvalue
5137-
# 809| expr: (const Base)...
5138-
# 809| Conversion = base class conversion
5139-
# 809| Type = const Base
5140-
# 809| ValueCategory = lvalue
5141-
# 809| expr: m
5142-
# 809| Type = Middle
5143-
# 809| ValueCategory = lvalue
5131+
# 809| expr: (const Base)...
5132+
# 809| Conversion = base class conversion
5133+
# 809| Type = const Base
5134+
# 809| ValueCategory = lvalue
5135+
# 809| expr: m
5136+
# 809| Type = Middle
5137+
# 809| ValueCategory = lvalue
51445138
# 810| 8: ExprStmt
51455139
# 810| 0: (reference dereference)
51465140
# 810| Type = Base
@@ -5158,25 +5152,19 @@ ir.cpp:
51585152
# 810| Conversion = glvalue conversion
51595153
# 810| Type = const Base
51605154
# 810| ValueCategory = lvalue
5161-
# 810| expr: (reference dereference)
5162-
# 810| Type = Base
5163-
# 810| ValueCategory = lvalue
5164-
# 810| expr: (reference to)
5165-
# 810| Type = Base &
5155+
# 810| expr: call to Base
5156+
# 810| Type = void
5157+
# 810| ValueCategory = prvalue
5158+
# 810| 0: (reference to)
5159+
# 810| Type = const Base &
51665160
# 810| ValueCategory = prvalue
5167-
# 810| expr: call to Base
5168-
# 810| Type = void
5169-
# 810| ValueCategory = prvalue
5170-
# 810| 0: (reference to)
5171-
# 810| Type = const Base &
5172-
# 810| ValueCategory = prvalue
5173-
# 810| expr: (const Base)...
5174-
# 810| Conversion = base class conversion
5175-
# 810| Type = const Base
5176-
# 810| ValueCategory = lvalue
5177-
# 810| expr: m
5178-
# 810| Type = Middle
5179-
# 810| ValueCategory = lvalue
5161+
# 810| expr: (const Base)...
5162+
# 810| Conversion = base class conversion
5163+
# 810| Type = const Base
5164+
# 810| ValueCategory = lvalue
5165+
# 810| expr: m
5166+
# 810| Type = Middle
5167+
# 810| ValueCategory = lvalue
51805168
# 811| 9: ExprStmt
51815169
# 811| 0: ... = ...
51825170
# 811| Type = Base *
@@ -5364,29 +5352,23 @@ ir.cpp:
53645352
# 823| Conversion = glvalue conversion
53655353
# 823| Type = const Base
53665354
# 823| ValueCategory = lvalue
5367-
# 823| expr: (reference dereference)
5368-
# 823| Type = Base
5369-
# 823| ValueCategory = lvalue
5370-
# 823| expr: (reference to)
5371-
# 823| Type = Base &
5355+
# 823| expr: call to Base
5356+
# 823| Type = void
5357+
# 823| ValueCategory = prvalue
5358+
# 823| 0: (reference to)
5359+
# 823| Type = const Base &
53725360
# 823| ValueCategory = prvalue
5373-
# 823| expr: call to Base
5374-
# 823| Type = void
5375-
# 823| ValueCategory = prvalue
5376-
# 823| 0: (reference to)
5377-
# 823| Type = const Base &
5378-
# 823| ValueCategory = prvalue
5379-
# 823| expr: (const Base)...
5380-
# 823| Conversion = base class conversion
5381-
# 823| Type = const Base
5361+
# 823| expr: (const Base)...
5362+
# 823| Conversion = base class conversion
5363+
# 823| Type = const Base
5364+
# 823| ValueCategory = lvalue
5365+
# 823| expr: (const Middle)...
5366+
# 823| Conversion = base class conversion
5367+
# 823| Type = const Middle
5368+
# 823| ValueCategory = lvalue
5369+
# 823| expr: d
5370+
# 823| Type = Derived
53825371
# 823| ValueCategory = lvalue
5383-
# 823| expr: (const Middle)...
5384-
# 823| Conversion = base class conversion
5385-
# 823| Type = const Middle
5386-
# 823| ValueCategory = lvalue
5387-
# 823| expr: d
5388-
# 823| Type = Derived
5389-
# 823| ValueCategory = lvalue
53905372
# 824| 20: ExprStmt
53915373
# 824| 0: (reference dereference)
53925374
# 824| Type = Base
@@ -5404,29 +5386,23 @@ ir.cpp:
54045386
# 824| Conversion = glvalue conversion
54055387
# 824| Type = const Base
54065388
# 824| ValueCategory = lvalue
5407-
# 824| expr: (reference dereference)
5408-
# 824| Type = Base
5409-
# 824| ValueCategory = lvalue
5410-
# 824| expr: (reference to)
5411-
# 824| Type = Base &
5389+
# 824| expr: call to Base
5390+
# 824| Type = void
5391+
# 824| ValueCategory = prvalue
5392+
# 824| 0: (reference to)
5393+
# 824| Type = const Base &
54125394
# 824| ValueCategory = prvalue
5413-
# 824| expr: call to Base
5414-
# 824| Type = void
5415-
# 824| ValueCategory = prvalue
5416-
# 824| 0: (reference to)
5417-
# 824| Type = const Base &
5418-
# 824| ValueCategory = prvalue
5419-
# 824| expr: (const Base)...
5420-
# 824| Conversion = base class conversion
5421-
# 824| Type = const Base
5395+
# 824| expr: (const Base)...
5396+
# 824| Conversion = base class conversion
5397+
# 824| Type = const Base
5398+
# 824| ValueCategory = lvalue
5399+
# 824| expr: (const Middle)...
5400+
# 824| Conversion = base class conversion
5401+
# 824| Type = const Middle
5402+
# 824| ValueCategory = lvalue
5403+
# 824| expr: d
5404+
# 824| Type = Derived
54225405
# 824| ValueCategory = lvalue
5423-
# 824| expr: (const Middle)...
5424-
# 824| Conversion = base class conversion
5425-
# 824| Type = const Middle
5426-
# 824| ValueCategory = lvalue
5427-
# 824| expr: d
5428-
# 824| Type = Derived
5429-
# 824| ValueCategory = lvalue
54305406
# 825| 21: ExprStmt
54315407
# 825| 0: ... = ...
54325408
# 825| Type = Base *
@@ -6810,24 +6786,18 @@ ir.cpp:
68106786
# 1036| 0: (reference to)
68116787
# 1036| Type = lambda [] type at line 1036, col. 21 &
68126788
# 1036| ValueCategory = prvalue
6813-
# 1036| expr: (reference dereference)
6789+
# 1036| expr: [...](...){...}
68146790
# 1036| Type = decltype([...](...){...})
68156791
# 1036| ValueCategory = xvalue
6816-
# 1036| expr: (reference to)
6817-
# 1036| Type = lambda [] type at line 1036, col. 21 &
6792+
# 1036| 0: {...}
6793+
# 1036| Type = decltype([...](...){...})
68186794
# 1036| ValueCategory = prvalue
6819-
# 1036| expr: [...](...){...}
6820-
# 1036| Type = decltype([...](...){...})
6821-
# 1036| ValueCategory = xvalue
6822-
# 1036| 0: {...}
6823-
# 1036| Type = decltype([...](...){...})
6824-
# 1036| ValueCategory = prvalue
6825-
#-----| .s: call to String
6826-
#-----| Type = void
6827-
#-----| ValueCategory = prvalue
6828-
#-----| .x: x
6829-
#-----| Type = int
6830-
#-----| ValueCategory = prvalue(load)
6795+
#-----| .s: call to String
6796+
#-----| Type = void
6797+
#-----| ValueCategory = prvalue
6798+
#-----| .x: x
6799+
#-----| Type = int
6800+
#-----| ValueCategory = prvalue(load)
68316801
# 1037| 5: ExprStmt
68326802
# 1037| 0: call to operator()
68336803
# 1037| Type = char
@@ -6897,21 +6867,15 @@ ir.cpp:
68976867
# 1040| 0: (reference to)
68986868
# 1040| Type = lambda [] type at line 1040, col. 30 &
68996869
# 1040| ValueCategory = prvalue
6900-
# 1040| expr: (reference dereference)
6870+
# 1040| expr: [...](...){...}
69016871
# 1040| Type = decltype([...](...){...})
69026872
# 1040| ValueCategory = xvalue
6903-
# 1040| expr: (reference to)
6904-
# 1040| Type = lambda [] type at line 1040, col. 30 &
6873+
# 1040| 0: {...}
6874+
# 1040| Type = decltype([...](...){...})
69056875
# 1040| ValueCategory = prvalue
6906-
# 1040| expr: [...](...){...}
6907-
# 1040| Type = decltype([...](...){...})
6908-
# 1040| ValueCategory = xvalue
6909-
# 1040| 0: {...}
6910-
# 1040| Type = decltype([...](...){...})
6911-
# 1040| ValueCategory = prvalue
6912-
#-----| .s: call to String
6913-
#-----| Type = void
6914-
#-----| ValueCategory = prvalue
6876+
#-----| .s: call to String
6877+
#-----| Type = void
6878+
#-----| ValueCategory = prvalue
69156879
# 1041| 9: ExprStmt
69166880
# 1041| 0: call to operator()
69176881
# 1041| Type = char

0 commit comments

Comments
 (0)