From 8e3c7350ac405b8cad959b13ed0e234bb5fb986b Mon Sep 17 00:00:00 2001 From: Anton Yartsev Date: Wed, 17 Jun 2015 23:12:33 +0000 Subject: [PATCH] [analyzer] Close file handle before output to file from external command. An old code caused problems under Windows - additional temporary file was created for clang preprocessor output while the right output file remained empty. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@239970 91177308-0d34-0410-b5e6-96231b3b80d8 --- tools/scan-build/ccc-analyzer | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/scan-build/ccc-analyzer b/tools/scan-build/ccc-analyzer index 4549b29a80..cf56d14ebe 100755 --- a/tools/scan-build/ccc-analyzer +++ b/tools/scan-build/ccc-analyzer @@ -135,8 +135,8 @@ sub ProcessClangFailure { my ($PPH, $PPFile) = tempfile( $prefix . "_XXXXXX", SUFFIX => GetPPExt($Lang), DIR => $Dir); - system $Clang, @$Args, "-E", "-o", $PPFile; close ($PPH); + system $Clang, @$Args, "-E", "-o", $PPFile; # Create the info file. open (OUT, ">", "$PPFile.info.txt") or die "Cannot open $PPFile.info.txt\n"; -- 2.50.1