Summary: We inject destructor calls of base classes inside destructor bodies after the destructor calls of fields. Reviewed By: dulmarod Differential Revision: D5745499 fbshipit-source-id: 90745ecmaster
parent
5ee61a4019
commit
879891a3af
@ -0,0 +1,34 @@
|
||||
/*
|
||||
* 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.
|
||||
*/
|
||||
|
||||
struct A {
|
||||
A(){};
|
||||
~A(){};
|
||||
};
|
||||
|
||||
struct B : A {
|
||||
B(){};
|
||||
~B(){};
|
||||
};
|
||||
|
||||
struct C {
|
||||
C(){};
|
||||
~C(){};
|
||||
};
|
||||
|
||||
struct D : A, C {
|
||||
B b;
|
||||
D(){};
|
||||
~D() { A a; };
|
||||
};
|
||||
|
||||
struct E : B, C, D {
|
||||
E(){};
|
||||
~E(){};
|
||||
};
|
@ -0,0 +1,121 @@
|
||||
/* @generated */
|
||||
digraph iCFG {
|
||||
"A#A#{_ZN1AC1Ev}.2d3ff9efa1bcbece3182f08e3514d828_1" [label="1: Start A_A\nFormals: this:A*\nLocals: \n DECLARE_LOCALS(&return); [line 11]\n " color=yellow style=filled]
|
||||
|
||||
|
||||
"A#A#{_ZN1AC1Ev}.2d3ff9efa1bcbece3182f08e3514d828_1" -> "A#A#{_ZN1AC1Ev}.2d3ff9efa1bcbece3182f08e3514d828_2" ;
|
||||
"A#A#{_ZN1AC1Ev}.2d3ff9efa1bcbece3182f08e3514d828_2" [label="2: Exit A_A \n " color=yellow style=filled]
|
||||
|
||||
|
||||
"~A#A#(_ZN1AD0Ev).56ee06aef571dbbd330acc7aac738fb2_1" [label="1: Start A_~A\nFormals: this:A*\nLocals: \n DECLARE_LOCALS(&return); [line 12]\n " color=yellow style=filled]
|
||||
|
||||
|
||||
"~A#A#(_ZN1AD0Ev).56ee06aef571dbbd330acc7aac738fb2_1" -> "~A#A#(_ZN1AD0Ev).56ee06aef571dbbd330acc7aac738fb2_2" ;
|
||||
"~A#A#(_ZN1AD0Ev).56ee06aef571dbbd330acc7aac738fb2_2" [label="2: Exit A_~A \n " color=yellow style=filled]
|
||||
|
||||
|
||||
"B#B#{_ZN1BC1Ev}.7d36f8f9e357133df32509b5d80a4f1d_1" [label="1: Start B_B\nFormals: this:B*\nLocals: \n DECLARE_LOCALS(&return); [line 16]\n " color=yellow style=filled]
|
||||
|
||||
|
||||
"B#B#{_ZN1BC1Ev}.7d36f8f9e357133df32509b5d80a4f1d_1" -> "B#B#{_ZN1BC1Ev}.7d36f8f9e357133df32509b5d80a4f1d_3" ;
|
||||
"B#B#{_ZN1BC1Ev}.7d36f8f9e357133df32509b5d80a4f1d_2" [label="2: Exit B_B \n " color=yellow style=filled]
|
||||
|
||||
|
||||
"B#B#{_ZN1BC1Ev}.7d36f8f9e357133df32509b5d80a4f1d_3" [label="3: Constructor Init \n n$0=*&this:B* [line 16]\n _fun_A_A(n$0:B*) [line 16]\n " shape="box"]
|
||||
|
||||
|
||||
"B#B#{_ZN1BC1Ev}.7d36f8f9e357133df32509b5d80a4f1d_3" -> "B#B#{_ZN1BC1Ev}.7d36f8f9e357133df32509b5d80a4f1d_2" ;
|
||||
"~B#B#(_ZN1BD0Ev).cd4fb9d54ed1b3496d9539c455e8ee1d_1" [label="1: Start B_~B\nFormals: this:B*\nLocals: \n DECLARE_LOCALS(&return); [line 17]\n " color=yellow style=filled]
|
||||
|
||||
|
||||
"~B#B#(_ZN1BD0Ev).cd4fb9d54ed1b3496d9539c455e8ee1d_1" -> "~B#B#(_ZN1BD0Ev).cd4fb9d54ed1b3496d9539c455e8ee1d_3" ;
|
||||
"~B#B#(_ZN1BD0Ev).cd4fb9d54ed1b3496d9539c455e8ee1d_2" [label="2: Exit B_~B \n " color=yellow style=filled]
|
||||
|
||||
|
||||
"~B#B#(_ZN1BD0Ev).cd4fb9d54ed1b3496d9539c455e8ee1d_3" [label="3: Destruction \n n$0=*&this:B* [line 17]\n _=*n$0:B [line 17]\n _fun_A_~A(n$0:B*) [line 17]\n " shape="box"]
|
||||
|
||||
|
||||
"~B#B#(_ZN1BD0Ev).cd4fb9d54ed1b3496d9539c455e8ee1d_3" -> "~B#B#(_ZN1BD0Ev).cd4fb9d54ed1b3496d9539c455e8ee1d_2" ;
|
||||
"C#C#{_ZN1CC1Ev}.3e03405a28565a3b8cdc219c868b91d4_1" [label="1: Start C_C\nFormals: this:C*\nLocals: \n DECLARE_LOCALS(&return); [line 21]\n " color=yellow style=filled]
|
||||
|
||||
|
||||
"C#C#{_ZN1CC1Ev}.3e03405a28565a3b8cdc219c868b91d4_1" -> "C#C#{_ZN1CC1Ev}.3e03405a28565a3b8cdc219c868b91d4_2" ;
|
||||
"C#C#{_ZN1CC1Ev}.3e03405a28565a3b8cdc219c868b91d4_2" [label="2: Exit C_C \n " color=yellow style=filled]
|
||||
|
||||
|
||||
"~C#C#(_ZN1CD0Ev).5004cab30e9be2ae0ac437333f531054_1" [label="1: Start C_~C\nFormals: this:C*\nLocals: \n DECLARE_LOCALS(&return); [line 22]\n " color=yellow style=filled]
|
||||
|
||||
|
||||
"~C#C#(_ZN1CD0Ev).5004cab30e9be2ae0ac437333f531054_1" -> "~C#C#(_ZN1CD0Ev).5004cab30e9be2ae0ac437333f531054_2" ;
|
||||
"~C#C#(_ZN1CD0Ev).5004cab30e9be2ae0ac437333f531054_2" [label="2: Exit C_~C \n " color=yellow style=filled]
|
||||
|
||||
|
||||
"D#D#{_ZN1DC1Ev}.1fb38ad288cb592a49d11e238b53d161_1" [label="1: Start D_D\nFormals: this:D*\nLocals: \n DECLARE_LOCALS(&return); [line 27]\n " color=yellow style=filled]
|
||||
|
||||
|
||||
"D#D#{_ZN1DC1Ev}.1fb38ad288cb592a49d11e238b53d161_1" -> "D#D#{_ZN1DC1Ev}.1fb38ad288cb592a49d11e238b53d161_5" ;
|
||||
"D#D#{_ZN1DC1Ev}.1fb38ad288cb592a49d11e238b53d161_2" [label="2: Exit D_D \n " color=yellow style=filled]
|
||||
|
||||
|
||||
"D#D#{_ZN1DC1Ev}.1fb38ad288cb592a49d11e238b53d161_3" [label="3: Constructor Init \n n$0=*&this:D* [line 27]\n _fun_B_B(n$0.b:B*) [line 27]\n " shape="box"]
|
||||
|
||||
|
||||
"D#D#{_ZN1DC1Ev}.1fb38ad288cb592a49d11e238b53d161_3" -> "D#D#{_ZN1DC1Ev}.1fb38ad288cb592a49d11e238b53d161_2" ;
|
||||
"D#D#{_ZN1DC1Ev}.1fb38ad288cb592a49d11e238b53d161_4" [label="4: Constructor Init \n n$1=*&this:D* [line 27]\n _fun_C_C(n$1:D*) [line 27]\n " shape="box"]
|
||||
|
||||
|
||||
"D#D#{_ZN1DC1Ev}.1fb38ad288cb592a49d11e238b53d161_4" -> "D#D#{_ZN1DC1Ev}.1fb38ad288cb592a49d11e238b53d161_3" ;
|
||||
"D#D#{_ZN1DC1Ev}.1fb38ad288cb592a49d11e238b53d161_5" [label="5: Constructor Init \n n$2=*&this:D* [line 27]\n _fun_A_A(n$2:D*) [line 27]\n " shape="box"]
|
||||
|
||||
|
||||
"D#D#{_ZN1DC1Ev}.1fb38ad288cb592a49d11e238b53d161_5" -> "D#D#{_ZN1DC1Ev}.1fb38ad288cb592a49d11e238b53d161_4" ;
|
||||
"~D#D#(_ZN1DD0Ev).927ae640f732cd5172d9f1a635578398_1" [label="1: Start D_~D\nFormals: this:D*\nLocals: a:A \n DECLARE_LOCALS(&return,&a); [line 28]\n " color=yellow style=filled]
|
||||
|
||||
|
||||
"~D#D#(_ZN1DD0Ev).927ae640f732cd5172d9f1a635578398_1" -> "~D#D#(_ZN1DD0Ev).927ae640f732cd5172d9f1a635578398_5" ;
|
||||
"~D#D#(_ZN1DD0Ev).927ae640f732cd5172d9f1a635578398_2" [label="2: Exit D_~D \n " color=yellow style=filled]
|
||||
|
||||
|
||||
"~D#D#(_ZN1DD0Ev).927ae640f732cd5172d9f1a635578398_3" [label="3: Destruction \n n$0=*&this:D* [line 28]\n _=*n$0.b:B [line 28]\n _fun_B_~B(n$0.b:B*) [line 28]\n _=*n$0:D [line 28]\n _fun_C_~C(n$0:D*) [line 28]\n _=*n$0:D [line 28]\n _fun_A_~A(n$0:D*) [line 28]\n " shape="box"]
|
||||
|
||||
|
||||
"~D#D#(_ZN1DD0Ev).927ae640f732cd5172d9f1a635578398_3" -> "~D#D#(_ZN1DD0Ev).927ae640f732cd5172d9f1a635578398_2" ;
|
||||
"~D#D#(_ZN1DD0Ev).927ae640f732cd5172d9f1a635578398_4" [label="4: Destruction \n _=*&a:A [line 28]\n _fun_A_~A(&a:A*) [line 28]\n " shape="box"]
|
||||
|
||||
|
||||
"~D#D#(_ZN1DD0Ev).927ae640f732cd5172d9f1a635578398_4" -> "~D#D#(_ZN1DD0Ev).927ae640f732cd5172d9f1a635578398_3" ;
|
||||
"~D#D#(_ZN1DD0Ev).927ae640f732cd5172d9f1a635578398_5" [label="5: DeclStmt \n _fun_A_A(&a:A*) [line 28]\n " shape="box"]
|
||||
|
||||
|
||||
"~D#D#(_ZN1DD0Ev).927ae640f732cd5172d9f1a635578398_5" -> "~D#D#(_ZN1DD0Ev).927ae640f732cd5172d9f1a635578398_4" ;
|
||||
"E#E#{_ZN1EC1Ev}.8eb6f0809ed40dd2a68db058b9bc4ade_1" [label="1: Start E_E\nFormals: this:E*\nLocals: \n DECLARE_LOCALS(&return); [line 32]\n " color=yellow style=filled]
|
||||
|
||||
|
||||
"E#E#{_ZN1EC1Ev}.8eb6f0809ed40dd2a68db058b9bc4ade_1" -> "E#E#{_ZN1EC1Ev}.8eb6f0809ed40dd2a68db058b9bc4ade_5" ;
|
||||
"E#E#{_ZN1EC1Ev}.8eb6f0809ed40dd2a68db058b9bc4ade_2" [label="2: Exit E_E \n " color=yellow style=filled]
|
||||
|
||||
|
||||
"E#E#{_ZN1EC1Ev}.8eb6f0809ed40dd2a68db058b9bc4ade_3" [label="3: Constructor Init \n n$0=*&this:E* [line 32]\n _fun_D_D(n$0:E*) [line 32]\n " shape="box"]
|
||||
|
||||
|
||||
"E#E#{_ZN1EC1Ev}.8eb6f0809ed40dd2a68db058b9bc4ade_3" -> "E#E#{_ZN1EC1Ev}.8eb6f0809ed40dd2a68db058b9bc4ade_2" ;
|
||||
"E#E#{_ZN1EC1Ev}.8eb6f0809ed40dd2a68db058b9bc4ade_4" [label="4: Constructor Init \n n$1=*&this:E* [line 32]\n _fun_C_C(n$1:E*) [line 32]\n " shape="box"]
|
||||
|
||||
|
||||
"E#E#{_ZN1EC1Ev}.8eb6f0809ed40dd2a68db058b9bc4ade_4" -> "E#E#{_ZN1EC1Ev}.8eb6f0809ed40dd2a68db058b9bc4ade_3" ;
|
||||
"E#E#{_ZN1EC1Ev}.8eb6f0809ed40dd2a68db058b9bc4ade_5" [label="5: Constructor Init \n n$2=*&this:E* [line 32]\n _fun_B_B(n$2:E*) [line 32]\n " shape="box"]
|
||||
|
||||
|
||||
"E#E#{_ZN1EC1Ev}.8eb6f0809ed40dd2a68db058b9bc4ade_5" -> "E#E#{_ZN1EC1Ev}.8eb6f0809ed40dd2a68db058b9bc4ade_4" ;
|
||||
"~E#E#(_ZN1ED0Ev).44fb1076af1709dabd7a40484ef7ca13_1" [label="1: Start E_~E\nFormals: this:E*\nLocals: \n DECLARE_LOCALS(&return); [line 33]\n " color=yellow style=filled]
|
||||
|
||||
|
||||
"~E#E#(_ZN1ED0Ev).44fb1076af1709dabd7a40484ef7ca13_1" -> "~E#E#(_ZN1ED0Ev).44fb1076af1709dabd7a40484ef7ca13_3" ;
|
||||
"~E#E#(_ZN1ED0Ev).44fb1076af1709dabd7a40484ef7ca13_2" [label="2: Exit E_~E \n " color=yellow style=filled]
|
||||
|
||||
|
||||
"~E#E#(_ZN1ED0Ev).44fb1076af1709dabd7a40484ef7ca13_3" [label="3: Destruction \n n$0=*&this:E* [line 33]\n _=*n$0:E [line 33]\n _fun_D_~D(n$0:E*) [line 33]\n _=*n$0:E [line 33]\n _fun_C_~C(n$0:E*) [line 33]\n _=*n$0:E [line 33]\n _fun_B_~B(n$0:E*) [line 33]\n " shape="box"]
|
||||
|
||||
|
||||
"~E#E#(_ZN1ED0Ev).44fb1076af1709dabd7a40484ef7ca13_3" -> "~E#E#(_ZN1ED0Ev).44fb1076af1709dabd7a40484ef7ca13_2" ;
|
||||
}
|
Loading…
Reference in new issue