[PATCH] D34404: [Clang-Tidy] Preserve Message, FileOffset, FilePath in Clang-Tidy YAML output

Alexander Kornienko via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Jun 30 02:56:33 PDT 2017

alexfh requested changes to this revision.
alexfh added a comment.
This revision now requires changes to proceed.

Please upload a diff with full context (http://llvm.org/docs/Phabricator.html).

Comment at: include/clang/Tooling/DiagnosticsYaml.h:86-95
-    std::vector<clang::tooling::Diagnostic> Diagnostics;
-    for (auto &Diagnostic : Doc.Diagnostics) {
-      // FIXME: Export all diagnostics, not just the ones with fixes.
-      // Update MappingTraits<clang::tooling::Diagnostic>::mapping.
-      if (Diagnostic.Fix.size() > 0) {
-        Diagnostics.push_back(Diagnostic);
-      }
We should ensure clang-apply-fixes still works correctly in the presence of diagnostics with no fixes. It would be best to add a lit test for that.

Comment at: unittests/Tooling/DiagnosticsYamlTest.cpp:171
\ No newline at end of file

Please add a newline.



More information about the cfe-commits mailing list