Reviewed By: dulmarod Differential Revision: D2839164 fb-gh-sync-id: e9a3f69master
parent
f04c979563
commit
7b9b6841d2
@ -0,0 +1,22 @@
|
||||
/*
|
||||
* 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 point {
|
||||
int x;
|
||||
int y;
|
||||
};
|
||||
|
||||
int compound_literal_expr() {
|
||||
return ((struct point) { .y = 32, .x = 52 }).x;
|
||||
}
|
||||
|
||||
int init_with_compound_literal() {
|
||||
struct point p = (struct point) { 32, 52 };
|
||||
return p.x;
|
||||
}
|
@ -0,0 +1,28 @@
|
||||
digraph iCFG {
|
||||
7 [label="7: InitListExp \n *&p.x:int =32 [line 20]\n *&p.y:int =52 [line 20]\n " shape="box"]
|
||||
|
||||
|
||||
7 -> 6 ;
|
||||
6 [label="6: Return Stmt \n n$0=*&p.x:int [line 21]\n *&return:int =n$0 [line 21]\n REMOVE_TEMPS(n$0); [line 21]\n NULLIFY(&p,false); [line 21]\n APPLY_ABSTRACTION; [line 21]\n " shape="box"]
|
||||
|
||||
|
||||
6 -> 5 ;
|
||||
5 [label="5: Exit init_with_compound_literal \n " color=yellow style=filled]
|
||||
|
||||
|
||||
4 [label="4: Start init_with_compound_literal\nFormals: \nLocals: p:struct point \n DECLARE_LOCALS(&return,&p); [line 19]\n " color=yellow style=filled]
|
||||
|
||||
|
||||
4 -> 7 ;
|
||||
3 [label="3: Return Stmt \n *&SIL_compound_literal__n$0.x:int =52 [line 16]\n *&SIL_compound_literal__n$0.y:int =32 [line 16]\n n$1=*&SIL_compound_literal__n$0.x:int [line 16]\n *&return:int =n$1 [line 16]\n REMOVE_TEMPS(n$1); [line 16]\n APPLY_ABSTRACTION; [line 16]\n " shape="box"]
|
||||
|
||||
|
||||
3 -> 2 ;
|
||||
2 [label="2: Exit compound_literal_expr \n " color=yellow style=filled]
|
||||
|
||||
|
||||
1 [label="1: Start compound_literal_expr\nFormals: \nLocals: \n DECLARE_LOCALS(&return); [line 15]\n " color=yellow style=filled]
|
||||
|
||||
|
||||
1 -> 3 ;
|
||||
}
|
Loading…
Reference in new issue