[llvm-bugs] [Bug 49558] New: TokensTest.cpp has an un-executed EXPECT_THAT test
via llvm-bugs
llvm-bugs at lists.llvm.org
Fri Mar 12 07:31:56 PST 2021
https://bugs.llvm.org/show_bug.cgi?id=49558
Bug ID: 49558
Summary: TokensTest.cpp has an un-executed EXPECT_THAT test
Product: clang
Version: unspecified
Hardware: PC
OS: Linux
Status: NEW
Severity: normal
Priority: P
Component: Tooling
Assignee: unassignedclangbugs at nondot.org
Reporter: paul_robinson at playstation.sony.com
CC: llvm-bugs at lists.llvm.org
clang/unittests/Tooling/Syntax/TokensTest.cpp has a test "Locations" that
ends with the following loop:
for (auto &R : Code.ranges()) {
EXPECT_THAT(Buffer.spelledTokenAt(StartLoc.getLocWithOffset(R.Begin)),
Pointee(RangeIs(R)));
}
However, the EXPECT_THAT is never executed (replacing it with an assert or
llvm_unreachable does not fire). Apparently Code.ranges() has no elements.
Found by the Rotten Green Tests project.
--
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20210312/bfcea3c6/attachment.html>
More information about the llvm-bugs
mailing list