From 4da4949049bdd5a78faf6b70497ad120d53a7e28 Mon Sep 17 00:00:00 2001 From: Andrzej Kotulski Date: Wed, 22 Mar 2017 09:59:32 -0700 Subject: [PATCH] [clang][AST] Fix wrong type in translation of NoOp cast and MaterializeExpr Summary: This issue was spotted in the wild. There may be more of those, unfortunately it's hard to predict More general problem is that types in infer frontend diverge from clang's types for DerivedToBase cast. Then, infer uses types from clang anyway and that confuses backend. Getting it always right is very hard Reviewed By: jvillard Differential Revision: D4754081 fbshipit-source-id: 5fb7069 --- infer/src/clang/cTrans.ml | 12 +- infer/src/clang/cTrans_utils.ml | 2 +- infer/tests/codetoanalyze/cpp/errors/Makefile | 1 + .../tests/codetoanalyze/cpp/errors/issues.exp | 2 + .../conditional/binary_conditional.cpp.dot | 4 +- .../conditional/lvalue_conditional.cpp.dot | 2 +- .../cpp/shared/types/inheritance_casts.cpp | 35 +++++ .../shared/types/inheritance_casts.cpp.dot | 136 ++++++++++++++++++ 8 files changed, 186 insertions(+), 8 deletions(-) create mode 100644 infer/tests/codetoanalyze/cpp/shared/types/inheritance_casts.cpp create mode 100644 infer/tests/codetoanalyze/cpp/shared/types/inheritance_casts.cpp.dot diff --git a/infer/src/clang/cTrans.ml b/infer/src/clang/cTrans.ml index f301ee6b4..bf7357cc3 100644 --- a/infer/src/clang/cTrans.ml +++ b/infer/src/clang/cTrans.ml @@ -2214,13 +2214,17 @@ struct and materializeTemporaryExpr_trans trans_state stmt_info stmt_list expr_info = let context = trans_state.context in let procdesc = context.CContext.procdesc in - let (pvar, typ) = mk_temp_sil_var_for_expr context.CContext.tenv procdesc + (* typ_tmp is 'best guess' type of variable - translation may decide to use different type + later *) + let (pvar, typ_tmp) = mk_temp_sil_var_for_expr context.CContext.tenv procdesc "SIL_materialize_temp__" expr_info in let temp_exp = match stmt_list with [p] -> p | _ -> assert false in - Procdesc.append_locals procdesc [(Pvar.get_name pvar, typ)]; - let var_exp_typ = (Exp.Lvar pvar, typ) in + let var_exp_typ = (Exp.Lvar pvar, typ_tmp) in let res_trans = init_expr_trans trans_state var_exp_typ stmt_info (Some temp_exp) in - { res_trans with exps = [var_exp_typ] } + let _, typ = extract_exp_from_list res_trans.exps + "MaterializeExpr initializer missing\n" in + Procdesc.append_locals procdesc [(Pvar.get_name pvar, typ)]; + res_trans and compoundLiteralExpr_trans trans_state stmt_list expr_info = let stmt = match stmt_list with [stmt] -> stmt | _ -> assert false in diff --git a/infer/src/clang/cTrans_utils.ml b/infer/src/clang/cTrans_utils.ml index c862745a7..99f994159 100644 --- a/infer/src/clang/cTrans_utils.ml +++ b/infer/src/clang/cTrans_utils.ml @@ -414,10 +414,10 @@ let cast_operation trans_state cast_kind exps cast_typ sil_loc is_objc_bridged = let (exp, typ) = extract_exp_from_list exps "" in let is_objc_bridged = Option.is_some trans_state.obj_bridged_cast_typ || is_objc_bridged in match cast_kind with + | `NoOp | `DerivedToBase | `UncheckedDerivedToBase -> (* These casts ignore change of type *) ([], (exp, typ)) - | `NoOp | `BitCast | `IntegralCast | `IntegralToBoolean -> (* This is treated as a nop by returning the same expressions exps*) diff --git a/infer/tests/codetoanalyze/cpp/errors/Makefile b/infer/tests/codetoanalyze/cpp/errors/Makefile index 1ddb53328..fdf9f84c7 100644 --- a/infer/tests/codetoanalyze/cpp/errors/Makefile +++ b/infer/tests/codetoanalyze/cpp/errors/Makefile @@ -49,6 +49,7 @@ SOURCES = \ shared/templates/function.cpp \ shared/templates/function_pack.cpp \ shared/templates/method.cpp \ + shared/types/inheritance_casts.cpp \ shared/types/inheritance_field.cpp \ shared/types/operator_overload.cpp \ shared/types/return_struct.cpp \ diff --git a/infer/tests/codetoanalyze/cpp/errors/issues.exp b/infer/tests/codetoanalyze/cpp/errors/issues.exp index 4eb9d2963..427b063ca 100644 --- a/infer/tests/codetoanalyze/cpp/errors/issues.exp +++ b/infer/tests/codetoanalyze/cpp/errors/issues.exp @@ -277,6 +277,8 @@ codetoanalyze/cpp/shared/templates/function_pack.cpp, div0_3args4, 0, DIVIDE_BY_ codetoanalyze/cpp/shared/templates/method.cpp, method::div0_getter, 3, DIVIDE_BY_ZERO, [start of procedure method::div0_getter(),start of procedure X2,return from a call to method::X2_X2,start of procedure Getter,return from a call to method::Getter_Getter,start of procedure get,start of procedure get,return from a call to method::X2_get,return from a call to method::Getter_get] codetoanalyze/cpp/shared/templates/method.cpp, method::div0_getter_templ, 4, DIVIDE_BY_ZERO, [start of procedure method::div0_getter_templ(),start of procedure X2,return from a call to method::X2_X2,start of procedure X3,return from a call to method::X3_X3,start of procedure GetterTempl,return from a call to method::GetterTempl_GetterTempl,start of procedure get,start of procedure get,return from a call to method::X3_get,start of procedure get,return from a call to method::X2_get,return from a call to method::GetterTempl_get] codetoanalyze/cpp/shared/templates/method.cpp, method::div0_getter_templ2, 4, DIVIDE_BY_ZERO, [start of procedure method::div0_getter_templ2(),start of procedure X2,return from a call to method::X2_X2,start of procedure X2,return from a call to method::X2_X2,start of procedure GetterTempl,return from a call to method::GetterTempl_GetterTempl,start of procedure get,start of procedure get,return from a call to method::X2_get,start of procedure get,return from a call to method::X2_get,return from a call to method::GetterTempl_get] +codetoanalyze/cpp/shared/types/inheritance_casts.cpp, inheritance_casts::div0_A, 0, DIVIDE_BY_ZERO, [start of procedure inheritance_casts::div0_A(),start of procedure inheritance_casts::getA(),start of procedure A,return from a call to inheritance_casts::A_A,start of procedure A,return from a call to inheritance_casts::A_A,return from a call to inheritance_casts::getA,start of procedure inheritance_casts::div()] +codetoanalyze/cpp/shared/types/inheritance_casts.cpp, inheritance_casts::div0_B, 0, DIVIDE_BY_ZERO, [start of procedure inheritance_casts::div0_B(),start of procedure inheritance_casts::getB(),start of procedure B,start of procedure A,return from a call to inheritance_casts::A_A,return from a call to inheritance_casts::B_B,start of procedure B,start of procedure A,return from a call to inheritance_casts::A_A,return from a call to inheritance_casts::B_B,return from a call to inheritance_casts::getB,start of procedure inheritance_casts::div()] codetoanalyze/cpp/shared/types/inheritance_field.cpp, div0_b1, 2, DIVIDE_BY_ZERO, [start of procedure div0_b1()] codetoanalyze/cpp/shared/types/inheritance_field.cpp, div0_b1_s, 3, DIVIDE_BY_ZERO, [start of procedure div0_b1_s()] codetoanalyze/cpp/shared/types/inheritance_field.cpp, div0_b2, 2, DIVIDE_BY_ZERO, [start of procedure div0_b2()] diff --git a/infer/tests/codetoanalyze/cpp/shared/conditional/binary_conditional.cpp.dot b/infer/tests/codetoanalyze/cpp/shared/conditional/binary_conditional.cpp.dot index 0b055ab58..e81b27122 100644 --- a/infer/tests/codetoanalyze/cpp/shared/conditional/binary_conditional.cpp.dot +++ b/infer/tests/codetoanalyze/cpp/shared/conditional/binary_conditional.cpp.dot @@ -1,6 +1,6 @@ /* @generated */ digraph iCFG { -"binaryConditional#binary_conditional#_ZN18binary_conditional17binaryConditionalEv.af42c001c0ee2314f76b0516127756f0_1" [label="1: Start binary_conditional::binaryConditional\nFormals: \nLocals: x:class binary_conditional::X 0$?%__sil_tmpSIL_materialize_temp__n$0:class binary_conditional::X 0$?%__sil_tmpSIL_temp_conditional___n$2:class binary_conditional::X 0$?%__sil_tmpSIL_materialize_temp__n$4:class binary_conditional::X a:class binary_conditional::X \n DECLARE_LOCALS(&return,&x,&0$?%__sil_tmpSIL_materialize_temp__n$0,&0$?%__sil_tmpSIL_temp_conditional___n$2,&0$?%__sil_tmpSIL_materialize_temp__n$4,&a); [line 22]\n " color=yellow style=filled] +"binaryConditional#binary_conditional#_ZN18binary_conditional17binaryConditionalEv.af42c001c0ee2314f76b0516127756f0_1" [label="1: Start binary_conditional::binaryConditional\nFormals: \nLocals: x:class binary_conditional::X 0$?%__sil_tmpSIL_temp_conditional___n$2:class binary_conditional::X 0$?%__sil_tmpSIL_materialize_temp__n$4:class binary_conditional::X 0$?%__sil_tmpSIL_materialize_temp__n$0:class binary_conditional::X a:class binary_conditional::X \n DECLARE_LOCALS(&return,&x,&0$?%__sil_tmpSIL_temp_conditional___n$2,&0$?%__sil_tmpSIL_materialize_temp__n$4,&0$?%__sil_tmpSIL_materialize_temp__n$0,&a); [line 22]\n " color=yellow style=filled] "binaryConditional#binary_conditional#_ZN18binary_conditional17binaryConditionalEv.af42c001c0ee2314f76b0516127756f0_1" -> "binaryConditional#binary_conditional#_ZN18binary_conditional17binaryConditionalEv.af42c001c0ee2314f76b0516127756f0_11" ; @@ -44,7 +44,7 @@ digraph iCFG { "binaryConditional#binary_conditional#_ZN18binary_conditional17binaryConditionalEv.af42c001c0ee2314f76b0516127756f0_11" -> "binaryConditional#binary_conditional#_ZN18binary_conditional17binaryConditionalEv.af42c001c0ee2314f76b0516127756f0_9" ; -"conditional#binary_conditional#_ZN18binary_conditional11conditionalEv.4759b8a979477773442be7ef925c905c_1" [label="1: Start binary_conditional::conditional\nFormals: \nLocals: x:class binary_conditional::X 0$?%__sil_tmpSIL_materialize_temp__n$0:class binary_conditional::X 0$?%__sil_tmpSIL_temp_conditional___n$1:class binary_conditional::X 0$?%__sil_tmp__temp_return_n$3:class binary_conditional::X 0$?%__sil_tmpSIL_materialize_temp__n$5:class binary_conditional::X a:class binary_conditional::X \n DECLARE_LOCALS(&return,&x,&0$?%__sil_tmpSIL_materialize_temp__n$0,&0$?%__sil_tmpSIL_temp_conditional___n$1,&0$?%__sil_tmp__temp_return_n$3,&0$?%__sil_tmpSIL_materialize_temp__n$5,&a); [line 27]\n " color=yellow style=filled] +"conditional#binary_conditional#_ZN18binary_conditional11conditionalEv.4759b8a979477773442be7ef925c905c_1" [label="1: Start binary_conditional::conditional\nFormals: \nLocals: x:class binary_conditional::X 0$?%__sil_tmpSIL_temp_conditional___n$1:class binary_conditional::X 0$?%__sil_tmp__temp_return_n$3:class binary_conditional::X 0$?%__sil_tmpSIL_materialize_temp__n$5:class binary_conditional::X 0$?%__sil_tmpSIL_materialize_temp__n$0:class binary_conditional::X a:class binary_conditional::X \n DECLARE_LOCALS(&return,&x,&0$?%__sil_tmpSIL_temp_conditional___n$1,&0$?%__sil_tmp__temp_return_n$3,&0$?%__sil_tmpSIL_materialize_temp__n$5,&0$?%__sil_tmpSIL_materialize_temp__n$0,&a); [line 27]\n " color=yellow style=filled] "conditional#binary_conditional#_ZN18binary_conditional11conditionalEv.4759b8a979477773442be7ef925c905c_1" -> "conditional#binary_conditional#_ZN18binary_conditional11conditionalEv.4759b8a979477773442be7ef925c905c_10" ; diff --git a/infer/tests/codetoanalyze/cpp/shared/conditional/lvalue_conditional.cpp.dot b/infer/tests/codetoanalyze/cpp/shared/conditional/lvalue_conditional.cpp.dot index f7421c533..07e2ae30b 100644 --- a/infer/tests/codetoanalyze/cpp/shared/conditional/lvalue_conditional.cpp.dot +++ b/infer/tests/codetoanalyze/cpp/shared/conditional/lvalue_conditional.cpp.dot @@ -216,7 +216,7 @@ digraph iCFG { "assign_conditional#_Z18assign_conditionali.1be7ef126568d5983b2ac2b3145799a8_11" -> "assign_conditional#_Z18assign_conditionali.1be7ef126568d5983b2ac2b3145799a8_10" ; -"div_temp_lvalue#_Z15div_temp_lvalueii.4a86aab3ba0c7c218d2756113db6c5ee_1" [label="1: Start div_temp_lvalue\nFormals: a:int b:int\nLocals: r:int& 0$?%__sil_tmpSIL_materialize_temp__n$2:int 0$?%__sil_tmpSIL_temp_conditional___n$3:int \n DECLARE_LOCALS(&return,&r,&0$?%__sil_tmpSIL_materialize_temp__n$2,&0$?%__sil_tmpSIL_temp_conditional___n$3); [line 28]\n " color=yellow style=filled] +"div_temp_lvalue#_Z15div_temp_lvalueii.4a86aab3ba0c7c218d2756113db6c5ee_1" [label="1: Start div_temp_lvalue\nFormals: a:int b:int\nLocals: r:int& 0$?%__sil_tmpSIL_temp_conditional___n$3:int 0$?%__sil_tmpSIL_materialize_temp__n$2:int \n DECLARE_LOCALS(&return,&r,&0$?%__sil_tmpSIL_temp_conditional___n$3,&0$?%__sil_tmpSIL_materialize_temp__n$2); [line 28]\n " color=yellow style=filled] "div_temp_lvalue#_Z15div_temp_lvalueii.4a86aab3ba0c7c218d2756113db6c5ee_1" -> "div_temp_lvalue#_Z15div_temp_lvalueii.4a86aab3ba0c7c218d2756113db6c5ee_5" ; diff --git a/infer/tests/codetoanalyze/cpp/shared/types/inheritance_casts.cpp b/infer/tests/codetoanalyze/cpp/shared/types/inheritance_casts.cpp new file mode 100644 index 000000000..53cf20d93 --- /dev/null +++ b/infer/tests/codetoanalyze/cpp/shared/types/inheritance_casts.cpp @@ -0,0 +1,35 @@ +/* + * Copyright (c) 2017 - present Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + */ +namespace inheritance_casts { +struct A { + int f; +}; +struct B : public A {}; + +B getB(int f) { + B x; + x.f = f; + return x; +} +A getA(int f) { + A x; + x.f = f; + return x; +} + +int div(const A& x) { return 1 / x.f; } + +int div0_A() { return div(getA(0)); } + +int div1_A() { return div(getA(1)); } + +int div0_B() { return div(getB(0)); } + +int div1_B() { return div(getB(1)); } +} diff --git a/infer/tests/codetoanalyze/cpp/shared/types/inheritance_casts.cpp.dot b/infer/tests/codetoanalyze/cpp/shared/types/inheritance_casts.cpp.dot new file mode 100644 index 000000000..897e951a4 --- /dev/null +++ b/infer/tests/codetoanalyze/cpp/shared/types/inheritance_casts.cpp.dot @@ -0,0 +1,136 @@ +/* @generated */ +digraph iCFG { +"div0_A#inheritance_casts#_ZN17inheritance_casts6div0_AEv.15dec0b3616f1a776d4033f30db9fa78_1" [label="1: Start inheritance_casts::div0_A\nFormals: \nLocals: 0$?%__sil_tmpSIL_materialize_temp__n$0:class inheritance_casts::A \n DECLARE_LOCALS(&return,&0$?%__sil_tmpSIL_materialize_temp__n$0); [line 28]\n " color=yellow style=filled] + + + "div0_A#inheritance_casts#_ZN17inheritance_casts6div0_AEv.15dec0b3616f1a776d4033f30db9fa78_1" -> "div0_A#inheritance_casts#_ZN17inheritance_casts6div0_AEv.15dec0b3616f1a776d4033f30db9fa78_3" ; +"div0_A#inheritance_casts#_ZN17inheritance_casts6div0_AEv.15dec0b3616f1a776d4033f30db9fa78_2" [label="2: Exit inheritance_casts::div0_A \n " color=yellow style=filled] + + +"div0_A#inheritance_casts#_ZN17inheritance_casts6div0_AEv.15dec0b3616f1a776d4033f30db9fa78_3" [label="3: Return Stmt \n _fun_inheritance_casts::getA(0:int,&0$?%__sil_tmpSIL_materialize_temp__n$0:class inheritance_casts::A*) [line 28]\n n$2=_fun_inheritance_casts::div(&0$?%__sil_tmpSIL_materialize_temp__n$0:class inheritance_casts::A&) [line 28]\n *&return:int=n$2 [line 28]\n " shape="box"] + + + "div0_A#inheritance_casts#_ZN17inheritance_casts6div0_AEv.15dec0b3616f1a776d4033f30db9fa78_3" -> "div0_A#inheritance_casts#_ZN17inheritance_casts6div0_AEv.15dec0b3616f1a776d4033f30db9fa78_2" ; +"div1_A#inheritance_casts#_ZN17inheritance_casts6div1_AEv.78e81303b9269f80f51033bdb015e1d3_1" [label="1: Start inheritance_casts::div1_A\nFormals: \nLocals: 0$?%__sil_tmpSIL_materialize_temp__n$0:class inheritance_casts::A \n DECLARE_LOCALS(&return,&0$?%__sil_tmpSIL_materialize_temp__n$0); [line 30]\n " color=yellow style=filled] + + + "div1_A#inheritance_casts#_ZN17inheritance_casts6div1_AEv.78e81303b9269f80f51033bdb015e1d3_1" -> "div1_A#inheritance_casts#_ZN17inheritance_casts6div1_AEv.78e81303b9269f80f51033bdb015e1d3_3" ; +"div1_A#inheritance_casts#_ZN17inheritance_casts6div1_AEv.78e81303b9269f80f51033bdb015e1d3_2" [label="2: Exit inheritance_casts::div1_A \n " color=yellow style=filled] + + +"div1_A#inheritance_casts#_ZN17inheritance_casts6div1_AEv.78e81303b9269f80f51033bdb015e1d3_3" [label="3: Return Stmt \n _fun_inheritance_casts::getA(1:int,&0$?%__sil_tmpSIL_materialize_temp__n$0:class inheritance_casts::A*) [line 30]\n n$2=_fun_inheritance_casts::div(&0$?%__sil_tmpSIL_materialize_temp__n$0:class inheritance_casts::A&) [line 30]\n *&return:int=n$2 [line 30]\n " shape="box"] + + + "div1_A#inheritance_casts#_ZN17inheritance_casts6div1_AEv.78e81303b9269f80f51033bdb015e1d3_3" -> "div1_A#inheritance_casts#_ZN17inheritance_casts6div1_AEv.78e81303b9269f80f51033bdb015e1d3_2" ; +"div0_B#inheritance_casts#_ZN17inheritance_casts6div0_BEv.9b8c7311e4ab1bb1b67504af3bff3376_1" [label="1: Start inheritance_casts::div0_B\nFormals: \nLocals: 0$?%__sil_tmpSIL_materialize_temp__n$0:class inheritance_casts::B \n DECLARE_LOCALS(&return,&0$?%__sil_tmpSIL_materialize_temp__n$0); [line 32]\n " color=yellow style=filled] + + + "div0_B#inheritance_casts#_ZN17inheritance_casts6div0_BEv.9b8c7311e4ab1bb1b67504af3bff3376_1" -> "div0_B#inheritance_casts#_ZN17inheritance_casts6div0_BEv.9b8c7311e4ab1bb1b67504af3bff3376_3" ; +"div0_B#inheritance_casts#_ZN17inheritance_casts6div0_BEv.9b8c7311e4ab1bb1b67504af3bff3376_2" [label="2: Exit inheritance_casts::div0_B \n " color=yellow style=filled] + + +"div0_B#inheritance_casts#_ZN17inheritance_casts6div0_BEv.9b8c7311e4ab1bb1b67504af3bff3376_3" [label="3: Return Stmt \n _fun_inheritance_casts::getB(0:int,&0$?%__sil_tmpSIL_materialize_temp__n$0:class inheritance_casts::B*) [line 32]\n n$2=_fun_inheritance_casts::div(&0$?%__sil_tmpSIL_materialize_temp__n$0:class inheritance_casts::B&) [line 32]\n *&return:int=n$2 [line 32]\n " shape="box"] + + + "div0_B#inheritance_casts#_ZN17inheritance_casts6div0_BEv.9b8c7311e4ab1bb1b67504af3bff3376_3" -> "div0_B#inheritance_casts#_ZN17inheritance_casts6div0_BEv.9b8c7311e4ab1bb1b67504af3bff3376_2" ; +"div1_B#inheritance_casts#_ZN17inheritance_casts6div1_BEv.9d37aacd2400426e880c13f23c689634_1" [label="1: Start inheritance_casts::div1_B\nFormals: \nLocals: 0$?%__sil_tmpSIL_materialize_temp__n$0:class inheritance_casts::B \n DECLARE_LOCALS(&return,&0$?%__sil_tmpSIL_materialize_temp__n$0); [line 34]\n " color=yellow style=filled] + + + "div1_B#inheritance_casts#_ZN17inheritance_casts6div1_BEv.9d37aacd2400426e880c13f23c689634_1" -> "div1_B#inheritance_casts#_ZN17inheritance_casts6div1_BEv.9d37aacd2400426e880c13f23c689634_3" ; +"div1_B#inheritance_casts#_ZN17inheritance_casts6div1_BEv.9d37aacd2400426e880c13f23c689634_2" [label="2: Exit inheritance_casts::div1_B \n " color=yellow style=filled] + + +"div1_B#inheritance_casts#_ZN17inheritance_casts6div1_BEv.9d37aacd2400426e880c13f23c689634_3" [label="3: Return Stmt \n _fun_inheritance_casts::getB(1:int,&0$?%__sil_tmpSIL_materialize_temp__n$0:class inheritance_casts::B*) [line 34]\n n$2=_fun_inheritance_casts::div(&0$?%__sil_tmpSIL_materialize_temp__n$0:class inheritance_casts::B&) [line 34]\n *&return:int=n$2 [line 34]\n " shape="box"] + + + "div1_B#inheritance_casts#_ZN17inheritance_casts6div1_BEv.9d37aacd2400426e880c13f23c689634_3" -> "div1_B#inheritance_casts#_ZN17inheritance_casts6div1_BEv.9d37aacd2400426e880c13f23c689634_2" ; +"getA#inheritance_casts#_ZN17inheritance_casts4getAEi.7c2742f7758a7dba1c9774df1889bad7_1" [label="1: Start inheritance_casts::getA\nFormals: f:int __return_param:class inheritance_casts::A*\nLocals: x:class inheritance_casts::A \n DECLARE_LOCALS(&return,&x); [line 20]\n " color=yellow style=filled] + + + "getA#inheritance_casts#_ZN17inheritance_casts4getAEi.7c2742f7758a7dba1c9774df1889bad7_1" -> "getA#inheritance_casts#_ZN17inheritance_casts4getAEi.7c2742f7758a7dba1c9774df1889bad7_5" ; +"getA#inheritance_casts#_ZN17inheritance_casts4getAEi.7c2742f7758a7dba1c9774df1889bad7_2" [label="2: Exit inheritance_casts::getA \n " color=yellow style=filled] + + +"getA#inheritance_casts#_ZN17inheritance_casts4getAEi.7c2742f7758a7dba1c9774df1889bad7_3" [label="3: Return Stmt \n n$0=*&__return_param:class inheritance_casts::A* [line 23]\n _fun_inheritance_casts::A_A(n$0:class inheritance_casts::A*,&x:class inheritance_casts::A&) [line 23]\n " shape="box"] + + + "getA#inheritance_casts#_ZN17inheritance_casts4getAEi.7c2742f7758a7dba1c9774df1889bad7_3" -> "getA#inheritance_casts#_ZN17inheritance_casts4getAEi.7c2742f7758a7dba1c9774df1889bad7_2" ; +"getA#inheritance_casts#_ZN17inheritance_casts4getAEi.7c2742f7758a7dba1c9774df1889bad7_4" [label="4: BinaryOperatorStmt: Assign \n n$1=*&f:int [line 22]\n *&x.f:int=n$1 [line 22]\n " shape="box"] + + + "getA#inheritance_casts#_ZN17inheritance_casts4getAEi.7c2742f7758a7dba1c9774df1889bad7_4" -> "getA#inheritance_casts#_ZN17inheritance_casts4getAEi.7c2742f7758a7dba1c9774df1889bad7_3" ; +"getA#inheritance_casts#_ZN17inheritance_casts4getAEi.7c2742f7758a7dba1c9774df1889bad7_5" [label="5: DeclStmt \n _fun_inheritance_casts::A_A(&x:class inheritance_casts::A*) [line 21]\n " shape="box"] + + + "getA#inheritance_casts#_ZN17inheritance_casts4getAEi.7c2742f7758a7dba1c9774df1889bad7_5" -> "getA#inheritance_casts#_ZN17inheritance_casts4getAEi.7c2742f7758a7dba1c9774df1889bad7_4" ; +"getB#inheritance_casts#_ZN17inheritance_casts4getBEi.3a3dc8645898c5027aae99e05025494c_1" [label="1: Start inheritance_casts::getB\nFormals: f:int __return_param:class inheritance_casts::B*\nLocals: x:class inheritance_casts::B \n DECLARE_LOCALS(&return,&x); [line 15]\n " color=yellow style=filled] + + + "getB#inheritance_casts#_ZN17inheritance_casts4getBEi.3a3dc8645898c5027aae99e05025494c_1" -> "getB#inheritance_casts#_ZN17inheritance_casts4getBEi.3a3dc8645898c5027aae99e05025494c_5" ; +"getB#inheritance_casts#_ZN17inheritance_casts4getBEi.3a3dc8645898c5027aae99e05025494c_2" [label="2: Exit inheritance_casts::getB \n " color=yellow style=filled] + + +"getB#inheritance_casts#_ZN17inheritance_casts4getBEi.3a3dc8645898c5027aae99e05025494c_3" [label="3: Return Stmt \n n$0=*&__return_param:class inheritance_casts::B* [line 18]\n _fun_inheritance_casts::B_B(n$0:class inheritance_casts::B*,&x:class inheritance_casts::B&) [line 18]\n " shape="box"] + + + "getB#inheritance_casts#_ZN17inheritance_casts4getBEi.3a3dc8645898c5027aae99e05025494c_3" -> "getB#inheritance_casts#_ZN17inheritance_casts4getBEi.3a3dc8645898c5027aae99e05025494c_2" ; +"getB#inheritance_casts#_ZN17inheritance_casts4getBEi.3a3dc8645898c5027aae99e05025494c_4" [label="4: BinaryOperatorStmt: Assign \n n$1=*&f:int [line 17]\n *&x.f:int=n$1 [line 17]\n " shape="box"] + + + "getB#inheritance_casts#_ZN17inheritance_casts4getBEi.3a3dc8645898c5027aae99e05025494c_4" -> "getB#inheritance_casts#_ZN17inheritance_casts4getBEi.3a3dc8645898c5027aae99e05025494c_3" ; +"getB#inheritance_casts#_ZN17inheritance_casts4getBEi.3a3dc8645898c5027aae99e05025494c_5" [label="5: DeclStmt \n _fun_inheritance_casts::B_B(&x:class inheritance_casts::B*) [line 16]\n " shape="box"] + + + "getB#inheritance_casts#_ZN17inheritance_casts4getBEi.3a3dc8645898c5027aae99e05025494c_5" -> "getB#inheritance_casts#_ZN17inheritance_casts4getBEi.3a3dc8645898c5027aae99e05025494c_4" ; +"A#A#inheritance_casts#{_ZN17inheritance_casts1AC1Ev}.a3d1803b12cc04cbb5260c678862cdba_1" [label="1: Start inheritance_casts::A_A\nFormals: this:class inheritance_casts::A*\nLocals: \n DECLARE_LOCALS(&return); [line 10]\n " color=yellow style=filled] + + + "A#A#inheritance_casts#{_ZN17inheritance_casts1AC1Ev}.a3d1803b12cc04cbb5260c678862cdba_1" -> "A#A#inheritance_casts#{_ZN17inheritance_casts1AC1Ev}.a3d1803b12cc04cbb5260c678862cdba_2" ; +"A#A#inheritance_casts#{_ZN17inheritance_casts1AC1Ev}.a3d1803b12cc04cbb5260c678862cdba_2" [label="2: Exit inheritance_casts::A_A \n " color=yellow style=filled] + + +"A#A#inheritance_casts#{_ZN17inheritance_casts1AC1EOS0_|constexpr}.2b8bdfd4b7c5e083c9322cc1c9e7c07f_1" [label="1: Start inheritance_casts::A_A\nFormals: this:class inheritance_casts::A* __param_0:class inheritance_casts::A&\nLocals: \n DECLARE_LOCALS(&return); [line 10]\n " color=yellow style=filled] + + + "A#A#inheritance_casts#{_ZN17inheritance_casts1AC1EOS0_|constexpr}.2b8bdfd4b7c5e083c9322cc1c9e7c07f_1" -> "A#A#inheritance_casts#{_ZN17inheritance_casts1AC1EOS0_|constexpr}.2b8bdfd4b7c5e083c9322cc1c9e7c07f_3" ; +"A#A#inheritance_casts#{_ZN17inheritance_casts1AC1EOS0_|constexpr}.2b8bdfd4b7c5e083c9322cc1c9e7c07f_2" [label="2: Exit inheritance_casts::A_A \n " color=yellow style=filled] + + +"A#A#inheritance_casts#{_ZN17inheritance_casts1AC1EOS0_|constexpr}.2b8bdfd4b7c5e083c9322cc1c9e7c07f_3" [label="3: Constructor Init \n n$0=*&this:class inheritance_casts::A* [line 10]\n n$1=*&__param_0:class inheritance_casts::A& [line 10]\n n$2=*n$1.f:int [line 10]\n *n$0.f:int=n$2 [line 10]\n " shape="box"] + + + "A#A#inheritance_casts#{_ZN17inheritance_casts1AC1EOS0_|constexpr}.2b8bdfd4b7c5e083c9322cc1c9e7c07f_3" -> "A#A#inheritance_casts#{_ZN17inheritance_casts1AC1EOS0_|constexpr}.2b8bdfd4b7c5e083c9322cc1c9e7c07f_2" ; +"B#B#inheritance_casts#{_ZN17inheritance_casts1BC1Ev}.401db7788e41b57cb90150f1710fe7c0_1" [label="1: Start inheritance_casts::B_B\nFormals: this:class inheritance_casts::B*\nLocals: \n DECLARE_LOCALS(&return); [line 13]\n " color=yellow style=filled] + + + "B#B#inheritance_casts#{_ZN17inheritance_casts1BC1Ev}.401db7788e41b57cb90150f1710fe7c0_1" -> "B#B#inheritance_casts#{_ZN17inheritance_casts1BC1Ev}.401db7788e41b57cb90150f1710fe7c0_3" ; +"B#B#inheritance_casts#{_ZN17inheritance_casts1BC1Ev}.401db7788e41b57cb90150f1710fe7c0_2" [label="2: Exit inheritance_casts::B_B \n " color=yellow style=filled] + + +"B#B#inheritance_casts#{_ZN17inheritance_casts1BC1Ev}.401db7788e41b57cb90150f1710fe7c0_3" [label="3: Constructor Init \n n$0=*&this:class inheritance_casts::B* [line 13]\n _fun_inheritance_casts::A_A(n$0:class inheritance_casts::B*) [line 13]\n " shape="box"] + + + "B#B#inheritance_casts#{_ZN17inheritance_casts1BC1Ev}.401db7788e41b57cb90150f1710fe7c0_3" -> "B#B#inheritance_casts#{_ZN17inheritance_casts1BC1Ev}.401db7788e41b57cb90150f1710fe7c0_2" ; +"B#B#inheritance_casts#{_ZN17inheritance_casts1BC1EOS0_|constexpr}.e38b8f435b929838652bf1e8572853f3_1" [label="1: Start inheritance_casts::B_B\nFormals: this:class inheritance_casts::B* __param_0:class inheritance_casts::B&\nLocals: \n DECLARE_LOCALS(&return); [line 13]\n " color=yellow style=filled] + + + "B#B#inheritance_casts#{_ZN17inheritance_casts1BC1EOS0_|constexpr}.e38b8f435b929838652bf1e8572853f3_1" -> "B#B#inheritance_casts#{_ZN17inheritance_casts1BC1EOS0_|constexpr}.e38b8f435b929838652bf1e8572853f3_3" ; +"B#B#inheritance_casts#{_ZN17inheritance_casts1BC1EOS0_|constexpr}.e38b8f435b929838652bf1e8572853f3_2" [label="2: Exit inheritance_casts::B_B \n " color=yellow style=filled] + + +"B#B#inheritance_casts#{_ZN17inheritance_casts1BC1EOS0_|constexpr}.e38b8f435b929838652bf1e8572853f3_3" [label="3: Constructor Init \n n$0=*&this:class inheritance_casts::B* [line 13]\n n$1=*&__param_0:class inheritance_casts::B& [line 13]\n _fun_inheritance_casts::A_A(n$0:class inheritance_casts::B*,n$1:class inheritance_casts::B&) [line 13]\n " shape="box"] + + + "B#B#inheritance_casts#{_ZN17inheritance_casts1BC1EOS0_|constexpr}.e38b8f435b929838652bf1e8572853f3_3" -> "B#B#inheritance_casts#{_ZN17inheritance_casts1BC1EOS0_|constexpr}.e38b8f435b929838652bf1e8572853f3_2" ; +"div#inheritance_casts#_ZN17inheritance_casts3divERKNS_1AE.2add4c23f8184f07027ccb32fe3cee6d_1" [label="1: Start inheritance_casts::div\nFormals: x:class inheritance_casts::A&\nLocals: \n DECLARE_LOCALS(&return); [line 26]\n " color=yellow style=filled] + + + "div#inheritance_casts#_ZN17inheritance_casts3divERKNS_1AE.2add4c23f8184f07027ccb32fe3cee6d_1" -> "div#inheritance_casts#_ZN17inheritance_casts3divERKNS_1AE.2add4c23f8184f07027ccb32fe3cee6d_3" ; +"div#inheritance_casts#_ZN17inheritance_casts3divERKNS_1AE.2add4c23f8184f07027ccb32fe3cee6d_2" [label="2: Exit inheritance_casts::div \n " color=yellow style=filled] + + +"div#inheritance_casts#_ZN17inheritance_casts3divERKNS_1AE.2add4c23f8184f07027ccb32fe3cee6d_3" [label="3: Return Stmt \n n$0=*&x:class inheritance_casts::A& [line 26]\n n$1=*n$0.f:int [line 26]\n *&return:int=(1 / n$1) [line 26]\n " shape="box"] + + + "div#inheritance_casts#_ZN17inheritance_casts3divERKNS_1AE.2add4c23f8184f07027ccb32fe3cee6d_3" -> "div#inheritance_casts#_ZN17inheritance_casts3divERKNS_1AE.2add4c23f8184f07027ccb32fe3cee6d_2" ; +}