You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
C++: Add IR tests exposing incorrect translation due to unhandled bitwise copy
These tests are in addition to exisiting tests involving default copy
constructors, which suffer from the same problem, i.e., the extractor not
handling bitwise copies.
# 1688| [CopyAssignmentOperator] (void captured_lambda(int, int&, int&&))::(lambda [] type at line 1688, col. 25)& (void captured_lambda(int, int&, int&&))::(lambda [] type at line 1688, col. 25)::operator=((void captured_lambda(int, int&, int&&))::(lambda [] type at line 1688, col. 25) const&)
#-----| Type = [LValueReferenceType] const lambda [] type at line 1688, col. 25 &
12971
+
# 1688| [CopyConstructor] void (void captured_lambda(int, int&, int&&))::(lambda [] type at line 1688, col. 25)::(unnamed constructor)((void captured_lambda(int, int&, int&&))::(lambda [] type at line 1688, col. 25) const&)
#-----| Type = [LValueReferenceType] const lambda [] type at line 1688, col. 25 &
12975
+
# 1688| [MoveConstructor] void (void captured_lambda(int, int&, int&&))::(lambda [] type at line 1688, col. 25)::(unnamed constructor)((void captured_lambda(int, int&, int&&))::(lambda [] type at line 1688, col. 25)&&)
# 1689| Type = [PointerType] const lambda [] type at line 1688, col. 25 *
13005
+
# 1689| ValueCategory = prvalue(load)
13006
+
# 1689| getFieldExpr(y): [PointerFieldAccess] y
13007
+
# 1689| Type = [IntType] int
13008
+
# 1689| ValueCategory = prvalue(load)
13009
+
# 1689| getQualifier(): [ThisExpr] this
13010
+
# 1689| Type = [PointerType] const lambda [] type at line 1688, col. 25 *
13011
+
# 1689| ValueCategory = prvalue(load)
13012
+
# 1689| getFieldExpr(z): [PointerFieldAccess] z
13013
+
# 1689| Type = [IntType] int
13014
+
# 1689| ValueCategory = prvalue(load)
13015
+
# 1689| getQualifier(): [ThisExpr] this
13016
+
# 1689| Type = [PointerType] const lambda [] type at line 1688, col. 25 *
13017
+
# 1689| ValueCategory = prvalue(load)
13018
+
# 1690| getStmt(1): [ReturnStmt] return ...
13019
+
# 1689| [CopyAssignmentOperator] (void (void captured_lambda(int, int&, int&&))::(lambda [] type at line 1688, col. 25)::operator()() const)::(lambda [] type at line 1689, col. 29)& (void (void captured_lambda(int, int&, int&&))::(lambda [] type at line 1688, col. 25)::operator()() const)::(lambda [] type at line 1689, col. 29)::operator=((void (void captured_lambda(int, int&, int&&))::(lambda [] type at line 1688, col. 25)::operator()() const)::(lambda [] type at line 1689, col. 29) const&)
#-----| Type = [LValueReferenceType] const lambda [] type at line 1689, col. 29 &
13023
+
# 1689| [CopyConstructor] void (void (void captured_lambda(int, int&, int&&))::(lambda [] type at line 1688, col. 25)::operator()() const)::(lambda [] type at line 1689, col. 29)::(unnamed constructor)((void (void captured_lambda(int, int&, int&&))::(lambda [] type at line 1688, col. 25)::operator()() const)::(lambda [] type at line 1689, col. 29) const&)
#-----| Type = [LValueReferenceType] const lambda [] type at line 1689, col. 29 &
13027
+
# 1689| [MoveConstructor] void (void (void captured_lambda(int, int&, int&&))::(lambda [] type at line 1688, col. 25)::operator()() const)::(lambda [] type at line 1689, col. 29)::(unnamed constructor)((void (void captured_lambda(int, int&, int&&))::(lambda [] type at line 1688, col. 25)::operator()() const)::(lambda [] type at line 1689, col. 29)&&)
#-----| Type = [RValueReferenceType] lambda [] type at line 1689, col. 29 &&
13031
+
# 1689| [Constructor] void (void (void captured_lambda(int, int&, int&&))::(lambda [] type at line 1688, col. 25)::operator()() const)::(lambda [] type at line 1689, col. 29)::(unnamed constructor)()
13032
+
# 1689| <params>:
13033
+
# 1689| [ConstMemberFunction] void (void (void captured_lambda(int, int&, int&&))::(lambda [] type at line 1688, col. 25)::operator()() const)::(lambda [] type at line 1689, col. 29)::operator()() const
Copy file name to clipboardExpand all lines: cpp/ql/test/library-tests/ir/ir/aliased_ssa_consistency.expected
+2Lines changed: 2 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -6,6 +6,8 @@ missingOperandType
6
6
duplicateChiOperand
7
7
sideEffectWithoutPrimary
8
8
instructionWithoutSuccessor
9
+
| ir.cpp:1688:24:1690:5 | FieldAddress: {...} | Instruction 'FieldAddress: {...}' has no successors in function '$@'. | ir.cpp:1683:6:1683:20 | void captured_lambda(int, int&, int&&) | void captured_lambda(int, int&, int&&) |
10
+
| ir.cpp:1689:28:1689:54 | FieldAddress: {...} | Instruction 'FieldAddress: {...}' has no successors in function '$@'. | ir.cpp:1688:46:1688:46 | void (void captured_lambda(int, int&, int&&))::(lambda [] type at line 1688, col. 25)::operator()() const | void (void captured_lambda(int, int&, int&&))::(lambda [] type at line 1688, col. 25)::operator()() const |
Copy file name to clipboardExpand all lines: cpp/ql/test/library-tests/ir/ir/aliased_ssa_consistency_unsound.expected
+2Lines changed: 2 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -6,6 +6,8 @@ missingOperandType
6
6
duplicateChiOperand
7
7
sideEffectWithoutPrimary
8
8
instructionWithoutSuccessor
9
+
| ir.cpp:1688:24:1690:5 | FieldAddress: {...} | Instruction 'FieldAddress: {...}' has no successors in function '$@'. | ir.cpp:1683:6:1683:20 | void captured_lambda(int, int&, int&&) | void captured_lambda(int, int&, int&&) |
10
+
| ir.cpp:1689:28:1689:54 | FieldAddress: {...} | Instruction 'FieldAddress: {...}' has no successors in function '$@'. | ir.cpp:1688:46:1688:46 | void (void captured_lambda(int, int&, int&&))::(lambda [] type at line 1688, col. 25)::operator()() const | void (void captured_lambda(int, int&, int&&))::(lambda [] type at line 1688, col. 25)::operator()() const |
0 commit comments