Update clang analyzer for new tool support, Python 3, and error fixes.
Review Request #11553 — Created March 25, 2021 and submitted
This updates
ClangTool
to subclass the newerBaseTool
, and to use
the newer features it offers (dependencies, improved centralized base
command building, and standardized error code/column output).It also adds Python 3 support. The
plistlib
module changed
substantially between Python 2 and 3, and we didn't have working clang
support in Review Bot 2.0 for Python 3.Some fixes were put in place for handling clang results when
encountering a compiler error. Previously, these would just fail, as the
generated plist file wouldn't exist, and we assumed it did. Now, such
errors are turned directly into comments on a file, showing the error
output.Along with that, line ranges are corrected, correctly commenting on the
exact number of lines that an error spans.Unit tests were added for both simulated and actual runs of clang, using
the same datasets and expectations for both, to help catch regressions
down the road.
All unit tests pass on Python 2.7 and 3.x.
Summary | ID |
---|---|
d9113e760b7650ba4cd05908a20dff83d5032821 |
- Change Summary:
-
Fixed up some docstrings.
- Commits:
-
Summary ID c2faa5b2e1a88286142abbcf395feb8096acfd16 6f2d60f738d6684a79d8562dc8fcb0f2dc1c90c9