Summary: Updated version of the plugin exports some missing `VarDecls`. To make sure it doesn't break again, add a test that didn't work before. Reviewed By: dulmarod Differential Revision: D4674123 fbshipit-source-id: 0c1677amaster
parent
104acee99d
commit
4b620316d3
@ -1 +1 @@
|
||||
Subproject commit e1dce5cb9676dfa0bf2f54111f74e54b6f9e4b88
|
||||
Subproject commit 4c653482100360ff0c580e39e456dcb0a74b628c
|
@ -0,0 +1,29 @@
|
||||
/*
|
||||
* 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 copy_array_field {
|
||||
struct X {
|
||||
int* p;
|
||||
int x[10]; // array field
|
||||
};
|
||||
|
||||
int npe() {
|
||||
X x1;
|
||||
x1.p = 0;
|
||||
X x2 = x1; // will call default copy constructor
|
||||
return *x2.p;
|
||||
}
|
||||
|
||||
int no_npe() {
|
||||
int a = 0;
|
||||
X x1;
|
||||
x1.p = &a;
|
||||
X x2 = x1; // will call default copy constructor
|
||||
return *x2.p;
|
||||
}
|
||||
}
|
@ -0,0 +1,75 @@
|
||||
/* @generated */
|
||||
digraph iCFG {
|
||||
"copy_array_field::npe{d41d8cd98f00b204e9800998ecf8427e_ZN16copy_array_field3npeEv}.34f79bc9982a67b09f43c8e07e8f32e2_1" [label="1: Start copy_array_field::npe\nFormals: \nLocals: x2:class copy_array_field::X x1:class copy_array_field::X \n DECLARE_LOCALS(&return,&x2,&x1); [line 15]\n " color=yellow style=filled]
|
||||
|
||||
|
||||
"copy_array_field::npe{d41d8cd98f00b204e9800998ecf8427e_ZN16copy_array_field3npeEv}.34f79bc9982a67b09f43c8e07e8f32e2_1" -> "copy_array_field::npe{d41d8cd98f00b204e9800998ecf8427e_ZN16copy_array_field3npeEv}.34f79bc9982a67b09f43c8e07e8f32e2_6" ;
|
||||
"copy_array_field::npe{d41d8cd98f00b204e9800998ecf8427e_ZN16copy_array_field3npeEv}.34f79bc9982a67b09f43c8e07e8f32e2_2" [label="2: Exit copy_array_field::npe \n " color=yellow style=filled]
|
||||
|
||||
|
||||
"copy_array_field::npe{d41d8cd98f00b204e9800998ecf8427e_ZN16copy_array_field3npeEv}.34f79bc9982a67b09f43c8e07e8f32e2_3" [label="3: Return Stmt \n n$0=*&x2.p:int* [line 19]\n n$1=*n$0:int [line 19]\n *&return:int=n$1 [line 19]\n " shape="box"]
|
||||
|
||||
|
||||
"copy_array_field::npe{d41d8cd98f00b204e9800998ecf8427e_ZN16copy_array_field3npeEv}.34f79bc9982a67b09f43c8e07e8f32e2_3" -> "copy_array_field::npe{d41d8cd98f00b204e9800998ecf8427e_ZN16copy_array_field3npeEv}.34f79bc9982a67b09f43c8e07e8f32e2_2" ;
|
||||
"copy_array_field::npe{d41d8cd98f00b204e9800998ecf8427e_ZN16copy_array_field3npeEv}.34f79bc9982a67b09f43c8e07e8f32e2_4" [label="4: DeclStmt \n _fun_copy_array_field::X_X(&x2:class copy_array_field::X*,&x1:class copy_array_field::X&) [line 18]\n " shape="box"]
|
||||
|
||||
|
||||
"copy_array_field::npe{d41d8cd98f00b204e9800998ecf8427e_ZN16copy_array_field3npeEv}.34f79bc9982a67b09f43c8e07e8f32e2_4" -> "copy_array_field::npe{d41d8cd98f00b204e9800998ecf8427e_ZN16copy_array_field3npeEv}.34f79bc9982a67b09f43c8e07e8f32e2_3" ;
|
||||
"copy_array_field::npe{d41d8cd98f00b204e9800998ecf8427e_ZN16copy_array_field3npeEv}.34f79bc9982a67b09f43c8e07e8f32e2_5" [label="5: BinaryOperatorStmt: Assign \n *&x1.p:int*=0 [line 17]\n " shape="box"]
|
||||
|
||||
|
||||
"copy_array_field::npe{d41d8cd98f00b204e9800998ecf8427e_ZN16copy_array_field3npeEv}.34f79bc9982a67b09f43c8e07e8f32e2_5" -> "copy_array_field::npe{d41d8cd98f00b204e9800998ecf8427e_ZN16copy_array_field3npeEv}.34f79bc9982a67b09f43c8e07e8f32e2_4" ;
|
||||
"copy_array_field::npe{d41d8cd98f00b204e9800998ecf8427e_ZN16copy_array_field3npeEv}.34f79bc9982a67b09f43c8e07e8f32e2_6" [label="6: DeclStmt \n _fun_copy_array_field::X_X(&x1:class copy_array_field::X*) [line 16]\n " shape="box"]
|
||||
|
||||
|
||||
"copy_array_field::npe{d41d8cd98f00b204e9800998ecf8427e_ZN16copy_array_field3npeEv}.34f79bc9982a67b09f43c8e07e8f32e2_6" -> "copy_array_field::npe{d41d8cd98f00b204e9800998ecf8427e_ZN16copy_array_field3npeEv}.34f79bc9982a67b09f43c8e07e8f32e2_5" ;
|
||||
"copy_array_field::no_npe{d41d8cd98f00b204e9800998ecf8427e_ZN16copy_array_field6no_npeEv}.c7d0652407dba78f69ad18a1b0e951b1_1" [label="1: Start copy_array_field::no_npe\nFormals: \nLocals: x2:class copy_array_field::X x1:class copy_array_field::X a:int \n DECLARE_LOCALS(&return,&x2,&x1,&a); [line 22]\n " color=yellow style=filled]
|
||||
|
||||
|
||||
"copy_array_field::no_npe{d41d8cd98f00b204e9800998ecf8427e_ZN16copy_array_field6no_npeEv}.c7d0652407dba78f69ad18a1b0e951b1_1" -> "copy_array_field::no_npe{d41d8cd98f00b204e9800998ecf8427e_ZN16copy_array_field6no_npeEv}.c7d0652407dba78f69ad18a1b0e951b1_7" ;
|
||||
"copy_array_field::no_npe{d41d8cd98f00b204e9800998ecf8427e_ZN16copy_array_field6no_npeEv}.c7d0652407dba78f69ad18a1b0e951b1_2" [label="2: Exit copy_array_field::no_npe \n " color=yellow style=filled]
|
||||
|
||||
|
||||
"copy_array_field::no_npe{d41d8cd98f00b204e9800998ecf8427e_ZN16copy_array_field6no_npeEv}.c7d0652407dba78f69ad18a1b0e951b1_3" [label="3: Return Stmt \n n$0=*&x2.p:int* [line 27]\n n$1=*n$0:int [line 27]\n *&return:int=n$1 [line 27]\n " shape="box"]
|
||||
|
||||
|
||||
"copy_array_field::no_npe{d41d8cd98f00b204e9800998ecf8427e_ZN16copy_array_field6no_npeEv}.c7d0652407dba78f69ad18a1b0e951b1_3" -> "copy_array_field::no_npe{d41d8cd98f00b204e9800998ecf8427e_ZN16copy_array_field6no_npeEv}.c7d0652407dba78f69ad18a1b0e951b1_2" ;
|
||||
"copy_array_field::no_npe{d41d8cd98f00b204e9800998ecf8427e_ZN16copy_array_field6no_npeEv}.c7d0652407dba78f69ad18a1b0e951b1_4" [label="4: DeclStmt \n _fun_copy_array_field::X_X(&x2:class copy_array_field::X*,&x1:class copy_array_field::X&) [line 26]\n " shape="box"]
|
||||
|
||||
|
||||
"copy_array_field::no_npe{d41d8cd98f00b204e9800998ecf8427e_ZN16copy_array_field6no_npeEv}.c7d0652407dba78f69ad18a1b0e951b1_4" -> "copy_array_field::no_npe{d41d8cd98f00b204e9800998ecf8427e_ZN16copy_array_field6no_npeEv}.c7d0652407dba78f69ad18a1b0e951b1_3" ;
|
||||
"copy_array_field::no_npe{d41d8cd98f00b204e9800998ecf8427e_ZN16copy_array_field6no_npeEv}.c7d0652407dba78f69ad18a1b0e951b1_5" [label="5: BinaryOperatorStmt: Assign \n *&x1.p:int*=&a [line 25]\n " shape="box"]
|
||||
|
||||
|
||||
"copy_array_field::no_npe{d41d8cd98f00b204e9800998ecf8427e_ZN16copy_array_field6no_npeEv}.c7d0652407dba78f69ad18a1b0e951b1_5" -> "copy_array_field::no_npe{d41d8cd98f00b204e9800998ecf8427e_ZN16copy_array_field6no_npeEv}.c7d0652407dba78f69ad18a1b0e951b1_4" ;
|
||||
"copy_array_field::no_npe{d41d8cd98f00b204e9800998ecf8427e_ZN16copy_array_field6no_npeEv}.c7d0652407dba78f69ad18a1b0e951b1_6" [label="6: DeclStmt \n _fun_copy_array_field::X_X(&x1:class copy_array_field::X*) [line 24]\n " shape="box"]
|
||||
|
||||
|
||||
"copy_array_field::no_npe{d41d8cd98f00b204e9800998ecf8427e_ZN16copy_array_field6no_npeEv}.c7d0652407dba78f69ad18a1b0e951b1_6" -> "copy_array_field::no_npe{d41d8cd98f00b204e9800998ecf8427e_ZN16copy_array_field6no_npeEv}.c7d0652407dba78f69ad18a1b0e951b1_5" ;
|
||||
"copy_array_field::no_npe{d41d8cd98f00b204e9800998ecf8427e_ZN16copy_array_field6no_npeEv}.c7d0652407dba78f69ad18a1b0e951b1_7" [label="7: DeclStmt \n *&a:int=0 [line 23]\n " shape="box"]
|
||||
|
||||
|
||||
"copy_array_field::no_npe{d41d8cd98f00b204e9800998ecf8427e_ZN16copy_array_field6no_npeEv}.c7d0652407dba78f69ad18a1b0e951b1_7" -> "copy_array_field::no_npe{d41d8cd98f00b204e9800998ecf8427e_ZN16copy_array_field6no_npeEv}.c7d0652407dba78f69ad18a1b0e951b1_6" ;
|
||||
"copy_array_field::X_X{_ZN16copy_array_field1XC1Ev}.9b9462bb10985d335d9f5baadb381209_1" [label="1: Start copy_array_field::X_X\nFormals: this:class copy_array_field::X*\nLocals: \n DECLARE_LOCALS(&return); [line 10]\n " color=yellow style=filled]
|
||||
|
||||
|
||||
"copy_array_field::X_X{_ZN16copy_array_field1XC1Ev}.9b9462bb10985d335d9f5baadb381209_1" -> "copy_array_field::X_X{_ZN16copy_array_field1XC1Ev}.9b9462bb10985d335d9f5baadb381209_2" ;
|
||||
"copy_array_field::X_X{_ZN16copy_array_field1XC1Ev}.9b9462bb10985d335d9f5baadb381209_2" [label="2: Exit copy_array_field::X_X \n " color=yellow style=filled]
|
||||
|
||||
|
||||
"copy_array_field::X_X{_ZN16copy_array_field1XC1ERKS0_|constexpr}.33a7a7c3da7e4c81ca4741491f7ac336_1" [label="1: Start copy_array_field::X_X\nFormals: this:class copy_array_field::X* __param_0:class copy_array_field::X&\nLocals: \n DECLARE_LOCALS(&return); [line 10]\n " color=yellow style=filled]
|
||||
|
||||
|
||||
"copy_array_field::X_X{_ZN16copy_array_field1XC1ERKS0_|constexpr}.33a7a7c3da7e4c81ca4741491f7ac336_1" -> "copy_array_field::X_X{_ZN16copy_array_field1XC1ERKS0_|constexpr}.33a7a7c3da7e4c81ca4741491f7ac336_4" ;
|
||||
"copy_array_field::X_X{_ZN16copy_array_field1XC1ERKS0_|constexpr}.33a7a7c3da7e4c81ca4741491f7ac336_2" [label="2: Exit copy_array_field::X_X \n " color=yellow style=filled]
|
||||
|
||||
|
||||
"copy_array_field::X_X{_ZN16copy_array_field1XC1ERKS0_|constexpr}.33a7a7c3da7e4c81ca4741491f7ac336_3" [label="3: Constructor Init \n n$0=*&this:class copy_array_field::X* [line 10]\n n$1=*&__param_0:class copy_array_field::X& [line 10]\n n$2=*&__i0:unsigned long [line 10]\n n$3=*n$1.x[n$2]:int [line 10]\n *n$0.x:int=n$3 [line 10]\n " shape="box"]
|
||||
|
||||
|
||||
"copy_array_field::X_X{_ZN16copy_array_field1XC1ERKS0_|constexpr}.33a7a7c3da7e4c81ca4741491f7ac336_3" -> "copy_array_field::X_X{_ZN16copy_array_field1XC1ERKS0_|constexpr}.33a7a7c3da7e4c81ca4741491f7ac336_2" ;
|
||||
"copy_array_field::X_X{_ZN16copy_array_field1XC1ERKS0_|constexpr}.33a7a7c3da7e4c81ca4741491f7ac336_4" [label="4: Constructor Init \n n$4=*&this:class copy_array_field::X* [line 10]\n n$5=*&__param_0:class copy_array_field::X& [line 10]\n n$6=*n$5.p:int* [line 10]\n *n$4.p:int*=n$6 [line 10]\n " shape="box"]
|
||||
|
||||
|
||||
"copy_array_field::X_X{_ZN16copy_array_field1XC1ERKS0_|constexpr}.33a7a7c3da7e4c81ca4741491f7ac336_4" -> "copy_array_field::X_X{_ZN16copy_array_field1XC1ERKS0_|constexpr}.33a7a7c3da7e4c81ca4741491f7ac336_3" ;
|
||||
}
|
Loading…
Reference in new issue