Index: include/clang/Tooling/Core/Diagnostic.h =================================================================== --- include/clang/Tooling/Core/Diagnostic.h +++ include/clang/Tooling/Core/Diagnostic.h @@ -84,6 +84,13 @@ /// /// Note: it is empty in unittest. std::string BuildDirectory; + + + /// Extra source ranges associated with the diagnostic. By default, the + /// diagnostic is only associated with the source location specified in the + /// `Message` field, but if `Ranges` is nonempty, they will be preferred + /// representation of the source code associated with the diagnostic. + ArrayRef Ranges; }; /// Collection of Diagnostics generated from a single translation unit.