diff --git a/cpp/ql/test/library-tests/ir/ir/PrintAST.expected b/cpp/ql/test/library-tests/ir/ir/PrintAST.expected index 40f40c3d0c5..e9e58ec9d9b 100644 --- a/cpp/ql/test/library-tests/ir/ir/PrintAST.expected +++ b/cpp/ql/test/library-tests/ir/ir/PrintAST.expected @@ -2221,6 +2221,61 @@ destructors_for_temps.cpp: # 59| Type = [Class] ClassWithDestructor2 # 59| ValueCategory = xvalue # 60| getStmt(1): [ReturnStmt] return ... +# 62| [CopyAssignmentOperator] string& string::operator=(string const&) +# 62| : +#-----| getParameter(0): [Parameter] (unnamed parameter 0) +#-----| Type = [LValueReferenceType] const string & +# 62| [CopyConstructor] void string::string(string const&) +# 62| : +#-----| getParameter(0): [Parameter] (unnamed parameter 0) +#-----| Type = [LValueReferenceType] const string & +# 64| [Constructor] void string::string(char const*) +# 64| : +# 64| getParameter(0): [Parameter] (unnamed parameter 0) +# 64| Type = [PointerType] const char * +# 65| [Destructor] void string::~string() +# 65| : +# 68| [TopLevelFunction] bool const_ref_string(string const&) +# 68| : +# 68| getParameter(0): [Parameter] (unnamed parameter 0) +# 68| Type = [LValueReferenceType] const string & +# 70| [TopLevelFunction] bool conditional_temp_via_conjunction(bool) +# 70| : +# 70| getParameter(0): [Parameter] b +# 70| Type = [BoolType] bool +# 71| getEntryPoint(): [BlockStmt] { ... } +# 72| getStmt(0): [ReturnStmt] return ... +# 72| getExpr(): [LogicalAndExpr] ... && ... +# 72| Type = [BoolType] bool +# 72| ValueCategory = prvalue +# 72| getLeftOperand(): [VariableAccess] b +# 72| Type = [BoolType] bool +# 72| ValueCategory = prvalue(load) +# 72| getRightOperand(): [FunctionCall] call to const_ref_string +# 72| Type = [BoolType] bool +# 72| ValueCategory = prvalue +# 72| getArgument(0): [ConstructorCall] call to string +# 72| Type = [VoidType] void +# 72| ValueCategory = prvalue +# 72| getArgument(0): +# 72| Type = [ArrayType] const char[1] +# 72| Value = [StringLiteral] "" +# 72| ValueCategory = lvalue +# 72| getArgument(0).getFullyConverted(): [ArrayToPointerConversion] array to pointer conversion +# 72| Type = [PointerType] const char * +# 72| ValueCategory = prvalue +# 72| getArgument(0).getFullyConverted(): [ReferenceToExpr] (reference to) +# 72| Type = [LValueReferenceType] const string & +# 72| ValueCategory = prvalue +# 72| getExpr(): [TemporaryObjectExpr] temporary object +# 72| Type = [SpecifiedType] const string +# 72| ValueCategory = lvalue +# 72| getImplicitDestructorCall(0): [DestructorCall] call to ~string +# 72| Type = [VoidType] void +# 72| ValueCategory = prvalue +# 72| getQualifier(): [ReuseExpr] reuse of temporary object +# 72| Type = [SpecifiedType] const string +# 72| ValueCategory = xvalue ir.c: # 5| [TopLevelFunction] int getX(MyCoords*) # 5| : diff --git a/cpp/ql/test/library-tests/ir/ir/aliased_ir.expected b/cpp/ql/test/library-tests/ir/ir/aliased_ir.expected index 2becff3237c..3bf488f073f 100644 --- a/cpp/ql/test/library-tests/ir/ir/aliased_ir.expected +++ b/cpp/ql/test/library-tests/ir/ir/aliased_ir.expected @@ -1373,6 +1373,77 @@ destructors_for_temps.cpp: # 58| v58_11(void) = ReturnVoid : #-----| Goto -> Block 1 +# 70| bool conditional_temp_via_conjunction(bool) +# 70| Block 0 +# 70| v70_1(void) = EnterFunction : +# 70| m70_2(unknown) = AliasedDefinition : +# 70| m70_3(unknown) = InitializeNonLocal : +# 70| m70_4(unknown) = Chi : total:m70_2, partial:m70_3 +# 70| r70_5(glval) = VariableAddress[b] : +# 70| m70_6(bool) = InitializeParameter[b] : &:r70_5 +# 72| r72_1(glval) = VariableAddress[#return] : +# 72| r72_2(glval) = VariableAddress[b] : +# 72| r72_3(bool) = Load[b] : &:r72_2, m70_6 +# 72| v72_4(void) = ConditionalBranch : r72_3 +#-----| False -> Block 1 +#-----| True -> Block 4 + +# 72| Block 1 +# 72| m72_5(string) = Phi : from 4:m72_38 +# 72| m72_6(unknown) = Phi : from 0:~m70_4, from 4:~m72_42 +# 72| r72_7(glval) = VariableAddress[#temp72:12] : +# 72| r72_8(bool) = Constant[0] : +# 72| m72_9(bool) = Store[#temp72:12] : &:r72_7, r72_8 +#-----| Goto -> Block 2 + +# 72| Block 2 +# 72| m72_10(string) = Phi : from 1:m72_5, from 3:m72_38 +# 72| m72_11(unknown) = Phi : from 1:~m72_6, from 3:~m72_42 +# 72| m72_12(bool) = Phi : from 1:m72_9, from 3:m72_26 +# 72| r72_13(glval) = VariableAddress[#temp72:12] : +# 72| r72_14(bool) = Load[#temp72:12] : &:r72_13, m72_12 +# 72| r72_15(glval) = CopyValue : r72_28 +# 72| r72_16(glval) = FunctionAddress[~string] : +# 72| v72_17(void) = Call[~string] : func:r72_16, this:r72_15 +# 72| m72_18(unknown) = ^CallSideEffect : ~m72_11 +# 72| m72_19(unknown) = Chi : total:m72_11, partial:m72_18 +# 72| v72_20(void) = ^IndirectReadSideEffect[-1] : &:r72_15, m72_10 +# 72| m72_21(string) = ^IndirectMayWriteSideEffect[-1] : &:r72_15 +# 72| m72_22(string) = Chi : total:m72_10, partial:m72_21 +# 72| m72_23(bool) = Store[#return] : &:r72_1, r72_14 +# 70| r70_7(glval) = VariableAddress[#return] : +# 70| v70_8(void) = ReturnValue : &:r70_7, m72_23 +# 70| v70_9(void) = AliasedUse : ~m72_19 +# 70| v70_10(void) = ExitFunction : + +# 72| Block 3 +# 72| r72_24(glval) = VariableAddress[#temp72:12] : +# 72| r72_25(bool) = Constant[1] : +# 72| m72_26(bool) = Store[#temp72:12] : &:r72_24, r72_25 +#-----| Goto -> Block 2 + +# 72| Block 4 +# 72| r72_27(glval) = FunctionAddress[const_ref_string] : +# 72| r72_28(glval) = VariableAddress[#temp72:34] : +# 72| m72_29(string) = Uninitialized[#temp72:34] : &:r72_28 +# 72| r72_30(glval) = FunctionAddress[string] : +# 72| r72_31(glval) = StringConstant[""] : +# 72| r72_32(char *) = Convert : r72_31 +# 72| v72_33(void) = Call[string] : func:r72_30, this:r72_28, 0:r72_32 +# 72| m72_34(unknown) = ^CallSideEffect : ~m70_4 +# 72| m72_35(unknown) = Chi : total:m70_4, partial:m72_34 +# 72| v72_36(void) = ^BufferReadSideEffect[0] : &:r72_32, ~m70_3 +# 72| m72_37(string) = ^IndirectMayWriteSideEffect[-1] : &:r72_28 +# 72| m72_38(string) = Chi : total:m72_29, partial:m72_37 +# 72| r72_39(string &) = CopyValue : r72_28 +# 72| r72_40(bool) = Call[const_ref_string] : func:r72_27, 0:r72_39 +# 72| m72_41(unknown) = ^CallSideEffect : ~m72_35 +# 72| m72_42(unknown) = Chi : total:m72_35, partial:m72_41 +# 72| v72_43(void) = ^BufferReadSideEffect[0] : &:r72_39, ~m72_38 +# 72| v72_44(void) = ConditionalBranch : r72_40 +#-----| False -> Block 1 +#-----| True -> Block 3 + ir.c: # 7| void MyCoordsTest(int) # 7| Block 0 diff --git a/cpp/ql/test/library-tests/ir/ir/aliased_ssa_consistency.expected b/cpp/ql/test/library-tests/ir/ir/aliased_ssa_consistency.expected index b93c7d2649f..a85ba6b9389 100644 --- a/cpp/ql/test/library-tests/ir/ir/aliased_ssa_consistency.expected +++ b/cpp/ql/test/library-tests/ir/ir/aliased_ssa_consistency.expected @@ -20,6 +20,7 @@ multipleIRTypes lostReachability backEdgeCountMismatch useNotDominatedByDefinition +| destructors_for_temps.cpp:72:34:72:35 | Unary | Operand 'Unary' is not dominated by its definition in function '$@'. | destructors_for_temps.cpp:70:6:70:37 | bool conditional_temp_via_conjunction(bool) | bool conditional_temp_via_conjunction(bool) | switchInstructionWithoutDefaultEdge notMarkedAsConflated wronglyMarkedAsConflated diff --git a/cpp/ql/test/library-tests/ir/ir/aliased_ssa_consistency_unsound.expected b/cpp/ql/test/library-tests/ir/ir/aliased_ssa_consistency_unsound.expected index ef225d8ad6c..3897a1ad628 100644 --- a/cpp/ql/test/library-tests/ir/ir/aliased_ssa_consistency_unsound.expected +++ b/cpp/ql/test/library-tests/ir/ir/aliased_ssa_consistency_unsound.expected @@ -2,6 +2,7 @@ missingOperand unexpectedOperand duplicateOperand missingPhiOperand +| destructors_for_temps.cpp:72:12:72:36 | Phi: ... && ... | Instruction 'Phi: ... && ...' is missing an operand for predecessor block 'EnterFunction: conditional_temp_via_conjunction' in function '$@'. | destructors_for_temps.cpp:70:6:70:37 | bool conditional_temp_via_conjunction(bool) | bool conditional_temp_via_conjunction(bool) | missingOperandType | destructors_for_temps.cpp:39:3:39:53 | ChiTotal | Operand 'ChiTotal' of instruction 'Chi' is missing a type in function '$@'. | destructors_for_temps.cpp:38:6:38:15 | void temp_test5(bool) | void temp_test5(bool) | | ir.cpp:1425:5:1425:30 | ChiTotal | Operand 'ChiTotal' of instruction 'Chi' is missing a type in function '$@'. | ir.cpp:1414:6:1414:21 | void temporary_string() | void temporary_string() | @@ -23,6 +24,7 @@ multipleIRTypes lostReachability backEdgeCountMismatch useNotDominatedByDefinition +| destructors_for_temps.cpp:72:34:72:35 | Unary | Operand 'Unary' is not dominated by its definition in function '$@'. | destructors_for_temps.cpp:70:6:70:37 | bool conditional_temp_via_conjunction(bool) | bool conditional_temp_via_conjunction(bool) | switchInstructionWithoutDefaultEdge notMarkedAsConflated wronglyMarkedAsConflated diff --git a/cpp/ql/test/library-tests/ir/ir/destructors_for_temps.cpp b/cpp/ql/test/library-tests/ir/ir/destructors_for_temps.cpp index 7a781d2c22e..86d8d9173ee 100644 --- a/cpp/ql/test/library-tests/ir/ir/destructors_for_temps.cpp +++ b/cpp/ql/test/library-tests/ir/ir/destructors_for_temps.cpp @@ -57,4 +57,17 @@ void temp_test8(bool b) { void temp_test8_simple(bool b) { b ? throw ClassWithDestructor2().get_x() : 'a'; +} + +struct string +{ + string(const char *); + ~string(); +}; + +bool const_ref_string(const string &); + +bool conditional_temp_via_conjunction(bool b) +{ + return b && const_ref_string(""); } \ No newline at end of file diff --git a/cpp/ql/test/library-tests/ir/ir/operand_locations.expected b/cpp/ql/test/library-tests/ir/ir/operand_locations.expected index e9d74dc6d18..faaed2a3a84 100644 --- a/cpp/ql/test/library-tests/ir/ir/operand_locations.expected +++ b/cpp/ql/test/library-tests/ir/ir/operand_locations.expected @@ -1239,6 +1239,65 @@ | destructors_for_temps.cpp:59:38:59:42 | SideEffect | ~m59_10 | | destructors_for_temps.cpp:59:38:59:42 | StoreValue | r59_14 | | destructors_for_temps.cpp:59:48:59:50 | StoreValue | r59_22 | +| destructors_for_temps.cpp:70:6:70:37 | Address | &:r70_7 | +| destructors_for_temps.cpp:70:6:70:37 | ChiPartial | partial:m70_3 | +| destructors_for_temps.cpp:70:6:70:37 | ChiTotal | total:m70_2 | +| destructors_for_temps.cpp:70:6:70:37 | Load | m72_23 | +| destructors_for_temps.cpp:70:6:70:37 | SideEffect | ~m72_19 | +| destructors_for_temps.cpp:70:44:70:44 | Address | &:r70_5 | +| destructors_for_temps.cpp:72:5:72:37 | Address | &:r72_1 | +| destructors_for_temps.cpp:72:12:72:12 | Address | &:r72_2 | +| destructors_for_temps.cpp:72:12:72:12 | Condition | r72_3 | +| destructors_for_temps.cpp:72:12:72:12 | Load | m70_6 | +| destructors_for_temps.cpp:72:12:72:36 | Address | &:r72_7 | +| destructors_for_temps.cpp:72:12:72:36 | Address | &:r72_13 | +| destructors_for_temps.cpp:72:12:72:36 | Address | &:r72_24 | +| destructors_for_temps.cpp:72:12:72:36 | Load | m72_12 | +| destructors_for_temps.cpp:72:12:72:36 | Phi | from 0:~m70_4 | +| destructors_for_temps.cpp:72:12:72:36 | Phi | from 1:m72_5 | +| destructors_for_temps.cpp:72:12:72:36 | Phi | from 1:m72_9 | +| destructors_for_temps.cpp:72:12:72:36 | Phi | from 1:~m72_6 | +| destructors_for_temps.cpp:72:12:72:36 | Phi | from 3:m72_26 | +| destructors_for_temps.cpp:72:12:72:36 | Phi | from 3:m72_38 | +| destructors_for_temps.cpp:72:12:72:36 | Phi | from 3:~m72_42 | +| destructors_for_temps.cpp:72:12:72:36 | Phi | from 4:m72_38 | +| destructors_for_temps.cpp:72:12:72:36 | Phi | from 4:~m72_42 | +| destructors_for_temps.cpp:72:12:72:36 | StoreValue | r72_8 | +| destructors_for_temps.cpp:72:12:72:36 | StoreValue | r72_14 | +| destructors_for_temps.cpp:72:12:72:36 | StoreValue | r72_25 | +| destructors_for_temps.cpp:72:17:72:32 | CallTarget | func:r72_27 | +| destructors_for_temps.cpp:72:17:72:32 | ChiPartial | partial:m72_41 | +| destructors_for_temps.cpp:72:17:72:32 | ChiTotal | total:m72_35 | +| destructors_for_temps.cpp:72:17:72:32 | Condition | r72_40 | +| destructors_for_temps.cpp:72:17:72:32 | SideEffect | ~m72_35 | +| destructors_for_temps.cpp:72:34:72:35 | Address | &:r72_15 | +| destructors_for_temps.cpp:72:34:72:35 | Address | &:r72_15 | +| destructors_for_temps.cpp:72:34:72:35 | Address | &:r72_28 | +| destructors_for_temps.cpp:72:34:72:35 | Address | &:r72_28 | +| destructors_for_temps.cpp:72:34:72:35 | Address | &:r72_32 | +| destructors_for_temps.cpp:72:34:72:35 | Address | &:r72_39 | +| destructors_for_temps.cpp:72:34:72:35 | Arg(0) | 0:r72_32 | +| destructors_for_temps.cpp:72:34:72:35 | Arg(0) | 0:r72_39 | +| destructors_for_temps.cpp:72:34:72:35 | Arg(this) | this:r72_15 | +| destructors_for_temps.cpp:72:34:72:35 | Arg(this) | this:r72_28 | +| destructors_for_temps.cpp:72:34:72:35 | CallTarget | func:r72_16 | +| destructors_for_temps.cpp:72:34:72:35 | CallTarget | func:r72_30 | +| destructors_for_temps.cpp:72:34:72:35 | ChiPartial | partial:m72_18 | +| destructors_for_temps.cpp:72:34:72:35 | ChiPartial | partial:m72_21 | +| destructors_for_temps.cpp:72:34:72:35 | ChiPartial | partial:m72_34 | +| destructors_for_temps.cpp:72:34:72:35 | ChiPartial | partial:m72_37 | +| destructors_for_temps.cpp:72:34:72:35 | ChiTotal | total:m70_4 | +| destructors_for_temps.cpp:72:34:72:35 | ChiTotal | total:m72_10 | +| destructors_for_temps.cpp:72:34:72:35 | ChiTotal | total:m72_11 | +| destructors_for_temps.cpp:72:34:72:35 | ChiTotal | total:m72_29 | +| destructors_for_temps.cpp:72:34:72:35 | SideEffect | m72_10 | +| destructors_for_temps.cpp:72:34:72:35 | SideEffect | ~m70_3 | +| destructors_for_temps.cpp:72:34:72:35 | SideEffect | ~m70_4 | +| destructors_for_temps.cpp:72:34:72:35 | SideEffect | ~m72_11 | +| destructors_for_temps.cpp:72:34:72:35 | SideEffect | ~m72_38 | +| destructors_for_temps.cpp:72:34:72:35 | Unary | r72_28 | +| destructors_for_temps.cpp:72:34:72:35 | Unary | r72_28 | +| destructors_for_temps.cpp:72:34:72:35 | Unary | r72_31 | | file://:0:0:0:0 | Address | &:r0_1 | | file://:0:0:0:0 | Address | &:r0_1 | | file://:0:0:0:0 | Address | &:r0_1 | diff --git a/cpp/ql/test/library-tests/ir/ir/raw_consistency.expected b/cpp/ql/test/library-tests/ir/ir/raw_consistency.expected index 356390f9b4f..3a278aea06c 100644 --- a/cpp/ql/test/library-tests/ir/ir/raw_consistency.expected +++ b/cpp/ql/test/library-tests/ir/ir/raw_consistency.expected @@ -20,6 +20,7 @@ multipleIRTypes lostReachability backEdgeCountMismatch useNotDominatedByDefinition +| destructors_for_temps.cpp:72:34:72:35 | Unary | Operand 'Unary' is not dominated by its definition in function '$@'. | destructors_for_temps.cpp:70:6:70:37 | bool conditional_temp_via_conjunction(bool) | bool conditional_temp_via_conjunction(bool) | | ir.cpp:1535:8:1535:8 | Unary | Operand 'Unary' is not dominated by its definition in function '$@'. | ir.cpp:1535:8:1535:8 | void StructuredBindingDataMemberStruct::StructuredBindingDataMemberStruct() | void StructuredBindingDataMemberStruct::StructuredBindingDataMemberStruct() | | try_except.c:13:13:13:13 | Left | Operand 'Left' is not dominated by its definition in function '$@'. | try_except.c:6:6:6:6 | void f() | void f() | | try_except.c:13:13:13:13 | Left | Operand 'Left' is not dominated by its definition in function '$@'. | try_except.c:6:6:6:6 | void f() | void f() | diff --git a/cpp/ql/test/library-tests/ir/ir/raw_ir.expected b/cpp/ql/test/library-tests/ir/ir/raw_ir.expected index 2f1d8200197..6b3eb801eae 100644 --- a/cpp/ql/test/library-tests/ir/ir/raw_ir.expected +++ b/cpp/ql/test/library-tests/ir/ir/raw_ir.expected @@ -1185,6 +1185,7 @@ destructors_for_temps.cpp: # 55| mu55_21(unknown) = ^CallSideEffect : ~m? # 55| mu55_22(ClassWithConstructor) = ^IndirectMayWriteSideEffect[-1] : &:r55_5 # 55| v55_23(void) = ThrowValue : &:r55_5, ~m? +#-----| Exception -> Block 2 # 55| Block 4 # 55| r55_24(glval) = VariableAddress[#temp55:75] : @@ -1239,6 +1240,7 @@ destructors_for_temps.cpp: # 59| mu59_15(ClassWithDestructor2) = ^IndirectMayWriteSideEffect[-1] : &:r59_5 # 59| mu59_16(char) = Store[#throw59:9] : &:r59_4, r59_12 # 59| v59_17(void) = ThrowValue : &:r59_4, ~m? +#-----| Exception -> Block 2 # 59| Block 4 # 59| r59_18(char) = Constant[97] : @@ -1250,6 +1252,66 @@ destructors_for_temps.cpp: # 58| v58_9(void) = ReturnVoid : #-----| Goto -> Block 1 +# 70| bool conditional_temp_via_conjunction(bool) +# 70| Block 0 +# 70| v70_1(void) = EnterFunction : +# 70| mu70_2(unknown) = AliasedDefinition : +# 70| mu70_3(unknown) = InitializeNonLocal : +# 70| r70_4(glval) = VariableAddress[b] : +# 70| mu70_5(bool) = InitializeParameter[b] : &:r70_4 +# 72| r72_1(glval) = VariableAddress[#return] : +# 72| r72_2(glval) = VariableAddress[b] : +# 72| r72_3(bool) = Load[b] : &:r72_2, ~m? +# 72| v72_4(void) = ConditionalBranch : r72_3 +#-----| False -> Block 1 +#-----| True -> Block 4 + +# 72| Block 1 +# 72| r72_5(glval) = VariableAddress[#temp72:12] : +# 72| r72_6(bool) = Constant[0] : +# 72| mu72_7(bool) = Store[#temp72:12] : &:r72_5, r72_6 +#-----| Goto -> Block 2 + +# 72| Block 2 +# 72| r72_8(glval) = VariableAddress[#temp72:12] : +# 72| r72_9(bool) = Load[#temp72:12] : &:r72_8, ~m? +# 72| r72_10(glval) = CopyValue : r72_21 +# 72| r72_11(glval) = FunctionAddress[~string] : +# 72| v72_12(void) = Call[~string] : func:r72_11, this:r72_10 +# 72| mu72_13(unknown) = ^CallSideEffect : ~m? +# 72| v72_14(void) = ^IndirectReadSideEffect[-1] : &:r72_10, ~m? +# 72| mu72_15(string) = ^IndirectMayWriteSideEffect[-1] : &:r72_10 +# 72| mu72_16(bool) = Store[#return] : &:r72_1, r72_9 +# 70| r70_6(glval) = VariableAddress[#return] : +# 70| v70_7(void) = ReturnValue : &:r70_6, ~m? +# 70| v70_8(void) = AliasedUse : ~m? +# 70| v70_9(void) = ExitFunction : + +# 72| Block 3 +# 72| r72_17(glval) = VariableAddress[#temp72:12] : +# 72| r72_18(bool) = Constant[1] : +# 72| mu72_19(bool) = Store[#temp72:12] : &:r72_17, r72_18 +#-----| Goto -> Block 2 + +# 72| Block 4 +# 72| r72_20(glval) = FunctionAddress[const_ref_string] : +# 72| r72_21(glval) = VariableAddress[#temp72:34] : +# 72| mu72_22(string) = Uninitialized[#temp72:34] : &:r72_21 +# 72| r72_23(glval) = FunctionAddress[string] : +# 72| r72_24(glval) = StringConstant[""] : +# 72| r72_25(char *) = Convert : r72_24 +# 72| v72_26(void) = Call[string] : func:r72_23, this:r72_21, 0:r72_25 +# 72| mu72_27(unknown) = ^CallSideEffect : ~m? +# 72| v72_28(void) = ^BufferReadSideEffect[0] : &:r72_25, ~m? +# 72| mu72_29(string) = ^IndirectMayWriteSideEffect[-1] : &:r72_21 +# 72| r72_30(string &) = CopyValue : r72_21 +# 72| r72_31(bool) = Call[const_ref_string] : func:r72_20, 0:r72_30 +# 72| mu72_32(unknown) = ^CallSideEffect : ~m? +# 72| v72_33(void) = ^BufferReadSideEffect[0] : &:r72_30, ~m? +# 72| v72_34(void) = ConditionalBranch : r72_31 +#-----| False -> Block 1 +#-----| True -> Block 3 + ir.c: # 7| void MyCoordsTest(int) # 7| Block 0 @@ -4618,6 +4680,7 @@ ir.cpp: # 728| r728_3(char *) = Convert : r728_2 # 728| mu728_4(char *) = Store[#throw728:7] : &:r728_1, r728_3 # 728| v728_5(void) = ThrowValue : &:r728_1, ~m? +#-----| Exception -> Block 9 # 730| Block 4 # 730| r730_1(glval) = VariableAddress[x] : @@ -4656,6 +4719,7 @@ ir.cpp: # 731| v731_18(void) = ^BufferReadSideEffect[0] : &:r731_15, ~m? # 731| mu731_19(String) = ^IndirectMayWriteSideEffect[-1] : &:r731_11 # 731| v731_20(void) = ThrowValue : &:r731_11, ~m? +#-----| Exception -> Block 9 # 733| Block 8 # 733| r733_1(int) = Constant[7] : @@ -4683,6 +4747,7 @@ ir.cpp: # 736| v736_8(void) = ^BufferReadSideEffect[0] : &:r736_5, ~m? # 736| mu736_9(String) = ^IndirectMayWriteSideEffect[-1] : &:r736_1 # 736| v736_10(void) = ThrowValue : &:r736_1, ~m? +#-----| Exception -> Block 2 # 738| Block 11 # 738| v738_1(void) = CatchByType[const String &] : @@ -4700,6 +4765,7 @@ ir.cpp: # 740| Block 13 # 740| v740_1(void) = CatchAny : # 741| v741_1(void) = ReThrow : +#-----| Exception -> Block 2 # 743| Block 14 # 743| v743_1(void) = NoOp : @@ -7290,6 +7356,7 @@ ir.cpp: # 1195| r1195_3(char *) = Convert : r1195_2 # 1195| mu1195_4(char *) = Store[#throw1195:7] : &:r1195_1, r1195_3 # 1195| v1195_5(void) = ThrowValue : &:r1195_1, ~m? +#-----| Exception -> Block 9 # 1197| Block 4 # 1197| r1197_1(glval) = VariableAddress[x] : @@ -7328,6 +7395,7 @@ ir.cpp: # 1198| v1198_18(void) = ^BufferReadSideEffect[0] : &:r1198_15, ~m? # 1198| mu1198_19(String) = ^IndirectMayWriteSideEffect[-1] : &:r1198_11 # 1198| v1198_20(void) = ThrowValue : &:r1198_11, ~m? +#-----| Exception -> Block 9 # 1200| Block 8 # 1200| r1200_1(int) = Constant[7] : @@ -7355,6 +7423,7 @@ ir.cpp: # 1203| v1203_8(void) = ^BufferReadSideEffect[0] : &:r1203_5, ~m? # 1203| mu1203_9(String) = ^IndirectMayWriteSideEffect[-1] : &:r1203_1 # 1203| v1203_10(void) = ThrowValue : &:r1203_1, ~m? +#-----| Exception -> Block 2 # 1205| Block 11 # 1205| v1205_1(void) = CatchByType[const String &] : @@ -13617,6 +13686,7 @@ ir.cpp: # 2282| v2282_8(void) = ^BufferReadSideEffect[0] : &:r2282_5, ~m? # 2282| mu2282_9(String) = ^IndirectMayWriteSideEffect[-1] : &:r2282_1 # 2282| v2282_10(void) = ThrowValue : &:r2282_1, ~m? +#-----| Exception -> Block 2 # 2284| Block 7 # 2284| v2284_1(void) = CatchByType[const String &] : @@ -13634,6 +13704,7 @@ ir.cpp: # 2286| Block 9 # 2286| v2286_1(void) = CatchAny : # 2287| v2287_1(void) = ReThrow : +#-----| Exception -> Block 2 # 2289| Block 10 # 2289| v2289_1(void) = NoOp : @@ -15477,6 +15548,7 @@ try_except.cpp: # 48| r48_2(int) = Constant[1] : # 48| mu48_3(int) = Store[#throw48:13] : &:r48_1, r48_2 # 48| v48_4(void) = ThrowValue : &:r48_1, ~m? +#-----| Exception -> Block 7 # 51| Block 4 # 51| r51_1(int) = Constant[0] : diff --git a/cpp/ql/test/library-tests/ir/ir/unaliased_ssa_consistency.expected b/cpp/ql/test/library-tests/ir/ir/unaliased_ssa_consistency.expected index b93c7d2649f..a85ba6b9389 100644 --- a/cpp/ql/test/library-tests/ir/ir/unaliased_ssa_consistency.expected +++ b/cpp/ql/test/library-tests/ir/ir/unaliased_ssa_consistency.expected @@ -20,6 +20,7 @@ multipleIRTypes lostReachability backEdgeCountMismatch useNotDominatedByDefinition +| destructors_for_temps.cpp:72:34:72:35 | Unary | Operand 'Unary' is not dominated by its definition in function '$@'. | destructors_for_temps.cpp:70:6:70:37 | bool conditional_temp_via_conjunction(bool) | bool conditional_temp_via_conjunction(bool) | switchInstructionWithoutDefaultEdge notMarkedAsConflated wronglyMarkedAsConflated diff --git a/cpp/ql/test/library-tests/ir/ir/unaliased_ssa_consistency_unsound.expected b/cpp/ql/test/library-tests/ir/ir/unaliased_ssa_consistency_unsound.expected index b93c7d2649f..a85ba6b9389 100644 --- a/cpp/ql/test/library-tests/ir/ir/unaliased_ssa_consistency_unsound.expected +++ b/cpp/ql/test/library-tests/ir/ir/unaliased_ssa_consistency_unsound.expected @@ -20,6 +20,7 @@ multipleIRTypes lostReachability backEdgeCountMismatch useNotDominatedByDefinition +| destructors_for_temps.cpp:72:34:72:35 | Unary | Operand 'Unary' is not dominated by its definition in function '$@'. | destructors_for_temps.cpp:70:6:70:37 | bool conditional_temp_via_conjunction(bool) | bool conditional_temp_via_conjunction(bool) | switchInstructionWithoutDefaultEdge notMarkedAsConflated wronglyMarkedAsConflated