Add option to include multiple lines in snippets.
authorRichard Smith <richard-llvm@metafoo.co.uk>
Mon, 22 May 2017 23:51:40 +0000 (23:51 +0000)
committerRichard Smith <richard-llvm@metafoo.co.uk>
Mon, 22 May 2017 23:51:40 +0000 (23:51 +0000)
commit0c7d4d7e2142d83a0dc939dba6939a6bff0715b9
tree904d718105963b849180cae4650af8b024ec63c8
parent81559593a3143c13f3c0ad6296d71ebf912ee2be
Add option to include multiple lines in snippets.

When a diagnostic includes a highlighted range spanning multiple lines, clang
now supports printing out multiple lines of context if necessary to show the
highlighted ranges. This is not yet exposed in the driver, but can be enabled
by "-Xclang -fcaret-diagnostics-max-lines -Xclang N".

This is experimental until we can find out whether it works well in practice,
and if so, what a good default for the maximum number of lines is.

llvm-svn: 303589
clang/include/clang/Basic/DiagnosticOptions.def
clang/include/clang/Basic/DiagnosticOptions.h
clang/include/clang/Driver/CC1Options.td
clang/lib/Frontend/CompilerInvocation.cpp
clang/lib/Frontend/TextDiagnostic.cpp
clang/test/Misc/caret-diags-multiline.cpp [new file with mode: 0644]