Presently, test_errors.py only checks errors. If Flang fails to emit an
expected error at a particular line, misphrases it, or emits an
unexpected error, test_errors.py makes the test fail. It does however
not take warnings into account. This patch makes test_errors.py check
warnings the same way as errors.
Warnings are accounted separately from errors, but warnings of
different severity are lumped together. That is, if an expected error
comes out as a warning the test fails, but test_errors.py will not care
if the warning is of "warning" or "portability" severity. To expect a
warning, the 'WARNING:' directive is used.
RFC: https://discourse.llvm.org/t/62577
Depends on D126176
Depends on D126459
Depends on D127337
Depends on D131987
Depends on D132403