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: [email protected]
          Reporter: [email protected]
                CC: [email protected]

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.
_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to