[C++] Fix compilation errors coming from smart pointer models

Summary: Our C++ model magic didn't work when instantiating smart pointers with volatile types. Fix it

Reviewed By: jvillard

Differential Revision: D4313271

fbshipit-source-id: 55ffb98
master
Andrzej Kotulski 8 years ago committed by Facebook Github Bot
parent 01b57b4f38
commit 13fcb27431

@ -47,10 +47,25 @@ class shared_ptr : public std__shared_ptr<T> {
// use it to avoid compilation errors and make infer analyzer happy
#define __cast_to_infer_ptr(self) ((infer_shared_ptr_t)self)
// provide overload for volatile void* to accomodate for situation when
// T is volatile ('volatile int' for example). 'void*' and 'nullptr_t'
// overloads are to avoid 'call to model_set is ambiguous' compilation errors
static void model_set(infer_shared_ptr_t self, nullptr_t value) {
*self = value;
}
static void model_set(infer_shared_ptr_t self, const void* value) {
*self = value;
}
static void model_set(infer_shared_ptr_t self, volatile void* value) {
*self = const_cast<const void*>(value);
}
static void model_set(infer_shared_ptr_t self, void* value) {
*self = const_cast<const void*>(value);
}
static void model_copy(infer_shared_ptr_t self, infer_shared_ptr_t other) {
/* TODO - increase refcount*/
*self = *other;

@ -50,10 +50,25 @@ struct unique_ptr {
// use it to avoid compilation errors and make infer analyzer happy
#define __cast_to_infer_ptr(self) ((infer_unique_ptr_t)self)
// provide overload for volatile void* to accomodate for situation when
// T is volatile ('volatile int' for example). 'void*' and 'nullptr_t'
// overloads are to avoid 'call to model_set is ambiguous' compilation errors
static void model_set(infer_unique_ptr_t self, nullptr_t value) {
*self = value;
}
static void model_set(infer_unique_ptr_t self, const void* value) {
*self = value;
}
static void model_set(infer_unique_ptr_t self, volatile void* value) {
*self = const_cast<const void*>(value);
}
static void model_set(infer_unique_ptr_t self, void* value) {
*self = const_cast<const void*>(value);
}
static void model_move(infer_unique_ptr_t self, infer_unique_ptr_t other) {
*self = *other;
model_set(other, nullptr);

@ -64,51 +64,62 @@ digraph iCFG {
"unused_deref_in_header{d41d8cd98f00b204e9800998ecf8427e_Z22unused_deref_in_headerPi}.78f023ac84a54d52e15a570dccffee2c_4" -> "unused_deref_in_header{d41d8cd98f00b204e9800998ecf8427e_Z22unused_deref_in_headerPi}.78f023ac84a54d52e15a570dccffee2c_3" ;
"std::__1::shared_ptr<int>_model_set(_ZNSt3__110shared_ptrIiE9model_setEPPKvS3_).c02dbe299962364cf3c5255e9c8d287d_1" [label="1: Start std::__1::shared_ptr<int>_model_set\nFormals: self:void** value:void*\nLocals: \n DECLARE_LOCALS(&return); [line 50]\n " color=yellow style=filled]
"std::__1::shared_ptr<int>_model_set(_ZNSt3__110shared_ptrIiE9model_setEPPKvDn).603a5b50e9cb50a015cb89275a6b4a02_1" [label="1: Start std::__1::shared_ptr<int>_model_set\nFormals: self:void** value:int\nLocals: \n DECLARE_LOCALS(&return); [line 53]\n " color=yellow style=filled]
"std::__1::shared_ptr<int>_model_set(_ZNSt3__110shared_ptrIiE9model_setEPPKvS3_).c02dbe299962364cf3c5255e9c8d287d_1" -> "std::__1::shared_ptr<int>_model_set(_ZNSt3__110shared_ptrIiE9model_setEPPKvS3_).c02dbe299962364cf3c5255e9c8d287d_3" ;
"std::__1::shared_ptr<int>_model_set(_ZNSt3__110shared_ptrIiE9model_setEPPKvS3_).c02dbe299962364cf3c5255e9c8d287d_2" [label="2: Exit std::__1::shared_ptr<int>_model_set \n " color=yellow style=filled]
"std::__1::shared_ptr<int>_model_set(_ZNSt3__110shared_ptrIiE9model_setEPPKvDn).603a5b50e9cb50a015cb89275a6b4a02_1" -> "std::__1::shared_ptr<int>_model_set(_ZNSt3__110shared_ptrIiE9model_setEPPKvDn).603a5b50e9cb50a015cb89275a6b4a02_3" ;
"std::__1::shared_ptr<int>_model_set(_ZNSt3__110shared_ptrIiE9model_setEPPKvDn).603a5b50e9cb50a015cb89275a6b4a02_2" [label="2: Exit std::__1::shared_ptr<int>_model_set \n " color=yellow style=filled]
"std::__1::shared_ptr<int>_model_set(_ZNSt3__110shared_ptrIiE9model_setEPPKvS3_).c02dbe299962364cf3c5255e9c8d287d_3" [label="3: BinaryOperatorStmt: Assign \n n$0=*&self:void** [line 51]\n n$1=*&value:void* [line 51]\n *n$0:void*=n$1 [line 51]\n " shape="box"]
"std::__1::shared_ptr<int>_model_set(_ZNSt3__110shared_ptrIiE9model_setEPPKvDn).603a5b50e9cb50a015cb89275a6b4a02_3" [label="3: BinaryOperatorStmt: Assign \n n$0=*&self:void** [line 54]\n n$1=*&value:int [line 54]\n *n$0:void*=n$1 [line 54]\n " shape="box"]
"std::__1::shared_ptr<int>_model_set(_ZNSt3__110shared_ptrIiE9model_setEPPKvS3_).c02dbe299962364cf3c5255e9c8d287d_3" -> "std::__1::shared_ptr<int>_model_set(_ZNSt3__110shared_ptrIiE9model_setEPPKvS3_).c02dbe299962364cf3c5255e9c8d287d_2" ;
"std::__1::shared_ptr<int>_shared_ptr{_ZNSt3__110shared_ptrIiEC1Ev|constexpr}.be99763d4002918a1c3f3b37430d6542_1" [label="1: Start std::__1::shared_ptr<int>_shared_ptr\nFormals: this:int**\nLocals: \n DECLARE_LOCALS(&return); [line 84]\n " color=yellow style=filled]
"std::__1::shared_ptr<int>_model_set(_ZNSt3__110shared_ptrIiE9model_setEPPKvDn).603a5b50e9cb50a015cb89275a6b4a02_3" -> "std::__1::shared_ptr<int>_model_set(_ZNSt3__110shared_ptrIiE9model_setEPPKvDn).603a5b50e9cb50a015cb89275a6b4a02_2" ;
"std::__1::shared_ptr<int>_model_set(_ZNSt3__110shared_ptrIiE9model_setEPPKvPv).f20560d1c1b5289ad1a513e8f9e363c5_1" [label="1: Start std::__1::shared_ptr<int>_model_set\nFormals: self:void** value:void*\nLocals: \n DECLARE_LOCALS(&return); [line 65]\n " color=yellow style=filled]
"std::__1::shared_ptr<int>_model_set(_ZNSt3__110shared_ptrIiE9model_setEPPKvPv).f20560d1c1b5289ad1a513e8f9e363c5_1" -> "std::__1::shared_ptr<int>_model_set(_ZNSt3__110shared_ptrIiE9model_setEPPKvPv).f20560d1c1b5289ad1a513e8f9e363c5_3" ;
"std::__1::shared_ptr<int>_model_set(_ZNSt3__110shared_ptrIiE9model_setEPPKvPv).f20560d1c1b5289ad1a513e8f9e363c5_2" [label="2: Exit std::__1::shared_ptr<int>_model_set \n " color=yellow style=filled]
"std::__1::shared_ptr<int>_model_set(_ZNSt3__110shared_ptrIiE9model_setEPPKvPv).f20560d1c1b5289ad1a513e8f9e363c5_3" [label="3: BinaryOperatorStmt: Assign \n n$0=*&self:void** [line 66]\n n$1=*&value:void* [line 66]\n *n$0:void*=n$1 [line 66]\n " shape="box"]
"std::__1::shared_ptr<int>_model_set(_ZNSt3__110shared_ptrIiE9model_setEPPKvPv).f20560d1c1b5289ad1a513e8f9e363c5_3" -> "std::__1::shared_ptr<int>_model_set(_ZNSt3__110shared_ptrIiE9model_setEPPKvPv).f20560d1c1b5289ad1a513e8f9e363c5_2" ;
"std::__1::shared_ptr<int>_shared_ptr{_ZNSt3__110shared_ptrIiEC1Ev|constexpr}.be99763d4002918a1c3f3b37430d6542_1" [label="1: Start std::__1::shared_ptr<int>_shared_ptr\nFormals: this:int**\nLocals: \n DECLARE_LOCALS(&return); [line 99]\n " color=yellow style=filled]
"std::__1::shared_ptr<int>_shared_ptr{_ZNSt3__110shared_ptrIiEC1Ev|constexpr}.be99763d4002918a1c3f3b37430d6542_1" -> "std::__1::shared_ptr<int>_shared_ptr{_ZNSt3__110shared_ptrIiEC1Ev|constexpr}.be99763d4002918a1c3f3b37430d6542_4" ;
"std::__1::shared_ptr<int>_shared_ptr{_ZNSt3__110shared_ptrIiEC1Ev|constexpr}.be99763d4002918a1c3f3b37430d6542_2" [label="2: Exit std::__1::shared_ptr<int>_shared_ptr \n " color=yellow style=filled]
"std::__1::shared_ptr<int>_shared_ptr{_ZNSt3__110shared_ptrIiEC1Ev|constexpr}.be99763d4002918a1c3f3b37430d6542_3" [label="3: Call _fun_std::__1::shared_ptr<int>_model_set \n n$0=*&this:int** [line 85]\n _fun_std::__1::shared_ptr<int>_model_set(n$0:void**,null:void*) [line 85]\n " shape="box"]
"std::__1::shared_ptr<int>_shared_ptr{_ZNSt3__110shared_ptrIiEC1Ev|constexpr}.be99763d4002918a1c3f3b37430d6542_3" [label="3: Call _fun_std::__1::shared_ptr<int>_model_set \n n$0=*&this:int** [line 100]\n _fun_std::__1::shared_ptr<int>_model_set(n$0:void**,null:int) [line 100]\n " shape="box"]
"std::__1::shared_ptr<int>_shared_ptr{_ZNSt3__110shared_ptrIiEC1Ev|constexpr}.be99763d4002918a1c3f3b37430d6542_3" -> "std::__1::shared_ptr<int>_shared_ptr{_ZNSt3__110shared_ptrIiEC1Ev|constexpr}.be99763d4002918a1c3f3b37430d6542_2" ;
"std::__1::shared_ptr<int>_shared_ptr{_ZNSt3__110shared_ptrIiEC1Ev|constexpr}.be99763d4002918a1c3f3b37430d6542_4" [label="4: Constructor Init \n n$1=*&this:int** [line 85]\n _fun_std::__1::std__shared_ptr<int>_std__shared_ptr(n$1:int**) [line 84]\n n$2=*n$1:int* [line 84]\n " shape="box"]
"std::__1::shared_ptr<int>_shared_ptr{_ZNSt3__110shared_ptrIiEC1Ev|constexpr}.be99763d4002918a1c3f3b37430d6542_4" [label="4: Constructor Init \n n$1=*&this:int** [line 100]\n _fun_std::__1::std__shared_ptr<int>_std__shared_ptr(n$1:int**) [line 99]\n n$2=*n$1:int* [line 99]\n " shape="box"]
"std::__1::shared_ptr<int>_shared_ptr{_ZNSt3__110shared_ptrIiEC1Ev|constexpr}.be99763d4002918a1c3f3b37430d6542_4" -> "std::__1::shared_ptr<int>_shared_ptr{_ZNSt3__110shared_ptrIiEC1Ev|constexpr}.be99763d4002918a1c3f3b37430d6542_3" ;
"std::__1::shared_ptr<int>_~shared_ptr(_ZNSt3__110shared_ptrIiED0Ev).388e7f06faa2f498fd08f3d3c50ca31a_1" [label="1: Start std::__1::shared_ptr<int>_~shared_ptr\nFormals: this:int**\nLocals: \n DECLARE_LOCALS(&return); [line 165]\n " color=yellow style=filled]
"std::__1::shared_ptr<int>_~shared_ptr(_ZNSt3__110shared_ptrIiED0Ev).388e7f06faa2f498fd08f3d3c50ca31a_1" [label="1: Start std::__1::shared_ptr<int>_~shared_ptr\nFormals: this:int**\nLocals: \n DECLARE_LOCALS(&return); [line 180]\n " color=yellow style=filled]
"std::__1::shared_ptr<int>_~shared_ptr(_ZNSt3__110shared_ptrIiED0Ev).388e7f06faa2f498fd08f3d3c50ca31a_1" -> "std::__1::shared_ptr<int>_~shared_ptr(_ZNSt3__110shared_ptrIiED0Ev).388e7f06faa2f498fd08f3d3c50ca31a_3" ;
"std::__1::shared_ptr<int>_~shared_ptr(_ZNSt3__110shared_ptrIiED0Ev).388e7f06faa2f498fd08f3d3c50ca31a_2" [label="2: Exit std::__1::shared_ptr<int>_~shared_ptr \n " color=yellow style=filled]
"std::__1::shared_ptr<int>_~shared_ptr(_ZNSt3__110shared_ptrIiED0Ev).388e7f06faa2f498fd08f3d3c50ca31a_3" [label="3: Call _fun_std::__1::shared_ptr<int>_reset<int,_void> \n n$0=*&this:int** [line 165]\n _=*n$0:int* [line 165]\n _fun_std::__1::shared_ptr<int>_reset<int,_void>(n$0:int**,null:int*) [line 165]\n " shape="box"]
"std::__1::shared_ptr<int>_~shared_ptr(_ZNSt3__110shared_ptrIiED0Ev).388e7f06faa2f498fd08f3d3c50ca31a_3" [label="3: Call _fun_std::__1::shared_ptr<int>_reset<int,_void> \n n$0=*&this:int** [line 180]\n _=*n$0:int* [line 180]\n _fun_std::__1::shared_ptr<int>_reset<int,_void>(n$0:int**,null:int*) [line 180]\n " shape="box"]
"std::__1::shared_ptr<int>_~shared_ptr(_ZNSt3__110shared_ptrIiED0Ev).388e7f06faa2f498fd08f3d3c50ca31a_3" -> "std::__1::shared_ptr<int>_~shared_ptr(_ZNSt3__110shared_ptrIiED0Ev).388e7f06faa2f498fd08f3d3c50ca31a_2" ;
"std::__1::shared_ptr<int>_reset<int,_void>(_ZNSt3__110shared_ptrIiE5resetIivEEvPT_).29e462552cba695192437aa4bfbf146e_1" [label="1: Start std::__1::shared_ptr<int>_reset<int,_void>\nFormals: this:int** p:int*\nLocals: \n DECLARE_LOCALS(&return); [line 217]\n " color=yellow style=filled]
"std::__1::shared_ptr<int>_reset<int,_void>(_ZNSt3__110shared_ptrIiE5resetIivEEvPT_).29e462552cba695192437aa4bfbf146e_1" [label="1: Start std::__1::shared_ptr<int>_reset<int,_void>\nFormals: this:int** p:int*\nLocals: \n DECLARE_LOCALS(&return); [line 232]\n " color=yellow style=filled]
"std::__1::shared_ptr<int>_reset<int,_void>(_ZNSt3__110shared_ptrIiE5resetIivEEvPT_).29e462552cba695192437aa4bfbf146e_1" -> "std::__1::shared_ptr<int>_reset<int,_void>(_ZNSt3__110shared_ptrIiE5resetIivEEvPT_).29e462552cba695192437aa4bfbf146e_3" ;
"std::__1::shared_ptr<int>_reset<int,_void>(_ZNSt3__110shared_ptrIiE5resetIivEEvPT_).29e462552cba695192437aa4bfbf146e_2" [label="2: Exit std::__1::shared_ptr<int>_reset<int,_void> \n " color=yellow style=filled]
"std::__1::shared_ptr<int>_reset<int,_void>(_ZNSt3__110shared_ptrIiE5resetIivEEvPT_).29e462552cba695192437aa4bfbf146e_3" [label="3: Call _fun_std::__1::shared_ptr<int>_model_set \n n$0=*&this:int** [line 223]\n n$1=*&p:int* [line 223]\n _fun_std::__1::shared_ptr<int>_model_set(n$0:void**,n$1:void*) [line 223]\n " shape="box"]
"std::__1::shared_ptr<int>_reset<int,_void>(_ZNSt3__110shared_ptrIiE5resetIivEEvPT_).29e462552cba695192437aa4bfbf146e_3" [label="3: Call _fun_std::__1::shared_ptr<int>_model_set \n n$0=*&this:int** [line 238]\n n$1=*&p:int* [line 238]\n _fun_std::__1::shared_ptr<int>_model_set(n$0:void**,n$1:void*) [line 238]\n " shape="box"]
"std::__1::shared_ptr<int>_reset<int,_void>(_ZNSt3__110shared_ptrIiE5resetIivEEvPT_).29e462552cba695192437aa4bfbf146e_3" -> "std::__1::shared_ptr<int>_reset<int,_void>(_ZNSt3__110shared_ptrIiE5resetIivEEvPT_).29e462552cba695192437aa4bfbf146e_2" ;

@ -64,51 +64,62 @@ digraph iCFG {
"unused_deref_in_header{d41d8cd98f00b204e9800998ecf8427e_Z22unused_deref_in_headerPi}.78f023ac84a54d52e15a570dccffee2c_4" -> "unused_deref_in_header{d41d8cd98f00b204e9800998ecf8427e_Z22unused_deref_in_headerPi}.78f023ac84a54d52e15a570dccffee2c_3" ;
"std::__1::shared_ptr<int>_model_set(_ZNSt3__110shared_ptrIiE9model_setEPPKvS3_).c02dbe299962364cf3c5255e9c8d287d_1" [label="1: Start std::__1::shared_ptr<int>_model_set\nFormals: self:void** value:void*\nLocals: \n DECLARE_LOCALS(&return); [line 50]\n " color=yellow style=filled]
"std::__1::shared_ptr<int>_model_set(_ZNSt3__110shared_ptrIiE9model_setEPPKvDn).603a5b50e9cb50a015cb89275a6b4a02_1" [label="1: Start std::__1::shared_ptr<int>_model_set\nFormals: self:void** value:int\nLocals: \n DECLARE_LOCALS(&return); [line 53]\n " color=yellow style=filled]
"std::__1::shared_ptr<int>_model_set(_ZNSt3__110shared_ptrIiE9model_setEPPKvS3_).c02dbe299962364cf3c5255e9c8d287d_1" -> "std::__1::shared_ptr<int>_model_set(_ZNSt3__110shared_ptrIiE9model_setEPPKvS3_).c02dbe299962364cf3c5255e9c8d287d_3" ;
"std::__1::shared_ptr<int>_model_set(_ZNSt3__110shared_ptrIiE9model_setEPPKvS3_).c02dbe299962364cf3c5255e9c8d287d_2" [label="2: Exit std::__1::shared_ptr<int>_model_set \n " color=yellow style=filled]
"std::__1::shared_ptr<int>_model_set(_ZNSt3__110shared_ptrIiE9model_setEPPKvDn).603a5b50e9cb50a015cb89275a6b4a02_1" -> "std::__1::shared_ptr<int>_model_set(_ZNSt3__110shared_ptrIiE9model_setEPPKvDn).603a5b50e9cb50a015cb89275a6b4a02_3" ;
"std::__1::shared_ptr<int>_model_set(_ZNSt3__110shared_ptrIiE9model_setEPPKvDn).603a5b50e9cb50a015cb89275a6b4a02_2" [label="2: Exit std::__1::shared_ptr<int>_model_set \n " color=yellow style=filled]
"std::__1::shared_ptr<int>_model_set(_ZNSt3__110shared_ptrIiE9model_setEPPKvS3_).c02dbe299962364cf3c5255e9c8d287d_3" [label="3: BinaryOperatorStmt: Assign \n n$0=*&self:void** [line 51]\n n$1=*&value:void* [line 51]\n *n$0:void*=n$1 [line 51]\n " shape="box"]
"std::__1::shared_ptr<int>_model_set(_ZNSt3__110shared_ptrIiE9model_setEPPKvDn).603a5b50e9cb50a015cb89275a6b4a02_3" [label="3: BinaryOperatorStmt: Assign \n n$0=*&self:void** [line 54]\n n$1=*&value:int [line 54]\n *n$0:void*=n$1 [line 54]\n " shape="box"]
"std::__1::shared_ptr<int>_model_set(_ZNSt3__110shared_ptrIiE9model_setEPPKvS3_).c02dbe299962364cf3c5255e9c8d287d_3" -> "std::__1::shared_ptr<int>_model_set(_ZNSt3__110shared_ptrIiE9model_setEPPKvS3_).c02dbe299962364cf3c5255e9c8d287d_2" ;
"std::__1::shared_ptr<int>_shared_ptr{_ZNSt3__110shared_ptrIiEC1Ev|constexpr}.be99763d4002918a1c3f3b37430d6542_1" [label="1: Start std::__1::shared_ptr<int>_shared_ptr\nFormals: this:int**\nLocals: \n DECLARE_LOCALS(&return); [line 84]\n " color=yellow style=filled]
"std::__1::shared_ptr<int>_model_set(_ZNSt3__110shared_ptrIiE9model_setEPPKvDn).603a5b50e9cb50a015cb89275a6b4a02_3" -> "std::__1::shared_ptr<int>_model_set(_ZNSt3__110shared_ptrIiE9model_setEPPKvDn).603a5b50e9cb50a015cb89275a6b4a02_2" ;
"std::__1::shared_ptr<int>_model_set(_ZNSt3__110shared_ptrIiE9model_setEPPKvPv).f20560d1c1b5289ad1a513e8f9e363c5_1" [label="1: Start std::__1::shared_ptr<int>_model_set\nFormals: self:void** value:void*\nLocals: \n DECLARE_LOCALS(&return); [line 65]\n " color=yellow style=filled]
"std::__1::shared_ptr<int>_model_set(_ZNSt3__110shared_ptrIiE9model_setEPPKvPv).f20560d1c1b5289ad1a513e8f9e363c5_1" -> "std::__1::shared_ptr<int>_model_set(_ZNSt3__110shared_ptrIiE9model_setEPPKvPv).f20560d1c1b5289ad1a513e8f9e363c5_3" ;
"std::__1::shared_ptr<int>_model_set(_ZNSt3__110shared_ptrIiE9model_setEPPKvPv).f20560d1c1b5289ad1a513e8f9e363c5_2" [label="2: Exit std::__1::shared_ptr<int>_model_set \n " color=yellow style=filled]
"std::__1::shared_ptr<int>_model_set(_ZNSt3__110shared_ptrIiE9model_setEPPKvPv).f20560d1c1b5289ad1a513e8f9e363c5_3" [label="3: BinaryOperatorStmt: Assign \n n$0=*&self:void** [line 66]\n n$1=*&value:void* [line 66]\n *n$0:void*=n$1 [line 66]\n " shape="box"]
"std::__1::shared_ptr<int>_model_set(_ZNSt3__110shared_ptrIiE9model_setEPPKvPv).f20560d1c1b5289ad1a513e8f9e363c5_3" -> "std::__1::shared_ptr<int>_model_set(_ZNSt3__110shared_ptrIiE9model_setEPPKvPv).f20560d1c1b5289ad1a513e8f9e363c5_2" ;
"std::__1::shared_ptr<int>_shared_ptr{_ZNSt3__110shared_ptrIiEC1Ev|constexpr}.be99763d4002918a1c3f3b37430d6542_1" [label="1: Start std::__1::shared_ptr<int>_shared_ptr\nFormals: this:int**\nLocals: \n DECLARE_LOCALS(&return); [line 99]\n " color=yellow style=filled]
"std::__1::shared_ptr<int>_shared_ptr{_ZNSt3__110shared_ptrIiEC1Ev|constexpr}.be99763d4002918a1c3f3b37430d6542_1" -> "std::__1::shared_ptr<int>_shared_ptr{_ZNSt3__110shared_ptrIiEC1Ev|constexpr}.be99763d4002918a1c3f3b37430d6542_4" ;
"std::__1::shared_ptr<int>_shared_ptr{_ZNSt3__110shared_ptrIiEC1Ev|constexpr}.be99763d4002918a1c3f3b37430d6542_2" [label="2: Exit std::__1::shared_ptr<int>_shared_ptr \n " color=yellow style=filled]
"std::__1::shared_ptr<int>_shared_ptr{_ZNSt3__110shared_ptrIiEC1Ev|constexpr}.be99763d4002918a1c3f3b37430d6542_3" [label="3: Call _fun_std::__1::shared_ptr<int>_model_set \n n$0=*&this:int** [line 85]\n _fun_std::__1::shared_ptr<int>_model_set(n$0:void**,null:void*) [line 85]\n " shape="box"]
"std::__1::shared_ptr<int>_shared_ptr{_ZNSt3__110shared_ptrIiEC1Ev|constexpr}.be99763d4002918a1c3f3b37430d6542_3" [label="3: Call _fun_std::__1::shared_ptr<int>_model_set \n n$0=*&this:int** [line 100]\n _fun_std::__1::shared_ptr<int>_model_set(n$0:void**,null:int) [line 100]\n " shape="box"]
"std::__1::shared_ptr<int>_shared_ptr{_ZNSt3__110shared_ptrIiEC1Ev|constexpr}.be99763d4002918a1c3f3b37430d6542_3" -> "std::__1::shared_ptr<int>_shared_ptr{_ZNSt3__110shared_ptrIiEC1Ev|constexpr}.be99763d4002918a1c3f3b37430d6542_2" ;
"std::__1::shared_ptr<int>_shared_ptr{_ZNSt3__110shared_ptrIiEC1Ev|constexpr}.be99763d4002918a1c3f3b37430d6542_4" [label="4: Constructor Init \n n$1=*&this:int** [line 85]\n _fun_std::__1::std__shared_ptr<int>_std__shared_ptr(n$1:int**) [line 84]\n n$2=*n$1:int* [line 84]\n " shape="box"]
"std::__1::shared_ptr<int>_shared_ptr{_ZNSt3__110shared_ptrIiEC1Ev|constexpr}.be99763d4002918a1c3f3b37430d6542_4" [label="4: Constructor Init \n n$1=*&this:int** [line 100]\n _fun_std::__1::std__shared_ptr<int>_std__shared_ptr(n$1:int**) [line 99]\n n$2=*n$1:int* [line 99]\n " shape="box"]
"std::__1::shared_ptr<int>_shared_ptr{_ZNSt3__110shared_ptrIiEC1Ev|constexpr}.be99763d4002918a1c3f3b37430d6542_4" -> "std::__1::shared_ptr<int>_shared_ptr{_ZNSt3__110shared_ptrIiEC1Ev|constexpr}.be99763d4002918a1c3f3b37430d6542_3" ;
"std::__1::shared_ptr<int>_~shared_ptr(_ZNSt3__110shared_ptrIiED0Ev).388e7f06faa2f498fd08f3d3c50ca31a_1" [label="1: Start std::__1::shared_ptr<int>_~shared_ptr\nFormals: this:int**\nLocals: \n DECLARE_LOCALS(&return); [line 165]\n " color=yellow style=filled]
"std::__1::shared_ptr<int>_~shared_ptr(_ZNSt3__110shared_ptrIiED0Ev).388e7f06faa2f498fd08f3d3c50ca31a_1" [label="1: Start std::__1::shared_ptr<int>_~shared_ptr\nFormals: this:int**\nLocals: \n DECLARE_LOCALS(&return); [line 180]\n " color=yellow style=filled]
"std::__1::shared_ptr<int>_~shared_ptr(_ZNSt3__110shared_ptrIiED0Ev).388e7f06faa2f498fd08f3d3c50ca31a_1" -> "std::__1::shared_ptr<int>_~shared_ptr(_ZNSt3__110shared_ptrIiED0Ev).388e7f06faa2f498fd08f3d3c50ca31a_3" ;
"std::__1::shared_ptr<int>_~shared_ptr(_ZNSt3__110shared_ptrIiED0Ev).388e7f06faa2f498fd08f3d3c50ca31a_2" [label="2: Exit std::__1::shared_ptr<int>_~shared_ptr \n " color=yellow style=filled]
"std::__1::shared_ptr<int>_~shared_ptr(_ZNSt3__110shared_ptrIiED0Ev).388e7f06faa2f498fd08f3d3c50ca31a_3" [label="3: Call _fun_std::__1::shared_ptr<int>_reset<int,_void> \n n$0=*&this:int** [line 165]\n _=*n$0:int* [line 165]\n _fun_std::__1::shared_ptr<int>_reset<int,_void>(n$0:int**,null:int*) [line 165]\n " shape="box"]
"std::__1::shared_ptr<int>_~shared_ptr(_ZNSt3__110shared_ptrIiED0Ev).388e7f06faa2f498fd08f3d3c50ca31a_3" [label="3: Call _fun_std::__1::shared_ptr<int>_reset<int,_void> \n n$0=*&this:int** [line 180]\n _=*n$0:int* [line 180]\n _fun_std::__1::shared_ptr<int>_reset<int,_void>(n$0:int**,null:int*) [line 180]\n " shape="box"]
"std::__1::shared_ptr<int>_~shared_ptr(_ZNSt3__110shared_ptrIiED0Ev).388e7f06faa2f498fd08f3d3c50ca31a_3" -> "std::__1::shared_ptr<int>_~shared_ptr(_ZNSt3__110shared_ptrIiED0Ev).388e7f06faa2f498fd08f3d3c50ca31a_2" ;
"std::__1::shared_ptr<int>_reset<int,_void>(_ZNSt3__110shared_ptrIiE5resetIivEEvPT_).29e462552cba695192437aa4bfbf146e_1" [label="1: Start std::__1::shared_ptr<int>_reset<int,_void>\nFormals: this:int** p:int*\nLocals: \n DECLARE_LOCALS(&return); [line 217]\n " color=yellow style=filled]
"std::__1::shared_ptr<int>_reset<int,_void>(_ZNSt3__110shared_ptrIiE5resetIivEEvPT_).29e462552cba695192437aa4bfbf146e_1" [label="1: Start std::__1::shared_ptr<int>_reset<int,_void>\nFormals: this:int** p:int*\nLocals: \n DECLARE_LOCALS(&return); [line 232]\n " color=yellow style=filled]
"std::__1::shared_ptr<int>_reset<int,_void>(_ZNSt3__110shared_ptrIiE5resetIivEEvPT_).29e462552cba695192437aa4bfbf146e_1" -> "std::__1::shared_ptr<int>_reset<int,_void>(_ZNSt3__110shared_ptrIiE5resetIivEEvPT_).29e462552cba695192437aa4bfbf146e_3" ;
"std::__1::shared_ptr<int>_reset<int,_void>(_ZNSt3__110shared_ptrIiE5resetIivEEvPT_).29e462552cba695192437aa4bfbf146e_2" [label="2: Exit std::__1::shared_ptr<int>_reset<int,_void> \n " color=yellow style=filled]
"std::__1::shared_ptr<int>_reset<int,_void>(_ZNSt3__110shared_ptrIiE5resetIivEEvPT_).29e462552cba695192437aa4bfbf146e_3" [label="3: Call _fun_std::__1::shared_ptr<int>_model_set \n n$0=*&this:int** [line 223]\n n$1=*&p:int* [line 223]\n _fun_std::__1::shared_ptr<int>_model_set(n$0:void**,n$1:void*) [line 223]\n " shape="box"]
"std::__1::shared_ptr<int>_reset<int,_void>(_ZNSt3__110shared_ptrIiE5resetIivEEvPT_).29e462552cba695192437aa4bfbf146e_3" [label="3: Call _fun_std::__1::shared_ptr<int>_model_set \n n$0=*&this:int** [line 238]\n n$1=*&p:int* [line 238]\n _fun_std::__1::shared_ptr<int>_model_set(n$0:void**,n$1:void*) [line 238]\n " shape="box"]
"std::__1::shared_ptr<int>_reset<int,_void>(_ZNSt3__110shared_ptrIiE5resetIivEEvPT_).29e462552cba695192437aa4bfbf146e_3" -> "std::__1::shared_ptr<int>_reset<int,_void>(_ZNSt3__110shared_ptrIiE5resetIivEEvPT_).29e462552cba695192437aa4bfbf146e_2" ;

@ -64,51 +64,62 @@ digraph iCFG {
"unused_deref_in_header{d41d8cd98f00b204e9800998ecf8427e_Z22unused_deref_in_headerPi}.78f023ac84a54d52e15a570dccffee2c_4" -> "unused_deref_in_header{d41d8cd98f00b204e9800998ecf8427e_Z22unused_deref_in_headerPi}.78f023ac84a54d52e15a570dccffee2c_3" ;
"std::__1::shared_ptr<int>_model_set(_ZNSt3__110shared_ptrIiE9model_setEPPKvS3_).c02dbe299962364cf3c5255e9c8d287d_1" [label="1: Start std::__1::shared_ptr<int>_model_set\nFormals: self:void** value:void*\nLocals: \n DECLARE_LOCALS(&return); [line 50]\n " color=yellow style=filled]
"std::__1::shared_ptr<int>_model_set(_ZNSt3__110shared_ptrIiE9model_setEPPKvDn).603a5b50e9cb50a015cb89275a6b4a02_1" [label="1: Start std::__1::shared_ptr<int>_model_set\nFormals: self:void** value:int\nLocals: \n DECLARE_LOCALS(&return); [line 53]\n " color=yellow style=filled]
"std::__1::shared_ptr<int>_model_set(_ZNSt3__110shared_ptrIiE9model_setEPPKvS3_).c02dbe299962364cf3c5255e9c8d287d_1" -> "std::__1::shared_ptr<int>_model_set(_ZNSt3__110shared_ptrIiE9model_setEPPKvS3_).c02dbe299962364cf3c5255e9c8d287d_3" ;
"std::__1::shared_ptr<int>_model_set(_ZNSt3__110shared_ptrIiE9model_setEPPKvS3_).c02dbe299962364cf3c5255e9c8d287d_2" [label="2: Exit std::__1::shared_ptr<int>_model_set \n " color=yellow style=filled]
"std::__1::shared_ptr<int>_model_set(_ZNSt3__110shared_ptrIiE9model_setEPPKvDn).603a5b50e9cb50a015cb89275a6b4a02_1" -> "std::__1::shared_ptr<int>_model_set(_ZNSt3__110shared_ptrIiE9model_setEPPKvDn).603a5b50e9cb50a015cb89275a6b4a02_3" ;
"std::__1::shared_ptr<int>_model_set(_ZNSt3__110shared_ptrIiE9model_setEPPKvDn).603a5b50e9cb50a015cb89275a6b4a02_2" [label="2: Exit std::__1::shared_ptr<int>_model_set \n " color=yellow style=filled]
"std::__1::shared_ptr<int>_model_set(_ZNSt3__110shared_ptrIiE9model_setEPPKvS3_).c02dbe299962364cf3c5255e9c8d287d_3" [label="3: BinaryOperatorStmt: Assign \n n$0=*&self:void** [line 51]\n n$1=*&value:void* [line 51]\n *n$0:void*=n$1 [line 51]\n " shape="box"]
"std::__1::shared_ptr<int>_model_set(_ZNSt3__110shared_ptrIiE9model_setEPPKvDn).603a5b50e9cb50a015cb89275a6b4a02_3" [label="3: BinaryOperatorStmt: Assign \n n$0=*&self:void** [line 54]\n n$1=*&value:int [line 54]\n *n$0:void*=n$1 [line 54]\n " shape="box"]
"std::__1::shared_ptr<int>_model_set(_ZNSt3__110shared_ptrIiE9model_setEPPKvS3_).c02dbe299962364cf3c5255e9c8d287d_3" -> "std::__1::shared_ptr<int>_model_set(_ZNSt3__110shared_ptrIiE9model_setEPPKvS3_).c02dbe299962364cf3c5255e9c8d287d_2" ;
"std::__1::shared_ptr<int>_shared_ptr{_ZNSt3__110shared_ptrIiEC1Ev|constexpr}.be99763d4002918a1c3f3b37430d6542_1" [label="1: Start std::__1::shared_ptr<int>_shared_ptr\nFormals: this:int**\nLocals: \n DECLARE_LOCALS(&return); [line 84]\n " color=yellow style=filled]
"std::__1::shared_ptr<int>_model_set(_ZNSt3__110shared_ptrIiE9model_setEPPKvDn).603a5b50e9cb50a015cb89275a6b4a02_3" -> "std::__1::shared_ptr<int>_model_set(_ZNSt3__110shared_ptrIiE9model_setEPPKvDn).603a5b50e9cb50a015cb89275a6b4a02_2" ;
"std::__1::shared_ptr<int>_model_set(_ZNSt3__110shared_ptrIiE9model_setEPPKvPv).f20560d1c1b5289ad1a513e8f9e363c5_1" [label="1: Start std::__1::shared_ptr<int>_model_set\nFormals: self:void** value:void*\nLocals: \n DECLARE_LOCALS(&return); [line 65]\n " color=yellow style=filled]
"std::__1::shared_ptr<int>_model_set(_ZNSt3__110shared_ptrIiE9model_setEPPKvPv).f20560d1c1b5289ad1a513e8f9e363c5_1" -> "std::__1::shared_ptr<int>_model_set(_ZNSt3__110shared_ptrIiE9model_setEPPKvPv).f20560d1c1b5289ad1a513e8f9e363c5_3" ;
"std::__1::shared_ptr<int>_model_set(_ZNSt3__110shared_ptrIiE9model_setEPPKvPv).f20560d1c1b5289ad1a513e8f9e363c5_2" [label="2: Exit std::__1::shared_ptr<int>_model_set \n " color=yellow style=filled]
"std::__1::shared_ptr<int>_model_set(_ZNSt3__110shared_ptrIiE9model_setEPPKvPv).f20560d1c1b5289ad1a513e8f9e363c5_3" [label="3: BinaryOperatorStmt: Assign \n n$0=*&self:void** [line 66]\n n$1=*&value:void* [line 66]\n *n$0:void*=n$1 [line 66]\n " shape="box"]
"std::__1::shared_ptr<int>_model_set(_ZNSt3__110shared_ptrIiE9model_setEPPKvPv).f20560d1c1b5289ad1a513e8f9e363c5_3" -> "std::__1::shared_ptr<int>_model_set(_ZNSt3__110shared_ptrIiE9model_setEPPKvPv).f20560d1c1b5289ad1a513e8f9e363c5_2" ;
"std::__1::shared_ptr<int>_shared_ptr{_ZNSt3__110shared_ptrIiEC1Ev|constexpr}.be99763d4002918a1c3f3b37430d6542_1" [label="1: Start std::__1::shared_ptr<int>_shared_ptr\nFormals: this:int**\nLocals: \n DECLARE_LOCALS(&return); [line 99]\n " color=yellow style=filled]
"std::__1::shared_ptr<int>_shared_ptr{_ZNSt3__110shared_ptrIiEC1Ev|constexpr}.be99763d4002918a1c3f3b37430d6542_1" -> "std::__1::shared_ptr<int>_shared_ptr{_ZNSt3__110shared_ptrIiEC1Ev|constexpr}.be99763d4002918a1c3f3b37430d6542_4" ;
"std::__1::shared_ptr<int>_shared_ptr{_ZNSt3__110shared_ptrIiEC1Ev|constexpr}.be99763d4002918a1c3f3b37430d6542_2" [label="2: Exit std::__1::shared_ptr<int>_shared_ptr \n " color=yellow style=filled]
"std::__1::shared_ptr<int>_shared_ptr{_ZNSt3__110shared_ptrIiEC1Ev|constexpr}.be99763d4002918a1c3f3b37430d6542_3" [label="3: Call _fun_std::__1::shared_ptr<int>_model_set \n n$0=*&this:int** [line 85]\n _fun_std::__1::shared_ptr<int>_model_set(n$0:void**,null:void*) [line 85]\n " shape="box"]
"std::__1::shared_ptr<int>_shared_ptr{_ZNSt3__110shared_ptrIiEC1Ev|constexpr}.be99763d4002918a1c3f3b37430d6542_3" [label="3: Call _fun_std::__1::shared_ptr<int>_model_set \n n$0=*&this:int** [line 100]\n _fun_std::__1::shared_ptr<int>_model_set(n$0:void**,null:int) [line 100]\n " shape="box"]
"std::__1::shared_ptr<int>_shared_ptr{_ZNSt3__110shared_ptrIiEC1Ev|constexpr}.be99763d4002918a1c3f3b37430d6542_3" -> "std::__1::shared_ptr<int>_shared_ptr{_ZNSt3__110shared_ptrIiEC1Ev|constexpr}.be99763d4002918a1c3f3b37430d6542_2" ;
"std::__1::shared_ptr<int>_shared_ptr{_ZNSt3__110shared_ptrIiEC1Ev|constexpr}.be99763d4002918a1c3f3b37430d6542_4" [label="4: Constructor Init \n n$1=*&this:int** [line 85]\n _fun_std::__1::std__shared_ptr<int>_std__shared_ptr(n$1:int**) [line 84]\n n$2=*n$1:int* [line 84]\n " shape="box"]
"std::__1::shared_ptr<int>_shared_ptr{_ZNSt3__110shared_ptrIiEC1Ev|constexpr}.be99763d4002918a1c3f3b37430d6542_4" [label="4: Constructor Init \n n$1=*&this:int** [line 100]\n _fun_std::__1::std__shared_ptr<int>_std__shared_ptr(n$1:int**) [line 99]\n n$2=*n$1:int* [line 99]\n " shape="box"]
"std::__1::shared_ptr<int>_shared_ptr{_ZNSt3__110shared_ptrIiEC1Ev|constexpr}.be99763d4002918a1c3f3b37430d6542_4" -> "std::__1::shared_ptr<int>_shared_ptr{_ZNSt3__110shared_ptrIiEC1Ev|constexpr}.be99763d4002918a1c3f3b37430d6542_3" ;
"std::__1::shared_ptr<int>_~shared_ptr(_ZNSt3__110shared_ptrIiED0Ev).388e7f06faa2f498fd08f3d3c50ca31a_1" [label="1: Start std::__1::shared_ptr<int>_~shared_ptr\nFormals: this:int**\nLocals: \n DECLARE_LOCALS(&return); [line 165]\n " color=yellow style=filled]
"std::__1::shared_ptr<int>_~shared_ptr(_ZNSt3__110shared_ptrIiED0Ev).388e7f06faa2f498fd08f3d3c50ca31a_1" [label="1: Start std::__1::shared_ptr<int>_~shared_ptr\nFormals: this:int**\nLocals: \n DECLARE_LOCALS(&return); [line 180]\n " color=yellow style=filled]
"std::__1::shared_ptr<int>_~shared_ptr(_ZNSt3__110shared_ptrIiED0Ev).388e7f06faa2f498fd08f3d3c50ca31a_1" -> "std::__1::shared_ptr<int>_~shared_ptr(_ZNSt3__110shared_ptrIiED0Ev).388e7f06faa2f498fd08f3d3c50ca31a_3" ;
"std::__1::shared_ptr<int>_~shared_ptr(_ZNSt3__110shared_ptrIiED0Ev).388e7f06faa2f498fd08f3d3c50ca31a_2" [label="2: Exit std::__1::shared_ptr<int>_~shared_ptr \n " color=yellow style=filled]
"std::__1::shared_ptr<int>_~shared_ptr(_ZNSt3__110shared_ptrIiED0Ev).388e7f06faa2f498fd08f3d3c50ca31a_3" [label="3: Call _fun_std::__1::shared_ptr<int>_reset<int,_void> \n n$0=*&this:int** [line 165]\n _=*n$0:int* [line 165]\n _fun_std::__1::shared_ptr<int>_reset<int,_void>(n$0:int**,null:int*) [line 165]\n " shape="box"]
"std::__1::shared_ptr<int>_~shared_ptr(_ZNSt3__110shared_ptrIiED0Ev).388e7f06faa2f498fd08f3d3c50ca31a_3" [label="3: Call _fun_std::__1::shared_ptr<int>_reset<int,_void> \n n$0=*&this:int** [line 180]\n _=*n$0:int* [line 180]\n _fun_std::__1::shared_ptr<int>_reset<int,_void>(n$0:int**,null:int*) [line 180]\n " shape="box"]
"std::__1::shared_ptr<int>_~shared_ptr(_ZNSt3__110shared_ptrIiED0Ev).388e7f06faa2f498fd08f3d3c50ca31a_3" -> "std::__1::shared_ptr<int>_~shared_ptr(_ZNSt3__110shared_ptrIiED0Ev).388e7f06faa2f498fd08f3d3c50ca31a_2" ;
"std::__1::shared_ptr<int>_reset<int,_void>(_ZNSt3__110shared_ptrIiE5resetIivEEvPT_).29e462552cba695192437aa4bfbf146e_1" [label="1: Start std::__1::shared_ptr<int>_reset<int,_void>\nFormals: this:int** p:int*\nLocals: \n DECLARE_LOCALS(&return); [line 217]\n " color=yellow style=filled]
"std::__1::shared_ptr<int>_reset<int,_void>(_ZNSt3__110shared_ptrIiE5resetIivEEvPT_).29e462552cba695192437aa4bfbf146e_1" [label="1: Start std::__1::shared_ptr<int>_reset<int,_void>\nFormals: this:int** p:int*\nLocals: \n DECLARE_LOCALS(&return); [line 232]\n " color=yellow style=filled]
"std::__1::shared_ptr<int>_reset<int,_void>(_ZNSt3__110shared_ptrIiE5resetIivEEvPT_).29e462552cba695192437aa4bfbf146e_1" -> "std::__1::shared_ptr<int>_reset<int,_void>(_ZNSt3__110shared_ptrIiE5resetIivEEvPT_).29e462552cba695192437aa4bfbf146e_3" ;
"std::__1::shared_ptr<int>_reset<int,_void>(_ZNSt3__110shared_ptrIiE5resetIivEEvPT_).29e462552cba695192437aa4bfbf146e_2" [label="2: Exit std::__1::shared_ptr<int>_reset<int,_void> \n " color=yellow style=filled]
"std::__1::shared_ptr<int>_reset<int,_void>(_ZNSt3__110shared_ptrIiE5resetIivEEvPT_).29e462552cba695192437aa4bfbf146e_3" [label="3: Call _fun_std::__1::shared_ptr<int>_model_set \n n$0=*&this:int** [line 223]\n n$1=*&p:int* [line 223]\n _fun_std::__1::shared_ptr<int>_model_set(n$0:void**,n$1:void*) [line 223]\n " shape="box"]
"std::__1::shared_ptr<int>_reset<int,_void>(_ZNSt3__110shared_ptrIiE5resetIivEEvPT_).29e462552cba695192437aa4bfbf146e_3" [label="3: Call _fun_std::__1::shared_ptr<int>_model_set \n n$0=*&this:int** [line 238]\n n$1=*&p:int* [line 238]\n _fun_std::__1::shared_ptr<int>_model_set(n$0:void**,n$1:void*) [line 238]\n " shape="box"]
"std::__1::shared_ptr<int>_reset<int,_void>(_ZNSt3__110shared_ptrIiE5resetIivEEvPT_).29e462552cba695192437aa4bfbf146e_3" -> "std::__1::shared_ptr<int>_reset<int,_void>(_ZNSt3__110shared_ptrIiE5resetIivEEvPT_).29e462552cba695192437aa4bfbf146e_2" ;

@ -64,51 +64,62 @@ digraph iCFG {
"unused_deref_in_header{d41d8cd98f00b204e9800998ecf8427e_Z22unused_deref_in_headerPi}.78f023ac84a54d52e15a570dccffee2c_4" -> "unused_deref_in_header{d41d8cd98f00b204e9800998ecf8427e_Z22unused_deref_in_headerPi}.78f023ac84a54d52e15a570dccffee2c_3" ;
"std::__1::shared_ptr<int>_model_set(_ZNSt3__110shared_ptrIiE9model_setEPPKvS3_).c02dbe299962364cf3c5255e9c8d287d_1" [label="1: Start std::__1::shared_ptr<int>_model_set\nFormals: self:void** value:void*\nLocals: \n DECLARE_LOCALS(&return); [line 50]\n " color=yellow style=filled]
"std::__1::shared_ptr<int>_model_set(_ZNSt3__110shared_ptrIiE9model_setEPPKvDn).603a5b50e9cb50a015cb89275a6b4a02_1" [label="1: Start std::__1::shared_ptr<int>_model_set\nFormals: self:void** value:int\nLocals: \n DECLARE_LOCALS(&return); [line 53]\n " color=yellow style=filled]
"std::__1::shared_ptr<int>_model_set(_ZNSt3__110shared_ptrIiE9model_setEPPKvS3_).c02dbe299962364cf3c5255e9c8d287d_1" -> "std::__1::shared_ptr<int>_model_set(_ZNSt3__110shared_ptrIiE9model_setEPPKvS3_).c02dbe299962364cf3c5255e9c8d287d_3" ;
"std::__1::shared_ptr<int>_model_set(_ZNSt3__110shared_ptrIiE9model_setEPPKvS3_).c02dbe299962364cf3c5255e9c8d287d_2" [label="2: Exit std::__1::shared_ptr<int>_model_set \n " color=yellow style=filled]
"std::__1::shared_ptr<int>_model_set(_ZNSt3__110shared_ptrIiE9model_setEPPKvDn).603a5b50e9cb50a015cb89275a6b4a02_1" -> "std::__1::shared_ptr<int>_model_set(_ZNSt3__110shared_ptrIiE9model_setEPPKvDn).603a5b50e9cb50a015cb89275a6b4a02_3" ;
"std::__1::shared_ptr<int>_model_set(_ZNSt3__110shared_ptrIiE9model_setEPPKvDn).603a5b50e9cb50a015cb89275a6b4a02_2" [label="2: Exit std::__1::shared_ptr<int>_model_set \n " color=yellow style=filled]
"std::__1::shared_ptr<int>_model_set(_ZNSt3__110shared_ptrIiE9model_setEPPKvS3_).c02dbe299962364cf3c5255e9c8d287d_3" [label="3: BinaryOperatorStmt: Assign \n n$0=*&self:void** [line 51]\n n$1=*&value:void* [line 51]\n *n$0:void*=n$1 [line 51]\n " shape="box"]
"std::__1::shared_ptr<int>_model_set(_ZNSt3__110shared_ptrIiE9model_setEPPKvDn).603a5b50e9cb50a015cb89275a6b4a02_3" [label="3: BinaryOperatorStmt: Assign \n n$0=*&self:void** [line 54]\n n$1=*&value:int [line 54]\n *n$0:void*=n$1 [line 54]\n " shape="box"]
"std::__1::shared_ptr<int>_model_set(_ZNSt3__110shared_ptrIiE9model_setEPPKvS3_).c02dbe299962364cf3c5255e9c8d287d_3" -> "std::__1::shared_ptr<int>_model_set(_ZNSt3__110shared_ptrIiE9model_setEPPKvS3_).c02dbe299962364cf3c5255e9c8d287d_2" ;
"std::__1::shared_ptr<int>_shared_ptr{_ZNSt3__110shared_ptrIiEC1Ev|constexpr}.be99763d4002918a1c3f3b37430d6542_1" [label="1: Start std::__1::shared_ptr<int>_shared_ptr\nFormals: this:int**\nLocals: \n DECLARE_LOCALS(&return); [line 84]\n " color=yellow style=filled]
"std::__1::shared_ptr<int>_model_set(_ZNSt3__110shared_ptrIiE9model_setEPPKvDn).603a5b50e9cb50a015cb89275a6b4a02_3" -> "std::__1::shared_ptr<int>_model_set(_ZNSt3__110shared_ptrIiE9model_setEPPKvDn).603a5b50e9cb50a015cb89275a6b4a02_2" ;
"std::__1::shared_ptr<int>_model_set(_ZNSt3__110shared_ptrIiE9model_setEPPKvPv).f20560d1c1b5289ad1a513e8f9e363c5_1" [label="1: Start std::__1::shared_ptr<int>_model_set\nFormals: self:void** value:void*\nLocals: \n DECLARE_LOCALS(&return); [line 65]\n " color=yellow style=filled]
"std::__1::shared_ptr<int>_model_set(_ZNSt3__110shared_ptrIiE9model_setEPPKvPv).f20560d1c1b5289ad1a513e8f9e363c5_1" -> "std::__1::shared_ptr<int>_model_set(_ZNSt3__110shared_ptrIiE9model_setEPPKvPv).f20560d1c1b5289ad1a513e8f9e363c5_3" ;
"std::__1::shared_ptr<int>_model_set(_ZNSt3__110shared_ptrIiE9model_setEPPKvPv).f20560d1c1b5289ad1a513e8f9e363c5_2" [label="2: Exit std::__1::shared_ptr<int>_model_set \n " color=yellow style=filled]
"std::__1::shared_ptr<int>_model_set(_ZNSt3__110shared_ptrIiE9model_setEPPKvPv).f20560d1c1b5289ad1a513e8f9e363c5_3" [label="3: BinaryOperatorStmt: Assign \n n$0=*&self:void** [line 66]\n n$1=*&value:void* [line 66]\n *n$0:void*=n$1 [line 66]\n " shape="box"]
"std::__1::shared_ptr<int>_model_set(_ZNSt3__110shared_ptrIiE9model_setEPPKvPv).f20560d1c1b5289ad1a513e8f9e363c5_3" -> "std::__1::shared_ptr<int>_model_set(_ZNSt3__110shared_ptrIiE9model_setEPPKvPv).f20560d1c1b5289ad1a513e8f9e363c5_2" ;
"std::__1::shared_ptr<int>_shared_ptr{_ZNSt3__110shared_ptrIiEC1Ev|constexpr}.be99763d4002918a1c3f3b37430d6542_1" [label="1: Start std::__1::shared_ptr<int>_shared_ptr\nFormals: this:int**\nLocals: \n DECLARE_LOCALS(&return); [line 99]\n " color=yellow style=filled]
"std::__1::shared_ptr<int>_shared_ptr{_ZNSt3__110shared_ptrIiEC1Ev|constexpr}.be99763d4002918a1c3f3b37430d6542_1" -> "std::__1::shared_ptr<int>_shared_ptr{_ZNSt3__110shared_ptrIiEC1Ev|constexpr}.be99763d4002918a1c3f3b37430d6542_4" ;
"std::__1::shared_ptr<int>_shared_ptr{_ZNSt3__110shared_ptrIiEC1Ev|constexpr}.be99763d4002918a1c3f3b37430d6542_2" [label="2: Exit std::__1::shared_ptr<int>_shared_ptr \n " color=yellow style=filled]
"std::__1::shared_ptr<int>_shared_ptr{_ZNSt3__110shared_ptrIiEC1Ev|constexpr}.be99763d4002918a1c3f3b37430d6542_3" [label="3: Call _fun_std::__1::shared_ptr<int>_model_set \n n$0=*&this:int** [line 85]\n _fun_std::__1::shared_ptr<int>_model_set(n$0:void**,null:void*) [line 85]\n " shape="box"]
"std::__1::shared_ptr<int>_shared_ptr{_ZNSt3__110shared_ptrIiEC1Ev|constexpr}.be99763d4002918a1c3f3b37430d6542_3" [label="3: Call _fun_std::__1::shared_ptr<int>_model_set \n n$0=*&this:int** [line 100]\n _fun_std::__1::shared_ptr<int>_model_set(n$0:void**,null:int) [line 100]\n " shape="box"]
"std::__1::shared_ptr<int>_shared_ptr{_ZNSt3__110shared_ptrIiEC1Ev|constexpr}.be99763d4002918a1c3f3b37430d6542_3" -> "std::__1::shared_ptr<int>_shared_ptr{_ZNSt3__110shared_ptrIiEC1Ev|constexpr}.be99763d4002918a1c3f3b37430d6542_2" ;
"std::__1::shared_ptr<int>_shared_ptr{_ZNSt3__110shared_ptrIiEC1Ev|constexpr}.be99763d4002918a1c3f3b37430d6542_4" [label="4: Constructor Init \n n$1=*&this:int** [line 85]\n _fun_std::__1::std__shared_ptr<int>_std__shared_ptr(n$1:int**) [line 84]\n n$2=*n$1:int* [line 84]\n " shape="box"]
"std::__1::shared_ptr<int>_shared_ptr{_ZNSt3__110shared_ptrIiEC1Ev|constexpr}.be99763d4002918a1c3f3b37430d6542_4" [label="4: Constructor Init \n n$1=*&this:int** [line 100]\n _fun_std::__1::std__shared_ptr<int>_std__shared_ptr(n$1:int**) [line 99]\n n$2=*n$1:int* [line 99]\n " shape="box"]
"std::__1::shared_ptr<int>_shared_ptr{_ZNSt3__110shared_ptrIiEC1Ev|constexpr}.be99763d4002918a1c3f3b37430d6542_4" -> "std::__1::shared_ptr<int>_shared_ptr{_ZNSt3__110shared_ptrIiEC1Ev|constexpr}.be99763d4002918a1c3f3b37430d6542_3" ;
"std::__1::shared_ptr<int>_~shared_ptr(_ZNSt3__110shared_ptrIiED0Ev).388e7f06faa2f498fd08f3d3c50ca31a_1" [label="1: Start std::__1::shared_ptr<int>_~shared_ptr\nFormals: this:int**\nLocals: \n DECLARE_LOCALS(&return); [line 165]\n " color=yellow style=filled]
"std::__1::shared_ptr<int>_~shared_ptr(_ZNSt3__110shared_ptrIiED0Ev).388e7f06faa2f498fd08f3d3c50ca31a_1" [label="1: Start std::__1::shared_ptr<int>_~shared_ptr\nFormals: this:int**\nLocals: \n DECLARE_LOCALS(&return); [line 180]\n " color=yellow style=filled]
"std::__1::shared_ptr<int>_~shared_ptr(_ZNSt3__110shared_ptrIiED0Ev).388e7f06faa2f498fd08f3d3c50ca31a_1" -> "std::__1::shared_ptr<int>_~shared_ptr(_ZNSt3__110shared_ptrIiED0Ev).388e7f06faa2f498fd08f3d3c50ca31a_3" ;
"std::__1::shared_ptr<int>_~shared_ptr(_ZNSt3__110shared_ptrIiED0Ev).388e7f06faa2f498fd08f3d3c50ca31a_2" [label="2: Exit std::__1::shared_ptr<int>_~shared_ptr \n " color=yellow style=filled]
"std::__1::shared_ptr<int>_~shared_ptr(_ZNSt3__110shared_ptrIiED0Ev).388e7f06faa2f498fd08f3d3c50ca31a_3" [label="3: Call _fun_std::__1::shared_ptr<int>_reset<int,_void> \n n$0=*&this:int** [line 165]\n _=*n$0:int* [line 165]\n _fun_std::__1::shared_ptr<int>_reset<int,_void>(n$0:int**,null:int*) [line 165]\n " shape="box"]
"std::__1::shared_ptr<int>_~shared_ptr(_ZNSt3__110shared_ptrIiED0Ev).388e7f06faa2f498fd08f3d3c50ca31a_3" [label="3: Call _fun_std::__1::shared_ptr<int>_reset<int,_void> \n n$0=*&this:int** [line 180]\n _=*n$0:int* [line 180]\n _fun_std::__1::shared_ptr<int>_reset<int,_void>(n$0:int**,null:int*) [line 180]\n " shape="box"]
"std::__1::shared_ptr<int>_~shared_ptr(_ZNSt3__110shared_ptrIiED0Ev).388e7f06faa2f498fd08f3d3c50ca31a_3" -> "std::__1::shared_ptr<int>_~shared_ptr(_ZNSt3__110shared_ptrIiED0Ev).388e7f06faa2f498fd08f3d3c50ca31a_2" ;
"std::__1::shared_ptr<int>_reset<int,_void>(_ZNSt3__110shared_ptrIiE5resetIivEEvPT_).29e462552cba695192437aa4bfbf146e_1" [label="1: Start std::__1::shared_ptr<int>_reset<int,_void>\nFormals: this:int** p:int*\nLocals: \n DECLARE_LOCALS(&return); [line 217]\n " color=yellow style=filled]
"std::__1::shared_ptr<int>_reset<int,_void>(_ZNSt3__110shared_ptrIiE5resetIivEEvPT_).29e462552cba695192437aa4bfbf146e_1" [label="1: Start std::__1::shared_ptr<int>_reset<int,_void>\nFormals: this:int** p:int*\nLocals: \n DECLARE_LOCALS(&return); [line 232]\n " color=yellow style=filled]
"std::__1::shared_ptr<int>_reset<int,_void>(_ZNSt3__110shared_ptrIiE5resetIivEEvPT_).29e462552cba695192437aa4bfbf146e_1" -> "std::__1::shared_ptr<int>_reset<int,_void>(_ZNSt3__110shared_ptrIiE5resetIivEEvPT_).29e462552cba695192437aa4bfbf146e_3" ;
"std::__1::shared_ptr<int>_reset<int,_void>(_ZNSt3__110shared_ptrIiE5resetIivEEvPT_).29e462552cba695192437aa4bfbf146e_2" [label="2: Exit std::__1::shared_ptr<int>_reset<int,_void> \n " color=yellow style=filled]
"std::__1::shared_ptr<int>_reset<int,_void>(_ZNSt3__110shared_ptrIiE5resetIivEEvPT_).29e462552cba695192437aa4bfbf146e_3" [label="3: Call _fun_std::__1::shared_ptr<int>_model_set \n n$0=*&this:int** [line 223]\n n$1=*&p:int* [line 223]\n _fun_std::__1::shared_ptr<int>_model_set(n$0:void**,n$1:void*) [line 223]\n " shape="box"]
"std::__1::shared_ptr<int>_reset<int,_void>(_ZNSt3__110shared_ptrIiE5resetIivEEvPT_).29e462552cba695192437aa4bfbf146e_3" [label="3: Call _fun_std::__1::shared_ptr<int>_model_set \n n$0=*&this:int** [line 238]\n n$1=*&p:int* [line 238]\n _fun_std::__1::shared_ptr<int>_model_set(n$0:void**,n$1:void*) [line 238]\n " shape="box"]
"std::__1::shared_ptr<int>_reset<int,_void>(_ZNSt3__110shared_ptrIiE5resetIivEEvPT_).29e462552cba695192437aa4bfbf146e_3" -> "std::__1::shared_ptr<int>_reset<int,_void>(_ZNSt3__110shared_ptrIiE5resetIivEEvPT_).29e462552cba695192437aa4bfbf146e_2" ;

@ -40,6 +40,14 @@ codetoanalyze/cpp/errors/numeric/min_max.cpp, min_X_div0, 2, DIVIDE_BY_ZERO, [st
codetoanalyze/cpp/errors/numeric/min_max.cpp, min_int_div0, 0, DIVIDE_BY_ZERO, [start of procedure min_int_div0()]
codetoanalyze/cpp/errors/overwrite_attribute/main.cpp, testSetIntValue, 3, DIVIDE_BY_ZERO, [start of procedure testSetIntValue(),start of procedure setIntValue(),return from a call to setIntValue]
codetoanalyze/cpp/errors/resource_leaks/raii.cpp, resource_leak, 7, RESOURCE_LEAK, [start of procedure resource_leak(),Condition is false]
codetoanalyze/cpp/errors/smart_ptr/const_volatile_type.cpp, test_const1, 3, NULL_DEREFERENCE, [start of procedure test_const1()]
codetoanalyze/cpp/errors/smart_ptr/const_volatile_type.cpp, test_const2, 2, NULL_DEREFERENCE, [start of procedure test_const2()]
codetoanalyze/cpp/errors/smart_ptr/const_volatile_type.cpp, test_const3, 3, NULL_DEREFERENCE, [start of procedure test_const3()]
codetoanalyze/cpp/errors/smart_ptr/const_volatile_type.cpp, test_const4, 2, NULL_DEREFERENCE, [start of procedure test_const4()]
codetoanalyze/cpp/errors/smart_ptr/const_volatile_type.cpp, test_volatile1, 3, NULL_DEREFERENCE, [start of procedure test_volatile1()]
codetoanalyze/cpp/errors/smart_ptr/const_volatile_type.cpp, test_volatile2, 2, NULL_DEREFERENCE, [start of procedure test_volatile2()]
codetoanalyze/cpp/errors/smart_ptr/const_volatile_type.cpp, test_volatile3, 3, NULL_DEREFERENCE, [start of procedure test_volatile3()]
codetoanalyze/cpp/errors/smart_ptr/const_volatile_type.cpp, test_volatile4, 2, NULL_DEREFERENCE, [start of procedure test_volatile4()]
codetoanalyze/cpp/errors/smart_ptr/deref_after_move_example.cpp, deref_after_mode_example::deref_after_move_crash, 4, NULL_DEREFERENCE, [start of procedure deref_after_mode_example::deref_after_move_crash(),start of procedure Person,return from a call to deref_after_mode_example::Person_Person,start of procedure move_age,return from a call to deref_after_mode_example::Person_move_age,start of procedure access_age]
codetoanalyze/cpp/errors/smart_ptr/deref_after_move_example.cpp, deref_after_mode_example::deref_after_move_ok, 4, MEMORY_LEAK, [start of procedure deref_after_mode_example::deref_after_move_ok(),start of procedure Person,return from a call to deref_after_mode_example::Person_Person,start of procedure move_age,return from a call to deref_after_mode_example::Person_move_age,return from a call to deref_after_mode_example::deref_after_move_ok]
codetoanalyze/cpp/errors/smart_ptr/deref_after_move_example.cpp, deref_after_mode_example::deref_ok, 3, MEMORY_LEAK, [start of procedure deref_after_mode_example::deref_ok(),start of procedure Person,return from a call to deref_after_mode_example::Person_Person,start of procedure access_age,return from a call to deref_after_mode_example::Person_access_age,return from a call to deref_after_mode_example::deref_ok]

@ -0,0 +1,54 @@
/*
* Copyright (c) 2016 - 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.
*/
#include <memory>
int test_volatile1() {
std::unique_ptr<volatile int> x;
std::unique_ptr<volatile int> y = std::move(x);
return *y;
}
int test_volatile2() {
std::unique_ptr<volatile int> x;
return *x;
}
int test_volatile3() {
std::shared_ptr<volatile int> x;
std::shared_ptr<volatile int> y = std::move(x);
return *y;
}
int test_volatile4() {
std::shared_ptr<volatile int> x;
return *x;
}
int test_const1() {
std::unique_ptr<const int> x;
std::unique_ptr<const int> y = std::move(x);
return *y;
}
int test_const2() {
std::unique_ptr<const int> x;
return *x;
}
int test_const3() {
std::shared_ptr<const int> x;
std::shared_ptr<const int> y = std::move(x);
return *y;
}
int test_const4() {
std::shared_ptr<const int> x;
return *x;
}
Loading…
Cancel
Save