Commit Graph

4 Commits

Author SHA1 Message Date
serge-sans-paille e45f67f31e Make analyze-cc path discovery sensible to symlinks
Fix https://bugs.llvm.org/show_bug.cgi?id=51897

Differential Revision: https://reviews.llvm.org/D110521
2021-09-27 08:35:19 +02:00
serge-sans-paille c84755a046 Fix scan-build-py executable lookup path
Once installed, scan-build-py doesn't know anything about its auxiliary
executable and can't find them.
Use relative path wrt. scan-build-py script.

Differential Revision: https://reviews.llvm.org/D109659
2021-09-13 11:01:47 +02:00
Sylvestre Ledru 70b06fe8a1 scan-build-py: Force the opening in utf-8
It fails on ubuntu bionic otherwise with:
```
scan-build-py-14: Run 'scan-view /tmp/scan-build-2021-08-09-09-14-36-765350-nx9s888s' to examine bug reports.
scan-build-py-14: Internal error.
Traceback (most recent call last):
  File "/usr/lib/llvm-14/lib/libscanbuild/__init__.py", line 125, in wrapper
    return function(*args, **kwargs)
  File "/usr/lib/llvm-14/lib/libscanbuild/analyze.py", line 72, in scan_build
    number_of_bugs = document(args)
  File "/usr/lib/llvm-14/lib/libscanbuild/report.py", line 35, in document
    for bug in read_bugs(args.output, html_reports_available):
  File "/usr/lib/llvm-14/lib/libscanbuild/report.py", line 282, in read_bugs
    for bug in parser(bug_file):
  File "/usr/lib/llvm-14/lib/libscanbuild/report.py", line 421, in parse_bug_html
    for line in handler.readlines():
  File "/usr/lib/python3.6/encodings/ascii.py", line 26, in decode
    return codecs.ascii_decode(input, self.errors)[0]
UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 3360: ordinal not in range(128)
scan-build-py-14: Please run this command again and turn on verbose mode (add '-vvvv' as argument).
```

I guess it is caused by a problem in Python 3.6

Reviewed By: phosek, isthismyaccount

Differential Revision: https://reviews.llvm.org/D107887
2021-08-17 19:19:39 +02:00
Daniel Hwang d9cf8291e7 Create install targets for scan-build-py.
A new revision identical to https://reviews.llvm.org/D101139
The parent revision of aforementioned revision seems to cause pre-merge checks to fail opaquely. Seeing if creating a new revision will work.

Reviewed By: phosek

Differential Revision: https://reviews.llvm.org/D104138
2021-06-21 13:08:34 -07:00