Invalid SourceRanges can occur generally if the code does not compile,
thus we expect clang error diagnostics.
Unlike clang, clang-tidy did not swallow invalid source ranges, but
tried to highlight them, and blow various assertions.
The following two examples produce invalid source ranges, but this is
not a complete list:
void test(x); // error: unknown type name 'x' struct Foo { member; // error: C++ requires a type specifier for all declarations };
Thanks @whisperity helping me fix this.
EXPECT_TRUE(Errors[0].Message.Ranges.empty());? But I'm not sure if the data structure used there supports this.