summaryrefslogtreecommitdiff
path: root/gnu/llvm/clang/tools/scan-build-py/lib/libscanbuild/analyze.py
diff options
context:
space:
mode:
Diffstat (limited to 'gnu/llvm/clang/tools/scan-build-py/lib/libscanbuild/analyze.py')
-rw-r--r--gnu/llvm/clang/tools/scan-build-py/lib/libscanbuild/analyze.py12
1 files changed, 7 insertions, 5 deletions
diff --git a/gnu/llvm/clang/tools/scan-build-py/lib/libscanbuild/analyze.py b/gnu/llvm/clang/tools/scan-build-py/lib/libscanbuild/analyze.py
index 9a249a8e15c..ebd6df1dc75 100644
--- a/gnu/llvm/clang/tools/scan-build-py/lib/libscanbuild/analyze.py
+++ b/gnu/llvm/clang/tools/scan-build-py/lib/libscanbuild/analyze.py
@@ -39,8 +39,10 @@ from libscanbuild.shell import decode
__all__ = ['scan_build', 'analyze_build', 'analyze_compiler_wrapper']
-COMPILER_WRAPPER_CC = 'analyze-cc'
-COMPILER_WRAPPER_CXX = 'analyze-c++'
+scanbuild_dir = os.path.dirname(os.path.realpath(__import__('sys').argv[0]))
+
+COMPILER_WRAPPER_CC = os.path.join(scanbuild_dir, '..', 'libexec', 'analyze-cc')
+COMPILER_WRAPPER_CXX = os.path.join(scanbuild_dir, '..', 'libexec', 'analyze-c++')
CTU_EXTDEF_MAP_FILENAME = 'externalDefMap.txt'
CTU_TEMP_DEFMAP_FOLDER = 'tmpExternalDefMaps'
@@ -355,6 +357,7 @@ def report_directory(hint, keep, output_format):
try:
yield name
finally:
+ args = (name,)
if os.listdir(name):
if output_format not in ['sarif', 'sarif-html']: # FIXME:
# 'scan-view' currently does not support sarif format.
@@ -362,6 +365,7 @@ def report_directory(hint, keep, output_format):
elif output_format == 'sarif-html':
msg = "Run 'scan-view %s' to examine bug reports or see " \
"merged sarif results at %s/results-merged.sarif."
+ args = (name, name)
else:
msg = "View merged sarif results at %s/results-merged.sarif."
keep = True
@@ -370,7 +374,7 @@ def report_directory(hint, keep, output_format):
msg = "Report directory '%s' contains no report, but kept."
else:
msg = "Removing directory '%s' because it contains no report."
- logging.warning(msg, name)
+ logging.warning(msg, *args)
if not keep:
os.rmdir(name)
@@ -382,8 +386,6 @@ def analyzer_params(args):
result = []
- if args.store_model:
- result.append('-analyzer-store={0}'.format(args.store_model))
if args.constraints_model:
result.append('-analyzer-constraints={0}'.format(
args.constraints_model))