[clang-tidy] Store all ranges in clang::tooling::Diagnostic
authorJoe Turner <joturner@google.com>
Tue, 25 Feb 2020 13:56:57 +0000 (14:56 +0100)
committerAlexander Kornienko <alexfh@google.com>
Thu, 27 Feb 2020 18:39:42 +0000 (19:39 +0100)
commitb26c88e3c6e08f8f78ab4291bc85b5685241f493
tree475d74acb52aa65e285e62be81bfb14be8c8e498
parentd32fa59fa007ba53b8453f96a5661b149e4715c7
[clang-tidy] Store all ranges in clang::tooling::Diagnostic

Summary: Instead of dropping all the ranges associated with a Diagnostic when
converting them to a ClangTidy error, instead attach them to the ClangTidyError,
so they can be consumed by other APIs.

Patch by Joe Turner <joturner@google.com>.
Differential Revision: https://reviews.llvm.org/D69782
clang-tools-extra/unittests/clang-apply-replacements/ApplyReplacementsTest.cpp
clang/include/clang/Tooling/Core/Diagnostic.h
clang/include/clang/Tooling/DiagnosticsYaml.h
clang/lib/Tooling/Core/Diagnostic.cpp
clang/unittests/Tooling/DiagnosticsYamlTest.cpp