diff options
-rwxr-xr-x | clang/tools/scan-build/scan-build | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/clang/tools/scan-build/scan-build b/clang/tools/scan-build/scan-build index 65dc4fe1fa3..be6056ccb9d 100755 --- a/clang/tools/scan-build/scan-build +++ b/clang/tools/scan-build/scan-build @@ -1478,7 +1478,9 @@ sub ProcessArgs { # Construct an absolute path. Uses the current working directory # as a base if the original path was not absolute. - $Options{OutputDir} = abs_path(shift @$Args); + my $OutDir = shift @$Args; + mkpath($OutDir) unless (-e $OutDir); # abs_path wants existing dir + $Options{OutputDir} = abs_path($OutDir); next; } |