[clang] Fix incorrect call to TextDiagnostic::printDiagnosticMessage
authorAndrzej Warzynski <andrzej.warzynski@arm.com>
Wed, 16 Sep 2020 16:54:29 +0000 (17:54 +0100)
committerAndrzej Warzynski <andrzej.warzynski@arm.com>
Mon, 21 Sep 2020 08:41:39 +0000 (09:41 +0100)
commit4eae6fc95f95563a73a510a8b09cfce01004930a
tree5ea4bb110dddfcc109018d7d8792262fe2e97fee
parent349af8054218017a2ac0c4bfeddd63e6ccbf4a21
[clang] Fix incorrect call to TextDiagnostic::printDiagnosticMessage

As per the documentation, the 2nd argument in printDiagnosticMessage
should be a bool that specifies whether the underlying message is a
continuation note diagnostic or not. More specifically, it should be:
```
Level == DiagnosticsEngine::Note
```
instead of:
```
Level
```

This change means that `no input file` in the following scenario will be
now correctly printed in bold:
```
$ bin/clang
clang: error: no input files
```
In terminals that don't support text formatting the behaviour doesn't
change.

Differential Revision: https://reviews.llvm.org/D87816
clang/lib/Frontend/TextDiagnosticPrinter.cpp