[clang-tidy] Add diagnostics level to YAML output
Summary:
Also added BuildDirectory for completness and removed unused `Fix`.
Test Plan: check-all
Reviewers: alexfh, gribozavr2
Subscribers: xazax.hun, cfe-commits
Tags: #clang-tools-extra, #clang
Differential Revision: https://reviews.llvm.org/D79285
diff --git a/clang/unittests/Tooling/DiagnosticsYamlTest.cpp b/clang/unittests/Tooling/DiagnosticsYamlTest.cpp
index ef8f3ec..acfefa5 100644
--- a/clang/unittests/Tooling/DiagnosticsYamlTest.cpp
+++ b/clang/unittests/Tooling/DiagnosticsYamlTest.cpp
@@ -65,6 +65,8 @@
" Offset: 100\n"
" Length: 12\n"
" ReplacementText: 'replacement #1'\n"
+ " Level: Warning\n"
+ " BuildDirectory: 'path/to/build/directory'\n"
" - DiagnosticName: 'diagnostic#2'\n"
" DiagnosticMessage:\n"
" Message: 'message #2'\n"
@@ -75,6 +77,8 @@
" Offset: 62\n"
" Length: 2\n"
" ReplacementText: 'replacement #2'\n"
+ " Level: Warning\n"
+ " BuildDirectory: 'path/to/build/directory'\n"
" Ranges:\n"
" - FilePath: 'path/to/source.cpp'\n"
" FileOffset: 10\n"
@@ -94,6 +98,8 @@
" FilePath: 'path/to/note2.cpp'\n"
" FileOffset: 99\n"
" Replacements: []\n"
+ " Level: Warning\n"
+ " BuildDirectory: 'path/to/build/directory'\n"
"...\n";
TEST(DiagnosticsYamlTest, serializesDiagnostics) {