Summary:public Do same thing we do to CXXDefaultArgExpr Reviewed By: dulmarod Differential Revision: D2954128 fb-gh-sync-id: 2c92c16 shipit-source-id: 2c92c16master
parent
2b1558af6d
commit
e4a0e9bbf7
@ -1 +1 @@
|
|||||||
Subproject commit 60b10ef73606e814cf87c08e5c0d263dc1f9fb8c
|
Subproject commit cadf02f4f3918062d8c51870af1beadca6140af8
|
@ -0,0 +1,25 @@
|
|||||||
|
/*
|
||||||
|
* 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.
|
||||||
|
*/
|
||||||
|
|
||||||
|
struct X {
|
||||||
|
int a = -1;
|
||||||
|
int b{-2};
|
||||||
|
int c{}; // doesn't work yet
|
||||||
|
int d;
|
||||||
|
X() = default;
|
||||||
|
X(int a, int b) : a(a + b) {}
|
||||||
|
};
|
||||||
|
|
||||||
|
struct Y {
|
||||||
|
X x1{1, 2};
|
||||||
|
X x2{};
|
||||||
|
X x3;
|
||||||
|
};
|
||||||
|
|
||||||
|
void test() { Y y; }
|
@ -0,0 +1,70 @@
|
|||||||
|
digraph iCFG {
|
||||||
|
18 [label="18: DeclStmt \n _fun_Y_Y(&y:class Y *) [line 25]\n NULLIFY(&y,false); [line 25]\n APPLY_ABSTRACTION; [line 25]\n " shape="box"]
|
||||||
|
|
||||||
|
|
||||||
|
18 -> 17 ;
|
||||||
|
17 [label="17: Exit test \n " color=yellow style=filled]
|
||||||
|
|
||||||
|
|
||||||
|
16 [label="16: Start test\nFormals: \nLocals: y:class Y \n DECLARE_LOCALS(&return,&y); [line 25]\n " color=yellow style=filled]
|
||||||
|
|
||||||
|
|
||||||
|
16 -> 18 ;
|
||||||
|
15 [label="15: Constructor Init \n n$2=*&this:class Y * [line 20]\n _fun_X_X(n$2.x1:class X *,1:int ,2:int ) [line 20]\n REMOVE_TEMPS(n$2); [line 20]\n " shape="box"]
|
||||||
|
|
||||||
|
|
||||||
|
15 -> 14 ;
|
||||||
|
14 [label="14: Constructor Init \n n$1=*&this:class Y * [line 21]\n _fun_X_X(n$1.x2:class X *) [line 21]\n REMOVE_TEMPS(n$1); [line 21]\n " shape="box"]
|
||||||
|
|
||||||
|
|
||||||
|
14 -> 13 ;
|
||||||
|
13 [label="13: Constructor Init \n n$0=*&this:class Y * [line 19]\n _fun_X_X(n$0.x3:class X *) [line 19]\n REMOVE_TEMPS(n$0); [line 19]\n NULLIFY(&this,false); [line 19]\n APPLY_ABSTRACTION; [line 19]\n " shape="box"]
|
||||||
|
|
||||||
|
|
||||||
|
13 -> 12 ;
|
||||||
|
12 [label="12: Exit Y_Y \n " color=yellow style=filled]
|
||||||
|
|
||||||
|
|
||||||
|
11 [label="11: Start Y_Y\nFormals: this:class Y *\nLocals: \n DECLARE_LOCALS(&return); [line 19]\n " color=yellow style=filled]
|
||||||
|
|
||||||
|
|
||||||
|
11 -> 15 ;
|
||||||
|
10 [label="10: Constructor Init \n n$2=*&this:class X * [line 16]\n n$3=*&a:int [line 16]\n n$4=*&b:int [line 16]\n *n$2.a:int =(n$3 + n$4) [line 16]\n REMOVE_TEMPS(n$2,n$3,n$4); [line 16]\n NULLIFY(&a,false); [line 16]\n NULLIFY(&b,false); [line 16]\n " shape="box"]
|
||||||
|
|
||||||
|
|
||||||
|
10 -> 9 ;
|
||||||
|
9 [label="9: Constructor Init \n n$1=*&this:class X * [line 12]\n *n$1.b:int =-2 [line 12]\n REMOVE_TEMPS(n$1); [line 12]\n " shape="box"]
|
||||||
|
|
||||||
|
|
||||||
|
9 -> 8 ;
|
||||||
|
8 [label="8: Constructor Init \n n$0=*&this:class X * [line 13]\n *n$0.c:int =-1 [line 16]\n REMOVE_TEMPS(n$0); [line 16]\n NULLIFY(&this,false); [line 16]\n APPLY_ABSTRACTION; [line 16]\n " shape="box"]
|
||||||
|
|
||||||
|
|
||||||
|
8 -> 7 ;
|
||||||
|
7 [label="7: Exit X_X \n " color=yellow style=filled]
|
||||||
|
|
||||||
|
|
||||||
|
6 [label="6: Start X_X\nFormals: this:class X * a:int b:int \nLocals: \n DECLARE_LOCALS(&return); [line 16]\n " color=yellow style=filled]
|
||||||
|
|
||||||
|
|
||||||
|
6 -> 10 ;
|
||||||
|
5 [label="5: Constructor Init \n n$2=*&this:class X * [line 11]\n *n$2.a:int =-1 [line 15]\n REMOVE_TEMPS(n$2); [line 15]\n " shape="box"]
|
||||||
|
|
||||||
|
|
||||||
|
5 -> 4 ;
|
||||||
|
4 [label="4: Constructor Init \n n$1=*&this:class X * [line 12]\n *n$1.b:int =-2 [line 12]\n REMOVE_TEMPS(n$1); [line 12]\n " shape="box"]
|
||||||
|
|
||||||
|
|
||||||
|
4 -> 3 ;
|
||||||
|
3 [label="3: Constructor Init \n n$0=*&this:class X * [line 13]\n *n$0.c:int =-1 [line 15]\n REMOVE_TEMPS(n$0); [line 15]\n NULLIFY(&this,false); [line 15]\n APPLY_ABSTRACTION; [line 15]\n " shape="box"]
|
||||||
|
|
||||||
|
|
||||||
|
3 -> 2 ;
|
||||||
|
2 [label="2: Exit X_X \n " color=yellow style=filled]
|
||||||
|
|
||||||
|
|
||||||
|
1 [label="1: Start X_X\nFormals: this:class X *\nLocals: \n DECLARE_LOCALS(&return); [line 15]\n " color=yellow style=filled]
|
||||||
|
|
||||||
|
|
||||||
|
1 -> 5 ;
|
||||||
|
}
|
Loading…
Reference in new issue