Update clang analyzer for new tool support, Python 3, and error fixes.

Review Request #11553 — Created March 25, 2021 and submitted

Information

ReviewBot
release-3.0.x

Reviewers

This updates ClangTool to subclass the newer BaseTool, 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
Update clang analyzer for new tool support, Python 3, and error fixes.
This updates `ClangTool` to subclass the newer `BaseTool`, 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.
d9113e760b7650ba4cd05908a20dff83d5032821
chipx86
chipx86
david
  1. Ship It!
  2. 
      
chipx86
Review request changed

Status: Closed (submitted)

Change Summary:

Pushed to release-3.0.x (4457500)
Loading...