Summary: This commit augments codes to clean up temporary files generated by the clang frontend. Currently clang frontend leaves large number of temporary files int the tmp directory, and it could be seen for example by running these command: ``` git clean -xdf infer/models/ mkdir /tmp/infer env TMPDIR=/tmp/infer make infer_models ls -l /tmp/infer ``` P.S. Analyzing real project could easily cause each infer capture to leave hundreds of files in /tmp P.P.S. There are 11 total references to Filename.temp_file however, other 9 seems don't leak temporary files in such large scale (at least not when using the clang frontend). Closes https://github.com/facebook/infer/pull/816 Reviewed By: jvillard Differential Revision: D6385311 Pulled By: dulmarod fbshipit-source-id: f7956b0master
parent
b71d567157
commit
a0dfd699a8
@ -0,0 +1,10 @@
|
|||||||
|
(*
|
||||||
|
* Copyright (c) 2018 - 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.
|
||||||
|
*)
|
||||||
|
(** Keep track of whether the current execution is in a child process *)
|
||||||
|
let in_child = ref false
|
@ -0,0 +1,10 @@
|
|||||||
|
(*
|
||||||
|
* Copyright (c) 2018 - 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.
|
||||||
|
*)
|
||||||
|
val in_child : bool ref
|
||||||
|
(** Keep track of whether the current execution is in a child process *)
|
Loading…
Reference in new issue