Summary: This resolves #796 . Effectively it adds file specific suffix to name of all global initializers (so initializersof two global variable of the same name will have unique Typ.Procname). which is the same rule as currently used by constructing Procname for the static functions. However this change applies to initializers of all global variables and not just static (arguably it's a right thing. since GCC used to allow multiple global variables with the same name). Consequences of this change that it becomes impossible to know name of generated initialization function of global ('extern') variables. However get_initializer_pname function is only referenced by the frontend (when creating initializer for the defined global variables) and by the SIOF checker. Closes https://github.com/facebook/infer/pull/801 Reviewed By: jvillard Differential Revision: D6335034 Pulled By: dulmarod fbshipit-source-id: 1a92c08master
parent
9deec6ffde
commit
45df254a99
@ -1 +1 @@
|
||||
Subproject commit 00a64caee5877d6cd23816776b8ed56c704f376e
|
||||
Subproject commit ac0bceaa019efded13109c192a2f955f476e2b27
|
@ -1,25 +1,25 @@
|
||||
/* @generated */
|
||||
digraph iCFG {
|
||||
"__infer_globals_initializer_x.90ed5779794b6c6f0b00544949bb1047_1" [label="1: Start __infer_globals_initializer_x\nFormals: \nLocals: \n DECLARE_LOCALS(&return); [line 14, column 1]\n " color=yellow style=filled]
|
||||
"__infer_globals_initializer_x#346c89dda90b0be6289346ddbf0528bc.83245b9f254e67fb6f879cc1e35a1bb1_1" [label="1: Start __infer_globals_initializer_x\nFormals: \nLocals: \n DECLARE_LOCALS(&return); [line 14, column 1]\n " color=yellow style=filled]
|
||||
|
||||
|
||||
"__infer_globals_initializer_x.90ed5779794b6c6f0b00544949bb1047_1" -> "__infer_globals_initializer_x.90ed5779794b6c6f0b00544949bb1047_3" ;
|
||||
"__infer_globals_initializer_x.90ed5779794b6c6f0b00544949bb1047_2" [label="2: Exit __infer_globals_initializer_x \n " color=yellow style=filled]
|
||||
"__infer_globals_initializer_x#346c89dda90b0be6289346ddbf0528bc.83245b9f254e67fb6f879cc1e35a1bb1_1" -> "__infer_globals_initializer_x#346c89dda90b0be6289346ddbf0528bc.83245b9f254e67fb6f879cc1e35a1bb1_3" ;
|
||||
"__infer_globals_initializer_x#346c89dda90b0be6289346ddbf0528bc.83245b9f254e67fb6f879cc1e35a1bb1_2" [label="2: Exit __infer_globals_initializer_x \n " color=yellow style=filled]
|
||||
|
||||
|
||||
"__infer_globals_initializer_x.90ed5779794b6c6f0b00544949bb1047_3" [label="3: DeclStmt \n n$0=_fun_foo() [line 14, column 16]\n *&#GB<codetoanalyze/cpp/frontend/globals/initializer.cpp>$x:int=(n$0 + 5) [line 14, column 1]\n " shape="box"]
|
||||
"__infer_globals_initializer_x#346c89dda90b0be6289346ddbf0528bc.83245b9f254e67fb6f879cc1e35a1bb1_3" [label="3: DeclStmt \n n$0=_fun_foo() [line 14, column 16]\n *&#GB<codetoanalyze/cpp/frontend/globals/initializer.cpp>$x:int=(n$0 + 5) [line 14, column 1]\n " shape="box"]
|
||||
|
||||
|
||||
"__infer_globals_initializer_x.90ed5779794b6c6f0b00544949bb1047_3" -> "__infer_globals_initializer_x.90ed5779794b6c6f0b00544949bb1047_2" ;
|
||||
"__infer_globals_initializer_y.0ea250be2dd991733c9131c53abc3c54_1" [label="1: Start __infer_globals_initializer_y\nFormals: \nLocals: \n DECLARE_LOCALS(&return); [line 15, column 1]\n " color=yellow style=filled]
|
||||
"__infer_globals_initializer_x#346c89dda90b0be6289346ddbf0528bc.83245b9f254e67fb6f879cc1e35a1bb1_3" -> "__infer_globals_initializer_x#346c89dda90b0be6289346ddbf0528bc.83245b9f254e67fb6f879cc1e35a1bb1_2" ;
|
||||
"__infer_globals_initializer_y#346c89dda90b0be6289346ddbf0528bc.e7d659d11156f551397be6d5db27f31c_1" [label="1: Start __infer_globals_initializer_y\nFormals: \nLocals: \n DECLARE_LOCALS(&return); [line 15, column 1]\n " color=yellow style=filled]
|
||||
|
||||
|
||||
"__infer_globals_initializer_y.0ea250be2dd991733c9131c53abc3c54_1" -> "__infer_globals_initializer_y.0ea250be2dd991733c9131c53abc3c54_3" ;
|
||||
"__infer_globals_initializer_y.0ea250be2dd991733c9131c53abc3c54_2" [label="2: Exit __infer_globals_initializer_y \n " color=yellow style=filled]
|
||||
"__infer_globals_initializer_y#346c89dda90b0be6289346ddbf0528bc.e7d659d11156f551397be6d5db27f31c_1" -> "__infer_globals_initializer_y#346c89dda90b0be6289346ddbf0528bc.e7d659d11156f551397be6d5db27f31c_3" ;
|
||||
"__infer_globals_initializer_y#346c89dda90b0be6289346ddbf0528bc.e7d659d11156f551397be6d5db27f31c_2" [label="2: Exit __infer_globals_initializer_y \n " color=yellow style=filled]
|
||||
|
||||
|
||||
"__infer_globals_initializer_y.0ea250be2dd991733c9131c53abc3c54_3" [label="3: DeclStmt \n n$0=*&#GB<codetoanalyze/cpp/frontend/globals/initializer.cpp>$x:int [line 15, column 16]\n n$1=*&#GB<codetoanalyze/cpp/frontend/globals/initializer.cpp>$z:int [line 15, column 20]\n *&#GB<codetoanalyze/cpp/frontend/globals/initializer.cpp>$y:int=((n$0 + n$1) + 1) [line 15, column 1]\n " shape="box"]
|
||||
"__infer_globals_initializer_y#346c89dda90b0be6289346ddbf0528bc.e7d659d11156f551397be6d5db27f31c_3" [label="3: DeclStmt \n n$0=*&#GB<codetoanalyze/cpp/frontend/globals/initializer.cpp>$x:int [line 15, column 16]\n n$1=*&#GB<codetoanalyze/cpp/frontend/globals/initializer.cpp>$z:int [line 15, column 20]\n *&#GB<codetoanalyze/cpp/frontend/globals/initializer.cpp>$y:int=((n$0 + n$1) + 1) [line 15, column 1]\n " shape="box"]
|
||||
|
||||
|
||||
"__infer_globals_initializer_y.0ea250be2dd991733c9131c53abc3c54_3" -> "__infer_globals_initializer_y.0ea250be2dd991733c9131c53abc3c54_2" ;
|
||||
"__infer_globals_initializer_y#346c89dda90b0be6289346ddbf0528bc.e7d659d11156f551397be6d5db27f31c_3" -> "__infer_globals_initializer_y#346c89dda90b0be6289346ddbf0528bc.e7d659d11156f551397be6d5db27f31c_2" ;
|
||||
}
|
||||
|
Loading…
Reference in new issue