diff --git a/cpp/ql/test/library-tests/ir/ir/PrintAST.expected b/cpp/ql/test/library-tests/ir/ir/PrintAST.expected index a530c429072e..0c6c587994eb 100644 --- a/cpp/ql/test/library-tests/ir/ir/PrintAST.expected +++ b/cpp/ql/test/library-tests/ir/ir/PrintAST.expected @@ -9459,6 +9459,19 @@ ir.cpp: # 745| getExpr(): [ConstructorCall] call to String # 745| Type = [VoidType] void # 745| ValueCategory = prvalue +# 745| getArgument(0): [VariableAccess] (unnamed parameter 0) +# 745| Type = [LValueReferenceType] const String & +# 745| ValueCategory = prvalue(load) +# 745| getArgument(0).getFullyConverted(): [ReferenceToExpr] (reference to) +# 745| Type = [LValueReferenceType] const String & +# 745| ValueCategory = prvalue +# 745| getExpr(): [CStyleCast] (const String)... +# 745| Conversion = [BaseClassConversion] base class conversion +# 745| Type = [SpecifiedType] const String +# 745| ValueCategory = lvalue +# 745| getExpr(): [ReferenceDereferenceExpr] (reference dereference) +# 745| Type = [SpecifiedType] const String +# 745| ValueCategory = lvalue # 745| getEntryPoint(): [BlockStmt] { ... } # 745| getStmt(0): [ReturnStmt] return ... # 748| [Constructor] void Base::Base() @@ -11996,6 +12009,19 @@ ir.cpp: # 1045| getAFieldExpr(s): [ConstructorCall] call to String # 1045| Type = [VoidType] void # 1045| ValueCategory = prvalue +# 1045| getArgument(0): [VariableAccess] (unnamed parameter 0) +# 1045| Type = [LValueReferenceType] const String & +# 1045| ValueCategory = prvalue(load) +#-----| getArgument(0).getFullyConverted(): [ReferenceToExpr] (reference to) +#-----| Type = [LValueReferenceType] const String & +#-----| ValueCategory = prvalue +#-----| getExpr(): [CStyleCast] (const String)... +#-----| Conversion = [BaseClassConversion] base class conversion +#-----| Type = [SpecifiedType] const String +#-----| ValueCategory = lvalue +#-----| getExpr(): [ReferenceDereferenceExpr] (reference dereference) +#-----| Type = [SpecifiedType] const String +#-----| ValueCategory = lvalue # 1045| getAFieldExpr(x): [VariableAccess] x # 1045| Type = [IntType] int # 1045| ValueCategory = prvalue(load) @@ -12071,6 +12097,19 @@ ir.cpp: # 1049| getAFieldExpr(s): [ConstructorCall] call to String # 1049| Type = [VoidType] void # 1049| ValueCategory = prvalue +# 1049| getArgument(0): [VariableAccess] (unnamed parameter 0) +# 1049| Type = [LValueReferenceType] const String & +# 1049| ValueCategory = prvalue(load) +#-----| getArgument(0).getFullyConverted(): [ReferenceToExpr] (reference to) +#-----| Type = [LValueReferenceType] const String & +#-----| ValueCategory = prvalue +#-----| getExpr(): [CStyleCast] (const String)... +#-----| Conversion = [BaseClassConversion] base class conversion +#-----| Type = [SpecifiedType] const String +#-----| ValueCategory = lvalue +#-----| getExpr(): [ReferenceDereferenceExpr] (reference dereference) +#-----| Type = [SpecifiedType] const String +#-----| ValueCategory = lvalue # 1050| getStmt(9): [ExprStmt] ExprStmt # 1050| getExpr(): [FunctionCall] call to operator() # 1050| Type = [PlainCharType] char 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 4f1d1abb4ecf..5c32430e62f9 100644 --- a/cpp/ql/test/library-tests/ir/ir/aliased_ir.expected +++ b/cpp/ql/test/library-tests/ir/ir/aliased_ir.expected @@ -7501,32 +7501,38 @@ ir.cpp: # 745| void Base::Base(Base const&) # 745| Block 0 -# 745| v745_1(void) = EnterFunction : -# 745| m745_2(unknown) = AliasedDefinition : -# 745| m745_3(unknown) = InitializeNonLocal : -# 745| m745_4(unknown) = Chi : total:m745_2, partial:m745_3 -# 745| r745_5(glval) = VariableAddress[#this] : -# 745| m745_6(glval) = InitializeParameter[#this] : &:r745_5 -# 745| r745_7(glval) = Load[#this] : &:r745_5, m745_6 -# 745| m745_8(Base) = InitializeIndirection[#this] : &:r745_7 -# 745| m745_9(unknown) = Chi : total:m745_4, partial:m745_8 -#-----| r0_1(glval) = VariableAddress[(unnamed parameter 0)] : -#-----| m0_2(Base &) = InitializeParameter[(unnamed parameter 0)] : &:r0_1 -#-----| r0_3(Base &) = Load[(unnamed parameter 0)] : &:r0_1, m0_2 -#-----| m0_4(unknown) = InitializeIndirection[(unnamed parameter 0)] : &:r0_3 -# 745| r745_10(glval) = FieldAddress[base_s] : m745_6 -# 745| r745_11(glval) = FunctionAddress[String] : -# 745| v745_12(void) = Call[String] : func:r745_11, this:r745_10 -# 745| m745_13(unknown) = ^CallSideEffect : ~m745_9 -# 745| m745_14(unknown) = Chi : total:m745_9, partial:m745_13 -# 745| m745_15(String) = ^IndirectMayWriteSideEffect[-1] : &:r745_10 -# 745| m745_16(unknown) = Chi : total:m745_14, partial:m745_15 -# 745| v745_17(void) = NoOp : -# 745| v745_18(void) = ReturnIndirection[#this] : &:r745_7, ~m745_16 -#-----| v0_5(void) = ReturnIndirection[(unnamed parameter 0)] : &:r0_3, m0_4 -# 745| v745_19(void) = ReturnVoid : -# 745| v745_20(void) = AliasedUse : ~m745_16 -# 745| v745_21(void) = ExitFunction : +# 745| v745_1(void) = EnterFunction : +# 745| m745_2(unknown) = AliasedDefinition : +# 745| m745_3(unknown) = InitializeNonLocal : +# 745| m745_4(unknown) = Chi : total:m745_2, partial:m745_3 +# 745| r745_5(glval) = VariableAddress[#this] : +# 745| m745_6(glval) = InitializeParameter[#this] : &:r745_5 +# 745| r745_7(glval) = Load[#this] : &:r745_5, m745_6 +# 745| m745_8(Base) = InitializeIndirection[#this] : &:r745_7 +# 745| m745_9(unknown) = Chi : total:m745_4, partial:m745_8 +#-----| r0_1(glval) = VariableAddress[(unnamed parameter 0)] : +#-----| m0_2(Base &) = InitializeParameter[(unnamed parameter 0)] : &:r0_1 +#-----| r0_3(Base &) = Load[(unnamed parameter 0)] : &:r0_1, m0_2 +#-----| m0_4(unknown) = InitializeIndirection[(unnamed parameter 0)] : &:r0_3 +# 745| r745_10(glval) = FieldAddress[base_s] : m745_6 +# 745| r745_11(glval) = FunctionAddress[String] : +# 745| r745_12(glval) = VariableAddress : +# 745| r745_13(String &) = Load[?] : &:r745_12, ~m745_9 +# 745| r745_14(glval) = CopyValue : r745_13 +# 745| r745_15(glval) = ConvertToVirtualBase[String : String] : r745_14 +# 745| r745_16(String &) = CopyValue : r745_15 +# 745| v745_17(void) = Call[String] : func:r745_11, this:r745_10, 0:r745_16 +# 745| m745_18(unknown) = ^CallSideEffect : ~m745_9 +# 745| m745_19(unknown) = Chi : total:m745_9, partial:m745_18 +# 745| v745_20(void) = ^BufferReadSideEffect[0] : &:r745_16, ~m745_19 +# 745| m745_21(String) = ^IndirectMayWriteSideEffect[-1] : &:r745_10 +# 745| m745_22(unknown) = Chi : total:m745_19, partial:m745_21 +# 745| v745_23(void) = NoOp : +# 745| v745_24(void) = ReturnIndirection[#this] : &:r745_7, ~m745_22 +#-----| v0_5(void) = ReturnIndirection[(unnamed parameter 0)] : &:r0_3, m0_4 +# 745| v745_25(void) = ReturnVoid : +# 745| v745_26(void) = AliasedUse : ~m745_22 +# 745| v745_27(void) = ExitFunction : # 748| void Base::Base() # 748| Block 0 @@ -9542,26 +9548,32 @@ ir.cpp: # 1045| m1045_4(unknown) = Chi : total:m1044_7, partial:m1045_3 # 1045| r1045_5(glval) = FieldAddress[s] : r1045_2 # 1045| r1045_6(glval) = FunctionAddress[String] : -# 1045| v1045_7(void) = Call[String] : func:r1045_6, this:r1045_5 -# 1045| m1045_8(unknown) = ^CallSideEffect : ~m1045_4 -# 1045| m1045_9(unknown) = Chi : total:m1045_4, partial:m1045_8 -# 1045| m1045_10(String) = ^IndirectMayWriteSideEffect[-1] : &:r1045_5 -# 1045| m1045_11(unknown) = Chi : total:m1045_9, partial:m1045_10 -# 1045| r1045_12(glval) = FieldAddress[x] : r1045_2 -# 1045| r1045_13(glval) = VariableAddress[x] : -# 1045| r1045_14(int) = Load[x] : &:r1045_13, ~m1045_9 -# 1045| m1045_15(int) = Store[?] : &:r1045_12, r1045_14 -# 1045| m1045_16(unknown) = Chi : total:m1045_11, partial:m1045_15 -# 1045| r1045_17(decltype([...](...){...})) = Load[#temp1045:20] : &:r1045_2, ~m1045_16 -# 1045| m1045_18(decltype([...](...){...})) = Store[lambda_val] : &:r1045_1, r1045_17 -# 1045| m1045_19(unknown) = Chi : total:m1045_16, partial:m1045_18 +# 1045| r1045_7(glval) = VariableAddress : +# 1045| r1045_8(String &) = Load[?] : &:r1045_7, ~m1045_4 +#-----| r0_4(glval) = CopyValue : r1045_8 +#-----| r0_5(glval) = ConvertToVirtualBase[String : String] : r0_4 +#-----| r0_6(String &) = CopyValue : r0_5 +# 1045| v1045_9(void) = Call[String] : func:r1045_6, this:r1045_5, 0:r0_6 +# 1045| m1045_10(unknown) = ^CallSideEffect : ~m1045_4 +# 1045| m1045_11(unknown) = Chi : total:m1045_4, partial:m1045_10 +#-----| v0_7(void) = ^BufferReadSideEffect[0] : &:r0_6, ~m1045_11 +# 1045| m1045_12(String) = ^IndirectMayWriteSideEffect[-1] : &:r1045_5 +# 1045| m1045_13(unknown) = Chi : total:m1045_11, partial:m1045_12 +# 1045| r1045_14(glval) = FieldAddress[x] : r1045_2 +# 1045| r1045_15(glval) = VariableAddress[x] : +# 1045| r1045_16(int) = Load[x] : &:r1045_15, ~m1045_11 +# 1045| m1045_17(int) = Store[?] : &:r1045_14, r1045_16 +# 1045| m1045_18(unknown) = Chi : total:m1045_13, partial:m1045_17 +# 1045| r1045_19(decltype([...](...){...})) = Load[#temp1045:20] : &:r1045_2, ~m1045_18 +# 1045| m1045_20(decltype([...](...){...})) = Store[lambda_val] : &:r1045_1, r1045_19 +# 1045| m1045_21(unknown) = Chi : total:m1045_18, partial:m1045_20 # 1046| r1046_1(glval) = VariableAddress[lambda_val] : # 1046| r1046_2(glval) = Convert : r1046_1 # 1046| r1046_3(glval) = FunctionAddress[operator()] : # 1046| r1046_4(float) = Constant[2.0] : # 1046| r1046_5(char) = Call[operator()] : func:r1046_3, this:r1046_2, 0:r1046_4 -# 1046| m1046_6(unknown) = ^CallSideEffect : ~m1045_19 -# 1046| m1046_7(unknown) = Chi : total:m1045_19, partial:m1046_6 +# 1046| m1046_6(unknown) = ^CallSideEffect : ~m1045_21 +# 1046| m1046_7(unknown) = Chi : total:m1045_21, partial:m1046_6 # 1046| v1046_8(void) = ^IndirectReadSideEffect[-1] : &:r1046_2, ~m1046_7 # 1047| r1047_1(glval) = VariableAddress[lambda_ref_explicit] : # 1047| r1047_2(glval) = VariableAddress[#temp1047:29] : @@ -9588,21 +9600,27 @@ ir.cpp: # 1049| m1049_4(unknown) = Chi : total:m1048_7, partial:m1049_3 # 1049| r1049_5(glval) = FieldAddress[s] : r1049_2 # 1049| r1049_6(glval) = FunctionAddress[String] : -# 1049| v1049_7(void) = Call[String] : func:r1049_6, this:r1049_5 -# 1049| m1049_8(unknown) = ^CallSideEffect : ~m1049_4 -# 1049| m1049_9(unknown) = Chi : total:m1049_4, partial:m1049_8 -# 1049| m1049_10(String) = ^IndirectMayWriteSideEffect[-1] : &:r1049_5 -# 1049| m1049_11(unknown) = Chi : total:m1049_9, partial:m1049_10 -# 1049| r1049_12(decltype([...](...){...})) = Load[#temp1049:29] : &:r1049_2, ~m1049_11 -# 1049| m1049_13(decltype([...](...){...})) = Store[lambda_val_explicit] : &:r1049_1, r1049_12 -# 1049| m1049_14(unknown) = Chi : total:m1049_11, partial:m1049_13 +# 1049| r1049_7(glval) = VariableAddress : +# 1049| r1049_8(String &) = Load[?] : &:r1049_7, ~m1049_4 +#-----| r0_8(glval) = CopyValue : r1049_8 +#-----| r0_9(glval) = ConvertToVirtualBase[String : String] : r0_8 +#-----| r0_10(String &) = CopyValue : r0_9 +# 1049| v1049_9(void) = Call[String] : func:r1049_6, this:r1049_5, 0:r0_10 +# 1049| m1049_10(unknown) = ^CallSideEffect : ~m1049_4 +# 1049| m1049_11(unknown) = Chi : total:m1049_4, partial:m1049_10 +#-----| v0_11(void) = ^BufferReadSideEffect[0] : &:r0_10, ~m1049_11 +# 1049| m1049_12(String) = ^IndirectMayWriteSideEffect[-1] : &:r1049_5 +# 1049| m1049_13(unknown) = Chi : total:m1049_11, partial:m1049_12 +# 1049| r1049_14(decltype([...](...){...})) = Load[#temp1049:29] : &:r1049_2, ~m1049_13 +# 1049| m1049_15(decltype([...](...){...})) = Store[lambda_val_explicit] : &:r1049_1, r1049_14 +# 1049| m1049_16(unknown) = Chi : total:m1049_13, partial:m1049_15 # 1050| r1050_1(glval) = VariableAddress[lambda_val_explicit] : # 1050| r1050_2(glval) = Convert : r1050_1 # 1050| r1050_3(glval) = FunctionAddress[operator()] : # 1050| r1050_4(float) = Constant[4.0] : # 1050| r1050_5(char) = Call[operator()] : func:r1050_3, this:r1050_2, 0:r1050_4 -# 1050| m1050_6(unknown) = ^CallSideEffect : ~m1049_14 -# 1050| m1050_7(unknown) = Chi : total:m1049_14, partial:m1050_6 +# 1050| m1050_6(unknown) = ^CallSideEffect : ~m1049_16 +# 1050| m1050_7(unknown) = Chi : total:m1049_16, partial:m1050_6 # 1050| v1050_8(void) = ^IndirectReadSideEffect[-1] : &:r1050_2, ~m1050_7 # 1051| r1051_1(glval) = VariableAddress[lambda_mixed_explicit] : # 1051| r1051_2(glval) = VariableAddress[#temp1051:31] : 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 b83d9ea47e38..4b3d9c3ad5b4 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 @@ -29,5 +29,8 @@ fieldAddressOnNonPointer thisArgumentIsNonPointer | ir.cpp:2546:34:2546:34 | Call: call to operator bool | Call instruction 'Call: call to operator bool' has a `this` argument operand that is not an address, in function '$@'. | ir.cpp:2545:6:2545:23 | void this_inconsistency(bool) | void this_inconsistency(bool) | nonUniqueIRVariable +| ir.cpp:745:8:745:8 | VariableAddress: (unnamed parameter 0) | Variable address instruction 'VariableAddress: (unnamed parameter 0)' has no associated variable, in function '$@'. | ir.cpp:745:8:745:8 | void Base::Base(Base const&) | void Base::Base(Base const&) | +| ir.cpp:1045:20:1045:57 | VariableAddress: (unnamed parameter 0) | Variable address instruction 'VariableAddress: (unnamed parameter 0)' has no associated variable, in function '$@'. | ir.cpp:1040:6:1040:11 | void Lambda(int, String const&) | void Lambda(int, String const&) | +| ir.cpp:1049:29:1049:66 | VariableAddress: (unnamed parameter 0) | Variable address instruction 'VariableAddress: (unnamed parameter 0)' has no associated variable, in function '$@'. | ir.cpp:1040:6:1040:11 | void Lambda(int, String const&) | void Lambda(int, String const&) | nonBooleanOperand missingCppType 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 b83d9ea47e38..4b3d9c3ad5b4 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 @@ -29,5 +29,8 @@ fieldAddressOnNonPointer thisArgumentIsNonPointer | ir.cpp:2546:34:2546:34 | Call: call to operator bool | Call instruction 'Call: call to operator bool' has a `this` argument operand that is not an address, in function '$@'. | ir.cpp:2545:6:2545:23 | void this_inconsistency(bool) | void this_inconsistency(bool) | nonUniqueIRVariable +| ir.cpp:745:8:745:8 | VariableAddress: (unnamed parameter 0) | Variable address instruction 'VariableAddress: (unnamed parameter 0)' has no associated variable, in function '$@'. | ir.cpp:745:8:745:8 | void Base::Base(Base const&) | void Base::Base(Base const&) | +| ir.cpp:1045:20:1045:57 | VariableAddress: (unnamed parameter 0) | Variable address instruction 'VariableAddress: (unnamed parameter 0)' has no associated variable, in function '$@'. | ir.cpp:1040:6:1040:11 | void Lambda(int, String const&) | void Lambda(int, String const&) | +| ir.cpp:1049:29:1049:66 | VariableAddress: (unnamed parameter 0) | Variable address instruction 'VariableAddress: (unnamed parameter 0)' has no associated variable, in function '$@'. | ir.cpp:1040:6:1040:11 | void Lambda(int, String const&) | void Lambda(int, String const&) | nonBooleanOperand missingCppType 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 e30106d35204..9dbafe23b4a4 100644 --- a/cpp/ql/test/library-tests/ir/ir/raw_consistency.expected +++ b/cpp/ql/test/library-tests/ir/ir/raw_consistency.expected @@ -30,5 +30,8 @@ fieldAddressOnNonPointer thisArgumentIsNonPointer | ir.cpp:2546:34:2546:34 | Call: call to operator bool | Call instruction 'Call: call to operator bool' has a `this` argument operand that is not an address, in function '$@'. | ir.cpp:2545:6:2545:23 | void this_inconsistency(bool) | void this_inconsistency(bool) | nonUniqueIRVariable +| ir.cpp:745:8:745:8 | VariableAddress: (unnamed parameter 0) | Variable address instruction 'VariableAddress: (unnamed parameter 0)' has no associated variable, in function '$@'. | ir.cpp:745:8:745:8 | void Base::Base(Base const&) | void Base::Base(Base const&) | +| ir.cpp:1045:20:1045:57 | VariableAddress: (unnamed parameter 0) | Variable address instruction 'VariableAddress: (unnamed parameter 0)' has no associated variable, in function '$@'. | ir.cpp:1040:6:1040:11 | void Lambda(int, String const&) | void Lambda(int, String const&) | +| ir.cpp:1049:29:1049:66 | VariableAddress: (unnamed parameter 0) | Variable address instruction 'VariableAddress: (unnamed parameter 0)' has no associated variable, in function '$@'. | ir.cpp:1040:6:1040:11 | void Lambda(int, String const&) | void Lambda(int, String const&) | nonBooleanOperand missingCppType 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 937695c13ae5..317bdbf84ddf 100644 --- a/cpp/ql/test/library-tests/ir/ir/raw_ir.expected +++ b/cpp/ql/test/library-tests/ir/ir/raw_ir.expected @@ -7001,28 +7001,34 @@ ir.cpp: # 745| void Base::Base(Base const&) # 745| Block 0 -# 745| v745_1(void) = EnterFunction : -# 745| mu745_2(unknown) = AliasedDefinition : -# 745| mu745_3(unknown) = InitializeNonLocal : -# 745| r745_4(glval) = VariableAddress[#this] : -# 745| mu745_5(glval) = InitializeParameter[#this] : &:r745_4 -# 745| r745_6(glval) = Load[#this] : &:r745_4, ~m? -# 745| mu745_7(Base) = InitializeIndirection[#this] : &:r745_6 -#-----| r0_1(glval) = VariableAddress[(unnamed parameter 0)] : -#-----| mu0_2(Base &) = InitializeParameter[(unnamed parameter 0)] : &:r0_1 -#-----| r0_3(Base &) = Load[(unnamed parameter 0)] : &:r0_1, ~m? -#-----| mu0_4(unknown) = InitializeIndirection[(unnamed parameter 0)] : &:r0_3 -# 745| r745_8(glval) = FieldAddress[base_s] : mu745_5 -# 745| r745_9(glval) = FunctionAddress[String] : -# 745| v745_10(void) = Call[String] : func:r745_9, this:r745_8 -# 745| mu745_11(unknown) = ^CallSideEffect : ~m? -# 745| mu745_12(String) = ^IndirectMayWriteSideEffect[-1] : &:r745_8 -# 745| v745_13(void) = NoOp : -# 745| v745_14(void) = ReturnIndirection[#this] : &:r745_6, ~m? -#-----| v0_5(void) = ReturnIndirection[(unnamed parameter 0)] : &:r0_3, ~m? -# 745| v745_15(void) = ReturnVoid : -# 745| v745_16(void) = AliasedUse : ~m? -# 745| v745_17(void) = ExitFunction : +# 745| v745_1(void) = EnterFunction : +# 745| mu745_2(unknown) = AliasedDefinition : +# 745| mu745_3(unknown) = InitializeNonLocal : +# 745| r745_4(glval) = VariableAddress[#this] : +# 745| mu745_5(glval) = InitializeParameter[#this] : &:r745_4 +# 745| r745_6(glval) = Load[#this] : &:r745_4, ~m? +# 745| mu745_7(Base) = InitializeIndirection[#this] : &:r745_6 +#-----| r0_1(glval) = VariableAddress[(unnamed parameter 0)] : +#-----| mu0_2(Base &) = InitializeParameter[(unnamed parameter 0)] : &:r0_1 +#-----| r0_3(Base &) = Load[(unnamed parameter 0)] : &:r0_1, ~m? +#-----| mu0_4(unknown) = InitializeIndirection[(unnamed parameter 0)] : &:r0_3 +# 745| r745_8(glval) = FieldAddress[base_s] : mu745_5 +# 745| r745_9(glval) = FunctionAddress[String] : +# 745| r745_10(glval) = VariableAddress : +# 745| r745_11(String &) = Load[?] : &:r745_10, ~m? +# 745| r745_12(glval) = CopyValue : r745_11 +# 745| r745_13(glval) = ConvertToVirtualBase[String : String] : r745_12 +# 745| r745_14(String &) = CopyValue : r745_13 +# 745| v745_15(void) = Call[String] : func:r745_9, this:r745_8, 0:r745_14 +# 745| mu745_16(unknown) = ^CallSideEffect : ~m? +# 745| v745_17(void) = ^BufferReadSideEffect[0] : &:r745_14, ~m? +# 745| mu745_18(String) = ^IndirectMayWriteSideEffect[-1] : &:r745_8 +# 745| v745_19(void) = NoOp : +# 745| v745_20(void) = ReturnIndirection[#this] : &:r745_6, ~m? +#-----| v0_5(void) = ReturnIndirection[(unnamed parameter 0)] : &:r0_3, ~m? +# 745| v745_21(void) = ReturnVoid : +# 745| v745_22(void) = AliasedUse : ~m? +# 745| v745_23(void) = ExitFunction : # 748| void Base::Base() # 748| Block 0 @@ -8801,15 +8807,21 @@ ir.cpp: # 1045| mu1045_3(decltype([...](...){...})) = Uninitialized[#temp1045:20] : &:r1045_2 # 1045| r1045_4(glval) = FieldAddress[s] : r1045_2 # 1045| r1045_5(glval) = FunctionAddress[String] : -# 1045| v1045_6(void) = Call[String] : func:r1045_5, this:r1045_4 -# 1045| mu1045_7(unknown) = ^CallSideEffect : ~m? -# 1045| mu1045_8(String) = ^IndirectMayWriteSideEffect[-1] : &:r1045_4 -# 1045| r1045_9(glval) = FieldAddress[x] : r1045_2 -# 1045| r1045_10(glval) = VariableAddress[x] : -# 1045| r1045_11(int) = Load[x] : &:r1045_10, ~m? -# 1045| mu1045_12(int) = Store[?] : &:r1045_9, r1045_11 -# 1045| r1045_13(decltype([...](...){...})) = Load[#temp1045:20] : &:r1045_2, ~m? -# 1045| mu1045_14(decltype([...](...){...})) = Store[lambda_val] : &:r1045_1, r1045_13 +# 1045| r1045_6(glval) = VariableAddress : +# 1045| r1045_7(String &) = Load[?] : &:r1045_6, ~m? +#-----| r0_3(glval) = CopyValue : r1045_7 +#-----| r0_4(glval) = ConvertToVirtualBase[String : String] : r0_3 +#-----| r0_5(String &) = CopyValue : r0_4 +# 1045| v1045_8(void) = Call[String] : func:r1045_5, this:r1045_4, 0:r0_5 +# 1045| mu1045_9(unknown) = ^CallSideEffect : ~m? +#-----| v0_6(void) = ^BufferReadSideEffect[0] : &:r0_5, ~m? +# 1045| mu1045_10(String) = ^IndirectMayWriteSideEffect[-1] : &:r1045_4 +# 1045| r1045_11(glval) = FieldAddress[x] : r1045_2 +# 1045| r1045_12(glval) = VariableAddress[x] : +# 1045| r1045_13(int) = Load[x] : &:r1045_12, ~m? +# 1045| mu1045_14(int) = Store[?] : &:r1045_11, r1045_13 +# 1045| r1045_15(decltype([...](...){...})) = Load[#temp1045:20] : &:r1045_2, ~m? +# 1045| mu1045_16(decltype([...](...){...})) = Store[lambda_val] : &:r1045_1, r1045_15 # 1046| r1046_1(glval) = VariableAddress[lambda_val] : # 1046| r1046_2(glval) = Convert : r1046_1 # 1046| r1046_3(glval) = FunctionAddress[operator()] : @@ -8840,11 +8852,17 @@ ir.cpp: # 1049| mu1049_3(decltype([...](...){...})) = Uninitialized[#temp1049:29] : &:r1049_2 # 1049| r1049_4(glval) = FieldAddress[s] : r1049_2 # 1049| r1049_5(glval) = FunctionAddress[String] : -# 1049| v1049_6(void) = Call[String] : func:r1049_5, this:r1049_4 -# 1049| mu1049_7(unknown) = ^CallSideEffect : ~m? -# 1049| mu1049_8(String) = ^IndirectMayWriteSideEffect[-1] : &:r1049_4 -# 1049| r1049_9(decltype([...](...){...})) = Load[#temp1049:29] : &:r1049_2, ~m? -# 1049| mu1049_10(decltype([...](...){...})) = Store[lambda_val_explicit] : &:r1049_1, r1049_9 +# 1049| r1049_6(glval) = VariableAddress : +# 1049| r1049_7(String &) = Load[?] : &:r1049_6, ~m? +#-----| r0_7(glval) = CopyValue : r1049_7 +#-----| r0_8(glval) = ConvertToVirtualBase[String : String] : r0_7 +#-----| r0_9(String &) = CopyValue : r0_8 +# 1049| v1049_8(void) = Call[String] : func:r1049_5, this:r1049_4, 0:r0_9 +# 1049| mu1049_9(unknown) = ^CallSideEffect : ~m? +#-----| v0_10(void) = ^BufferReadSideEffect[0] : &:r0_9, ~m? +# 1049| mu1049_10(String) = ^IndirectMayWriteSideEffect[-1] : &:r1049_4 +# 1049| r1049_11(decltype([...](...){...})) = Load[#temp1049:29] : &:r1049_2, ~m? +# 1049| mu1049_12(decltype([...](...){...})) = Store[lambda_val_explicit] : &:r1049_1, r1049_11 # 1050| r1050_1(glval) = VariableAddress[lambda_val_explicit] : # 1050| r1050_2(glval) = Convert : r1050_1 # 1050| r1050_3(glval) = FunctionAddress[operator()] : 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 b83d9ea47e38..4b3d9c3ad5b4 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 @@ -29,5 +29,8 @@ fieldAddressOnNonPointer thisArgumentIsNonPointer | ir.cpp:2546:34:2546:34 | Call: call to operator bool | Call instruction 'Call: call to operator bool' has a `this` argument operand that is not an address, in function '$@'. | ir.cpp:2545:6:2545:23 | void this_inconsistency(bool) | void this_inconsistency(bool) | nonUniqueIRVariable +| ir.cpp:745:8:745:8 | VariableAddress: (unnamed parameter 0) | Variable address instruction 'VariableAddress: (unnamed parameter 0)' has no associated variable, in function '$@'. | ir.cpp:745:8:745:8 | void Base::Base(Base const&) | void Base::Base(Base const&) | +| ir.cpp:1045:20:1045:57 | VariableAddress: (unnamed parameter 0) | Variable address instruction 'VariableAddress: (unnamed parameter 0)' has no associated variable, in function '$@'. | ir.cpp:1040:6:1040:11 | void Lambda(int, String const&) | void Lambda(int, String const&) | +| ir.cpp:1049:29:1049:66 | VariableAddress: (unnamed parameter 0) | Variable address instruction 'VariableAddress: (unnamed parameter 0)' has no associated variable, in function '$@'. | ir.cpp:1040:6:1040:11 | void Lambda(int, String const&) | void Lambda(int, String const&) | nonBooleanOperand missingCppType 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 b83d9ea47e38..4b3d9c3ad5b4 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 @@ -29,5 +29,8 @@ fieldAddressOnNonPointer thisArgumentIsNonPointer | ir.cpp:2546:34:2546:34 | Call: call to operator bool | Call instruction 'Call: call to operator bool' has a `this` argument operand that is not an address, in function '$@'. | ir.cpp:2545:6:2545:23 | void this_inconsistency(bool) | void this_inconsistency(bool) | nonUniqueIRVariable +| ir.cpp:745:8:745:8 | VariableAddress: (unnamed parameter 0) | Variable address instruction 'VariableAddress: (unnamed parameter 0)' has no associated variable, in function '$@'. | ir.cpp:745:8:745:8 | void Base::Base(Base const&) | void Base::Base(Base const&) | +| ir.cpp:1045:20:1045:57 | VariableAddress: (unnamed parameter 0) | Variable address instruction 'VariableAddress: (unnamed parameter 0)' has no associated variable, in function '$@'. | ir.cpp:1040:6:1040:11 | void Lambda(int, String const&) | void Lambda(int, String const&) | +| ir.cpp:1049:29:1049:66 | VariableAddress: (unnamed parameter 0) | Variable address instruction 'VariableAddress: (unnamed parameter 0)' has no associated variable, in function '$@'. | ir.cpp:1040:6:1040:11 | void Lambda(int, String const&) | void Lambda(int, String const&) | nonBooleanOperand missingCppType diff --git a/cpp/ql/test/library-tests/syntax-zoo/aliased_ssa_consistency.expected b/cpp/ql/test/library-tests/syntax-zoo/aliased_ssa_consistency.expected index 11d828fa1a0d..0be5b0c68358 100644 --- a/cpp/ql/test/library-tests/syntax-zoo/aliased_ssa_consistency.expected +++ b/cpp/ql/test/library-tests/syntax-zoo/aliased_ssa_consistency.expected @@ -33,5 +33,8 @@ thisArgumentIsNonPointer | pointer_to_member.cpp:23:5:23:54 | Call: call to expression | Call instruction 'Call: call to expression' has a `this` argument operand that is not an address, in function '$@'. | pointer_to_member.cpp:14:5:14:9 | int usePM(int PM::*) | int usePM(int PM::*) | | pointer_to_member.cpp:24:5:24:49 | Call: call to expression | Call instruction 'Call: call to expression' has a `this` argument operand that is not an address, in function '$@'. | pointer_to_member.cpp:14:5:14:9 | int usePM(int PM::*) | int usePM(int PM::*) | nonUniqueIRVariable +| cpp11.cpp:82:17:82:17 | VariableAddress: (unnamed parameter 0) | Variable address instruction 'VariableAddress: (unnamed parameter 0)' has no associated variable, in function '$@'. | cpp11.cpp:82:17:82:17 | void (void lambda::apply2(int(*)(lambda::Val, lambda::Val), lambda::Val, lambda::Val))::(lambda [] type at line 82, col. 17)::(unnamed constructor)((void lambda::apply2(int(*)(lambda::Val, lambda::Val), lambda::Val, lambda::Val))::(lambda [] type at line 82, col. 17)&&) | void (void lambda::apply2(int(*)(lambda::Val, lambda::Val), lambda::Val, lambda::Val))::(lambda [] type at line 82, col. 17)::(unnamed constructor)((void lambda::apply2(int(*)(lambda::Val, lambda::Val), lambda::Val, lambda::Val))::(lambda [] type at line 82, col. 17)&&) | +| cpp11.cpp:82:17:82:55 | VariableAddress: (unnamed parameter 0) | Variable address instruction 'VariableAddress: (unnamed parameter 0)' has no associated variable, in function '$@'. | cpp11.cpp:81:8:81:8 | void lambda::apply2(int(*)(lambda::Val, lambda::Val), lambda::Val, lambda::Val) | void lambda::apply2(int(*)(lambda::Val, lambda::Val), lambda::Val, lambda::Val) | +| ir.cpp:747:8:747:8 | VariableAddress: (unnamed parameter 0) | Variable address instruction 'VariableAddress: (unnamed parameter 0)' has no associated variable, in function '$@'. | ir.cpp:747:8:747:8 | void Base::Base(Base const&) | void Base::Base(Base const&) | nonBooleanOperand missingCppType diff --git a/cpp/ql/test/library-tests/syntax-zoo/dataflow-consistency.expected b/cpp/ql/test/library-tests/syntax-zoo/dataflow-consistency.expected index b516aa0ce875..a688aa32e4ae 100644 --- a/cpp/ql/test/library-tests/syntax-zoo/dataflow-consistency.expected +++ b/cpp/ql/test/library-tests/syntax-zoo/dataflow-consistency.expected @@ -68,6 +68,9 @@ postWithInFlow | cpp11.cpp:7:7:7:8 | el [post update] | PostUpdateNode should not be the target of local flow. | | cpp11.cpp:77:19:77:21 | call to Val | PostUpdateNode should not be the target of local flow. | | cpp11.cpp:82:11:82:14 | call to Val | PostUpdateNode should not be the target of local flow. | +| cpp11.cpp:82:17:82:17 | call to Val | PostUpdateNode should not be the target of local flow. | +| cpp11.cpp:82:17:82:55 | call to Val | PostUpdateNode should not be the target of local flow. | +| cpp11.cpp:82:17:82:55 | call to Val | PostUpdateNode should not be the target of local flow. | | cpp11.cpp:82:45:82:48 | call to Val | PostUpdateNode should not be the target of local flow. | | cpp11.cpp:82:51:82:51 | call to Val | PostUpdateNode should not be the target of local flow. | | ir.cpp:177:5:177:5 | p [inner post update] | PostUpdateNode should not be the target of local flow. | @@ -88,6 +91,7 @@ postWithInFlow | ir.cpp:646:9:646:11 | m_a [post update] | PostUpdateNode should not be the target of local flow. | | ir.cpp:655:11:655:14 | this [inner post update] | PostUpdateNode should not be the target of local flow. | | ir.cpp:747:8:747:8 | base_s [inner post update] | PostUpdateNode should not be the target of local flow. | +| ir.cpp:747:8:747:8 | call to String | PostUpdateNode should not be the target of local flow. | | ir.cpp:756:8:756:8 | middle_s [inner post update] | PostUpdateNode should not be the target of local flow. | | ir.cpp:765:8:765:8 | derived_s [inner post update] | PostUpdateNode should not be the target of local flow. | | ir.cpp:811:7:811:13 | call to Base | PostUpdateNode should not be the target of local flow. | diff --git a/cpp/ql/test/library-tests/syntax-zoo/dataflow-ir-consistency.expected b/cpp/ql/test/library-tests/syntax-zoo/dataflow-ir-consistency.expected index 984335d12515..d910e0dd206d 100644 --- a/cpp/ql/test/library-tests/syntax-zoo/dataflow-ir-consistency.expected +++ b/cpp/ql/test/library-tests/syntax-zoo/dataflow-ir-consistency.expected @@ -20,8 +20,11 @@ argHasPostUpdate postWithInFlow | cpp11.cpp:77:19:77:21 | call to Val | PostUpdateNode should not be the target of local flow. | | cpp11.cpp:82:11:82:14 | call to Val | PostUpdateNode should not be the target of local flow. | +| cpp11.cpp:82:17:82:17 | call to Val | PostUpdateNode should not be the target of local flow. | +| cpp11.cpp:82:17:82:55 | call to Val | PostUpdateNode should not be the target of local flow. | | cpp11.cpp:82:45:82:48 | call to Val | PostUpdateNode should not be the target of local flow. | | cpp11.cpp:82:51:82:51 | call to Val | PostUpdateNode should not be the target of local flow. | +| ir.cpp:747:8:747:8 | call to String | PostUpdateNode should not be the target of local flow. | | ir.cpp:811:7:811:13 | call to Base | PostUpdateNode should not be the target of local flow. | | ir.cpp:812:7:812:26 | call to Base | PostUpdateNode should not be the target of local flow. | | ir.cpp:825:7:825:13 | call to Base | PostUpdateNode should not be the target of local flow. | diff --git a/cpp/ql/test/library-tests/syntax-zoo/raw_consistency.expected b/cpp/ql/test/library-tests/syntax-zoo/raw_consistency.expected index 3ca442129709..8432dc2c20e0 100644 --- a/cpp/ql/test/library-tests/syntax-zoo/raw_consistency.expected +++ b/cpp/ql/test/library-tests/syntax-zoo/raw_consistency.expected @@ -42,5 +42,8 @@ thisArgumentIsNonPointer | pointer_to_member.cpp:23:5:23:54 | Call: call to expression | Call instruction 'Call: call to expression' has a `this` argument operand that is not an address, in function '$@'. | pointer_to_member.cpp:14:5:14:9 | int usePM(int PM::*) | int usePM(int PM::*) | | pointer_to_member.cpp:24:5:24:49 | Call: call to expression | Call instruction 'Call: call to expression' has a `this` argument operand that is not an address, in function '$@'. | pointer_to_member.cpp:14:5:14:9 | int usePM(int PM::*) | int usePM(int PM::*) | nonUniqueIRVariable +| cpp11.cpp:82:17:82:17 | VariableAddress: (unnamed parameter 0) | Variable address instruction 'VariableAddress: (unnamed parameter 0)' has no associated variable, in function '$@'. | cpp11.cpp:82:17:82:17 | void (void lambda::apply2(int(*)(lambda::Val, lambda::Val), lambda::Val, lambda::Val))::(lambda [] type at line 82, col. 17)::(unnamed constructor)((void lambda::apply2(int(*)(lambda::Val, lambda::Val), lambda::Val, lambda::Val))::(lambda [] type at line 82, col. 17)&&) | void (void lambda::apply2(int(*)(lambda::Val, lambda::Val), lambda::Val, lambda::Val))::(lambda [] type at line 82, col. 17)::(unnamed constructor)((void lambda::apply2(int(*)(lambda::Val, lambda::Val), lambda::Val, lambda::Val))::(lambda [] type at line 82, col. 17)&&) | +| cpp11.cpp:82:17:82:55 | VariableAddress: (unnamed parameter 0) | Variable address instruction 'VariableAddress: (unnamed parameter 0)' has no associated variable, in function '$@'. | cpp11.cpp:81:8:81:8 | void lambda::apply2(int(*)(lambda::Val, lambda::Val), lambda::Val, lambda::Val) | void lambda::apply2(int(*)(lambda::Val, lambda::Val), lambda::Val, lambda::Val) | +| ir.cpp:747:8:747:8 | VariableAddress: (unnamed parameter 0) | Variable address instruction 'VariableAddress: (unnamed parameter 0)' has no associated variable, in function '$@'. | ir.cpp:747:8:747:8 | void Base::Base(Base const&) | void Base::Base(Base const&) | nonBooleanOperand missingCppType diff --git a/cpp/ql/test/library-tests/syntax-zoo/unaliased_ssa_consistency.expected b/cpp/ql/test/library-tests/syntax-zoo/unaliased_ssa_consistency.expected index 11d828fa1a0d..0be5b0c68358 100644 --- a/cpp/ql/test/library-tests/syntax-zoo/unaliased_ssa_consistency.expected +++ b/cpp/ql/test/library-tests/syntax-zoo/unaliased_ssa_consistency.expected @@ -33,5 +33,8 @@ thisArgumentIsNonPointer | pointer_to_member.cpp:23:5:23:54 | Call: call to expression | Call instruction 'Call: call to expression' has a `this` argument operand that is not an address, in function '$@'. | pointer_to_member.cpp:14:5:14:9 | int usePM(int PM::*) | int usePM(int PM::*) | | pointer_to_member.cpp:24:5:24:49 | Call: call to expression | Call instruction 'Call: call to expression' has a `this` argument operand that is not an address, in function '$@'. | pointer_to_member.cpp:14:5:14:9 | int usePM(int PM::*) | int usePM(int PM::*) | nonUniqueIRVariable +| cpp11.cpp:82:17:82:17 | VariableAddress: (unnamed parameter 0) | Variable address instruction 'VariableAddress: (unnamed parameter 0)' has no associated variable, in function '$@'. | cpp11.cpp:82:17:82:17 | void (void lambda::apply2(int(*)(lambda::Val, lambda::Val), lambda::Val, lambda::Val))::(lambda [] type at line 82, col. 17)::(unnamed constructor)((void lambda::apply2(int(*)(lambda::Val, lambda::Val), lambda::Val, lambda::Val))::(lambda [] type at line 82, col. 17)&&) | void (void lambda::apply2(int(*)(lambda::Val, lambda::Val), lambda::Val, lambda::Val))::(lambda [] type at line 82, col. 17)::(unnamed constructor)((void lambda::apply2(int(*)(lambda::Val, lambda::Val), lambda::Val, lambda::Val))::(lambda [] type at line 82, col. 17)&&) | +| cpp11.cpp:82:17:82:55 | VariableAddress: (unnamed parameter 0) | Variable address instruction 'VariableAddress: (unnamed parameter 0)' has no associated variable, in function '$@'. | cpp11.cpp:81:8:81:8 | void lambda::apply2(int(*)(lambda::Val, lambda::Val), lambda::Val, lambda::Val) | void lambda::apply2(int(*)(lambda::Val, lambda::Val), lambda::Val, lambda::Val) | +| ir.cpp:747:8:747:8 | VariableAddress: (unnamed parameter 0) | Variable address instruction 'VariableAddress: (unnamed parameter 0)' has no associated variable, in function '$@'. | ir.cpp:747:8:747:8 | void Base::Base(Base const&) | void Base::Base(Base const&) | nonBooleanOperand missingCppType