FormatTest: Provide real line number in failure messages
authorAlex Richardson <Alexander.Richardson@cl.cam.ac.uk>
Fri, 4 Sep 2020 15:13:29 +0000 (16:13 +0100)
committerAlex Richardson <Alexander.Richardson@cl.cam.ac.uk>
Fri, 4 Sep 2020 15:57:46 +0000 (16:57 +0100)
commit2108bceceb5e6eca361aaa6b10441d83bd9edc1b
tree10a1fd69610a419581dae0e2a6b58d816fb7e563
parente0ff5a8410ea58ba3d2e75791789a28ce976a7e7
FormatTest: Provide real line number in failure messages

Currently a test failure always reports a line number inside verifyFormat()
which is not very helpful to see which test failed. With this change we now
emit the line number where the verify function was called. When using an
IDE such as CLion, the output now includes a clickable link that points to
the call site.

Reviewed By: MyDeveloperDay

Differential Revision: https://reviews.llvm.org/D86926
clang/unittests/Format/FormatTest.cpp